Searched refs:saddr (Results 1 - 25 of 207) sorted by relevance

123456789

/net/xfrm/
H A Dxfrm_hash.h18 const xfrm_address_t *saddr)
20 u32 sum = (__force u32)daddr->a4 + (__force u32)saddr->a4;
25 const xfrm_address_t *saddr)
28 saddr->a6[2] ^ saddr->a6[3]);
32 const xfrm_address_t *saddr,
39 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr);
42 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr);
49 const xfrm_address_t *saddr,
56 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr);
17 __xfrm4_daddr_saddr_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr) argument
24 __xfrm6_daddr_saddr_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr) argument
31 __xfrm_dst_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, u32 reqid, unsigned short family, unsigned int hmask) argument
48 __xfrm_src_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family, unsigned int hmask) argument
90 const xfrm_address_t *saddr = &sel->saddr; local
114 __addr_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family, unsigned int hmask) argument
[all...]
/net/ipv4/
H A Dxfrm4_state.c30 sel->saddr.a4 = fl4->saddr;
44 const xfrm_address_t *daddr, const xfrm_address_t *saddr)
49 x->props.saddr = tmpl->saddr;
50 if (x->props.saddr.a4 == 0)
51 x->props.saddr.a4 = saddr->a4;
43 xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, const xfrm_address_t *daddr, const xfrm_address_t *saddr) argument
H A Ddatagram.c29 __be32 saddr; local
45 saddr = inet->inet_saddr;
49 if (!saddr)
50 saddr = inet->mc_addr;
53 rt = ip_route_connect(fl4, usin->sin_addr.s_addr, saddr,
70 inet->inet_saddr = fl4->saddr; /* Update source address */
72 inet->inet_rcv_saddr = fl4->saddr;
H A Dnetfilter.c26 __be32 saddr = iph->saddr; local
31 addr_type = inet_addr_type(net, saddr);
35 saddr = 0;
38 * packets with foreign saddr to appear on the NF_INET_LOCAL_OUT hook.
41 fl4.saddr = saddr;
87 __be32 saddr; member in struct:ip_rt_info
102 rt_info->saddr = iph->saddr;
[all...]
H A Dxfrm4_policy.c23 const xfrm_address_t *saddr,
31 if (saddr)
32 fl4->saddr = saddr->a4;
42 const xfrm_address_t *saddr,
47 return __xfrm4_dst_lookup(net, &fl4, tos, saddr, daddr);
51 xfrm_address_t *saddr, xfrm_address_t *daddr)
60 saddr->a4 = fl4.saddr;
179 fl4->daddr = reverse ? iph->saddr
21 __xfrm4_dst_lookup(struct net *net, struct flowi4 *fl4, int tos, const xfrm_address_t *saddr, const xfrm_address_t *daddr) argument
41 xfrm4_dst_lookup(struct net *net, int tos, const xfrm_address_t *saddr, const xfrm_address_t *daddr) argument
50 xfrm4_get_saddr(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr) argument
[all...]
H A Dsyncookies.c44 static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, argument
50 tmp[0] = (__force u32)saddr;
91 static __u32 secure_tcp_syn_cookie(__be32 saddr, __be32 daddr, __be16 sport, argument
98 * HASH(sec1,saddr,sport,daddr,dport,sec1) + sseq + (count * 2^24)
99 * + (HASH(sec2,saddr,sport,daddr,dport,count,sec2) % 2^24).
106 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) +
108 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data)
121 static __u32 check_tcp_syn_cookie(__u32 cookie, __be32 saddr, __be32 daddr, argument
128 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq;
136 cookie_hash(saddr, dadd
[all...]
/net/ipv6/
H A Dip6_checksum.c7 __sum16 csum_ipv6_magic(const struct in6_addr *saddr, argument
18 sum += (__force u32)saddr->s6_addr32[0];
19 carry = (sum < (__force u32)saddr->s6_addr32[0]);
22 sum += (__force u32)saddr->s6_addr32[1];
23 carry = (sum < (__force u32)saddr->s6_addr32[1]);
26 sum += (__force u32)saddr->s6_addr32[2];
27 carry = (sum < (__force u32)saddr->s6_addr32[2]);
30 sum += (__force u32)saddr->s6_addr32[3];
31 carry = (sum < (__force u32)saddr->s6_addr32[3]);
86 !csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
[all...]
H A Dxfrm6_state.c31 *(struct in6_addr *)&sel->saddr = fl6->saddr;
45 const xfrm_address_t *daddr, const xfrm_address_t *saddr)
50 memcpy(&x->props.saddr, &tmpl->saddr, sizeof(x->props.saddr));
51 if (ipv6_addr_any((struct in6_addr*)&x->props.saddr))
52 memcpy(&x->props.saddr, saddr, sizeof(x->props.saddr));
44 xfrm6_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, const xfrm_address_t *daddr, const xfrm_address_t *saddr) argument
[all...]
H A Dtcpv6_offload.c31 __tcp_v6_send_check(skb, &ipv6h->saddr, &ipv6h->daddr);
44 if (!tcp_v6_check(skb_gro_len(skb), &iph->saddr, &iph->daddr,
54 wsum = ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr,
77 &iph->saddr, &iph->daddr, 0);
H A Dxfrm6_tunnel.c88 static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) argument
94 &xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)],
96 if (xfrm6_addr_equal(&x6spi->addr, saddr))
103 __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) argument
109 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr);
132 static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) argument
163 memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr));
169 index = xfrm6_tunnel_spi_hash_byaddr(saddr);
175 __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) argument
181 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr);
200 xfrm6_tunnel_free_spi(struct net *net, xfrm_address_t *saddr) argument
[all...]
H A Dinet6_hashtables.c70 const struct in6_addr *saddr,
82 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport);
92 if (likely(INET6_MATCH(sk, net, saddr, daddr, ports, dif))) {
95 if (unlikely(!INET6_MATCH(sk, net, saddr, daddr,
111 if (likely(INET6_TW_MATCH(sk, net, saddr, daddr,
117 if (unlikely(!INET6_TW_MATCH(sk, net, saddr, daddr,
161 struct inet_hashinfo *hashinfo, const struct in6_addr *saddr,
185 saddr, sport);
218 const struct in6_addr *saddr, const __be16 sport,
225 sk = __inet6_lookup(net, hashinfo, saddr, spor
68 __inet6_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, const struct in6_addr *saddr, const __be16 sport, const struct in6_addr *daddr, const u16 hnum, const int dif) argument
160 inet6_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, const struct in6_addr *saddr, const __be16 sport, const struct in6_addr *daddr, const unsigned short hnum, const int dif) argument
217 inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, const struct in6_addr *saddr, const __be16 sport, const struct in6_addr *daddr, const __be16 dport, const int dif) argument
241 const struct in6_addr *saddr = &np->daddr; local
[all...]
H A Dnetfilter.c31 .saddr = iph->saddr,
76 struct in6_addr saddr; member in struct:ip6_rt_info
89 rt_info->saddr = iph->saddr;
102 !ipv6_addr_equal(&iph->saddr, &rt_info->saddr) ||
141 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr,
152 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr,
179 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr,
[all...]
H A Dsyncookies.c66 static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr, argument
77 memcpy(tmp, saddr, 16);
86 static __u32 secure_tcp_syn_cookie(const struct in6_addr *saddr, argument
91 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) +
93 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data)
97 static __u32 check_tcp_syn_cookie(__u32 cookie, const struct in6_addr *saddr, argument
104 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq;
111 cookie_hash(saddr, daddr, sport, dport, count - diff, 1))
132 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source,
142 __u32 mssind = check_tcp_syn_cookie(cookie, &iph->saddr,
[all...]
/net/core/
H A Dsecure_seq.c38 __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr, argument
45 memcpy(hash, saddr, 16);
59 u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, argument
66 memcpy(hash, saddr, 16);
105 __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, argument
110 hash[0] = (__force u32)saddr;
120 u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) argument
124 hash[0] = (__force u32)saddr;
137 u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, argument
143 hash[0] = (__force u32)saddr;
159 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr, __be16 sport, __be16 dport) argument
[all...]
/net/802/
H A Dfc.c38 const void *daddr, const void *saddr, unsigned int len)
65 if(saddr)
66 memcpy(fch->saddr,saddr,dev->addr_len);
68 memcpy(fch->saddr,dev->dev_addr,dev->addr_len);
36 fc_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) argument
H A Dfddi.c48 * saddr=NULL means use device source address
54 const void *daddr, const void *saddr, unsigned int len)
76 if (saddr != NULL)
77 memcpy(fddi->saddr, saddr, dev->addr_len);
79 memcpy(fddi->saddr, dev->dev_addr, dev->addr_len);
52 fddi_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) argument
/net/ipv6/netfilter/
H A Dip6table_mangle.c38 struct in6_addr saddr, daddr; local
52 memcpy(&saddr, &ipv6_hdr(skb)->saddr, sizeof(saddr));
64 (!ipv6_addr_equal(&ipv6_hdr(skb)->saddr, &saddr) ||
/net/llc/
H A Dllc_s_ac.c57 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, ev->saddr.lsap,
60 rc = llc_mac_hdr_init(skb, ev->saddr.mac, ev->daddr.mac);
80 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, ev->saddr.lsap,
83 rc = llc_mac_hdr_init(skb, ev->saddr.mac, ev->daddr.mac);
134 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, ev->saddr.lsap,
137 rc = llc_mac_hdr_init(skb, ev->saddr.mac, ev->daddr.mac);
/net/netfilter/
H A Dxt_iprange.c27 m = ntohl(iph->saddr) < ntohl(info->src_min.ip);
28 m |= ntohl(iph->saddr) > ntohl(info->src_max.ip);
32 &iph->saddr,
76 m = iprange_ipv6_lt(&iph->saddr, &info->src_min.in6);
77 m |= iprange_ipv6_lt(&info->src_max.in6, &iph->saddr);
81 &iph->saddr,
H A Dxt_NFQUEUE.c46 if ((__force u32)iph->saddr < (__force u32)iph->daddr)
47 return jhash_3words((__force u32)iph->saddr,
51 (__force u32)iph->saddr, iph->protocol, jhash_initval);
60 if ((__force u32)ip6h->saddr.s6_addr32[3] <
62 a = (__force u32) ip6h->saddr.s6_addr32[3];
65 b = (__force u32) ip6h->saddr.s6_addr32[3];
69 if ((__force u32)ip6h->saddr.s6_addr32[1] <
71 c = (__force u32) ip6h->saddr.s6_addr32[1];
H A Dxt_socket.c95 * its saddr is the local address */
97 *laddr = inside_iph->saddr;
111 __be32 uninitialized_var(daddr), uninitialized_var(saddr);
126 saddr = iph->saddr;
132 if (extract_icmp4_fields(skb, &protocol, &saddr, &daddr,
159 saddr, daddr, sport, dport, par->in, NFT_LOOKUP_ANY);
162 protocol, &saddr, ntohs(sport),
260 * its saddr is the local address */
262 *laddr = &inside_iph->saddr;
276 struct in6_addr *daddr = NULL, *saddr = NULL; local
[all...]
/net/dccp/
H A Dipv6.c58 const struct in6_addr *saddr,
61 return csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_DCCP, skb->csum);
70 dh->dccph_checksum = dccp_v6_csum_finish(skb, &np->saddr, &np->daddr);
76 ipv6_hdr(skb)->saddr.s6_addr32,
103 &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
167 &hdr->daddr, &hdr->saddr,
229 fl6.saddr = ireq6->loc_addr;
290 dccp_hdr(skb)->dccph_checksum = dccp_v6_csum_finish(skb, &rxip6h->saddr,
294 fl6.daddr = rxip6h->saddr;
295 fl6.saddr
57 dccp_v6_csum_finish(struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr) argument
830 struct in6_addr *saddr = NULL, *final_p, final; local
[all...]
/net/netfilter/ipvs/
H A Dip_vs_xmit.c54 IP_VS_RT_MODE_CONNECT = 8, /* Always bind route to saddr */
122 /* Get route to daddr, update *saddr, optionally bind route to saddr */
124 int rt_mode, __be32 *saddr)
132 fl4.saddr = (rt_mode & IP_VS_RT_MODE_CONNECT) ? *saddr : 0;
139 /* Invalid saddr ? */
140 if (PTR_ERR(rt) == -EINVAL && *saddr &&
142 *saddr = 0;
148 } else if (!*saddr
123 do_output_route4(struct net *net, __be32 daddr, int rt_mode, __be32 *saddr) argument
204 __be32 saddr = htonl(INADDR_ANY); local
819 __be32 saddr; /* Source for tunnel */ local
915 struct in6_addr saddr; /* Source for tunnel */ local
[all...]
/net/bridge/netfilter/
H A Debt_arp.c40 __be32 saddr, daddr; local
45 ah->ar_hln, sizeof(saddr),
46 &saddr);
50 2*ah->ar_hln+sizeof(saddr),
55 FWINV(info->saddr != (*sap & info->smsk), EBT_ARP_SRC_IP))
/net/ipv4/netfilter/
H A Diptable_mangle.c45 __be32 saddr, daddr; local
57 saddr = iph->saddr;
67 if (iph->saddr != saddr ||

Completed in 710 milliseconds

123456789