/linux-4.1.27/include/net/ |
H A D | secure_seq.h | 6 u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); 7 u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, 9 __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, 11 __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr, 13 u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, 15 u64 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr,
|
H A D | ip6_checksum.h | 38 __sum16 csum_ipv6_magic(const struct in6_addr *saddr, 46 return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, ip6_compute_pseudo() 55 return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr, ip6_gro_compute_pseudo() 60 const struct in6_addr *saddr, tcp_v6_check() 64 return csum_ipv6_magic(saddr, daddr, len, IPPROTO_TCP, base); tcp_v6_check() 68 const struct in6_addr *saddr, __tcp_v6_send_check() 74 th->check = ~tcp_v6_check(skb->len, saddr, daddr, 0); __tcp_v6_send_check() 78 th->check = tcp_v6_check(skb->len, saddr, daddr, __tcp_v6_send_check() 89 __tcp_v6_send_check(skb, &np->saddr, &sk->sk_v6_daddr); tcp_v6_send_check() 94 const struct in6_addr *saddr, udp_v6_check() 98 return csum_ipv6_magic(saddr, daddr, len, IPPROTO_UDP, base); udp_v6_check() 102 const struct in6_addr *saddr, 59 tcp_v6_check(int len, const struct in6_addr *saddr, const struct in6_addr *daddr, __wsum base) tcp_v6_check() argument 67 __tcp_v6_send_check(struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr) __tcp_v6_send_check() argument 93 udp_v6_check(int len, const struct in6_addr *saddr, const struct in6_addr *daddr, __wsum base) udp_v6_check() argument
|
H A D | inet6_hashtables.h | 49 const struct in6_addr *saddr, 56 const struct in6_addr *saddr, 63 const struct in6_addr *saddr, __inet6_lookup() 69 struct sock *sk = __inet6_lookup_established(net, hashinfo, saddr, __inet6_lookup() 74 return inet6_lookup_listener(net, hashinfo, saddr, sport, __inet6_lookup() 90 &ipv6_hdr(skb)->saddr, sport, __inet6_lookup_skb() 96 const struct in6_addr *saddr, const __be16 sport, 61 __inet6_lookup(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) __inet6_lookup() argument
|
H A D | flow.h | 70 /* (saddr,daddr) must be grouped, same order as in IP header */ 71 __be32 saddr; member in struct:flowi4 87 __be32 daddr, __be32 saddr, flowi4_init_output() 99 fl4->saddr = saddr; flowi4_init_output() 106 __be32 daddr, __be32 saddr) flowi4_update_output() 111 fl4->saddr = saddr; flowi4_update_output() 126 struct in6_addr saddr; member in struct:flowi6 147 __le16 saddr; member in struct:flowidn 84 flowi4_init_output(struct flowi4 *fl4, int oif, __u32 mark, __u8 tos, __u8 scope, __u8 proto, __u8 flags, __be32 daddr, __be32 saddr, __be16 dport, __be16 sport) flowi4_init_output() argument 105 flowi4_update_output(struct flowi4 *fl4, int oif, __u8 tos, __be32 daddr, __be32 saddr) flowi4_update_output() argument
|
H A D | ip6_route.h | 91 struct in6_addr *saddr); 94 const struct in6_addr *saddr, int oif, int flags); 146 const struct in6_addr *saddr) __ip6_dst_store() 154 np->saddr_cache = saddr; __ip6_dst_store() 160 struct in6_addr *daddr, struct in6_addr *saddr) ip6_dst_store() 163 __ip6_dst_store(sk, dst, daddr, saddr); ip6_dst_store() 144 __ip6_dst_store(struct sock *sk, struct dst_entry *dst, const struct in6_addr *daddr, const struct in6_addr *saddr) __ip6_dst_store() argument 159 ip6_dst_store(struct sock *sk, struct dst_entry *dst, struct in6_addr *daddr, struct in6_addr *saddr) ip6_dst_store() argument
|
H A D | route.h | 125 __be32 saddr, u8 tos, int oif) ip_route_output() 131 .saddr = saddr, ip_route_output() 138 __be32 daddr, __be32 saddr, ip_route_output_ports() 145 daddr, saddr, dport, sport); ip_route_output_ports() 152 __be32 daddr, __be32 saddr, ip_route_output_gre() 158 fl4->saddr = saddr; ip_route_output_gre() 274 flowi4_update_output(fl4, oif, tos, fl4->daddr, fl4->saddr); ip_route_connect() 291 fl4->saddr); ip_route_newports() 124 ip_route_output(struct net *net, __be32 daddr, __be32 saddr, u8 tos, int oif) ip_route_output() argument 136 ip_route_output_ports(struct net *net, struct flowi4 *fl4, struct sock *sk, __be32 daddr, __be32 saddr, __be16 dport, __be16 sport, __u8 proto, __u8 tos, int oif) ip_route_output_ports() argument 151 ip_route_output_gre(struct net *net, struct flowi4 *fl4, __be32 daddr, __be32 saddr, __be32 gre_key, __u8 tos, int oif) ip_route_output_gre() argument
|
H A D | inet_hashtables.h | 258 const __be32 saddr, const __be16 sport, 265 __be32 saddr, __be16 sport, inet_lookup_listener() 268 return __inet_lookup_listener(net, hashinfo, saddr, sport, inet_lookup_listener() 328 const __be32 saddr, const __be16 sport, 334 const __be32 saddr, const __be16 sport, inet_lookup_established() 338 return __inet_lookup_established(net, hashinfo, saddr, sport, daddr, inet_lookup_established() 344 const __be32 saddr, const __be16 sport, __inet_lookup() 350 saddr, sport, daddr, hnum, dif); __inet_lookup() 352 return sk ? : __inet_lookup_listener(net, hashinfo, saddr, sport, __inet_lookup() 358 const __be32 saddr, const __be16 sport, inet_lookup() 365 sk = __inet_lookup(net, hashinfo, saddr, sport, daddr, dport, dif); inet_lookup() 383 iph->saddr, sport, __inet_lookup_skb() 263 inet_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, __be32 saddr, __be16 sport, __be32 daddr, __be16 dport, int dif) inet_lookup_listener() argument 333 inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif) inet_lookup_established() argument 342 __inet_lookup(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif) __inet_lookup() argument 356 inet_lookup(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif) inet_lookup() argument
|
H A D | xfrm.h | 96 5. ->saddr Local tunnel endpoint, ignored for transport mode. 158 xfrm_address_t saddr; member in struct:xfrm_state::__anon12842 288 const xfrm_address_t *saddr, 290 int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr); 331 const xfrm_address_t *saddr); 479 xfrm_address_t saddr; member in struct:xfrm_tmpl 934 * routing key, including saddr,daddr. However, we can have many of 1036 return (tmpl->saddr.a4 && __xfrm4_state_addr_cmp() 1037 tmpl->saddr.a4 != x->props.saddr.a4); __xfrm4_state_addr_cmp() 1043 return (!ipv6_addr_any((struct in6_addr*)&tmpl->saddr) && __xfrm6_state_addr_cmp() 1044 !ipv6_addr_equal((struct in6_addr *)&tmpl->saddr, (struct in6_addr*)&x->props.saddr)); __xfrm6_state_addr_cmp() 1223 return (xfrm_address_t *)&fl->u.ip4.saddr; xfrm_flowi_saddr() 1225 return (xfrm_address_t *)&fl->u.ip6.saddr; xfrm_flowi_saddr() 1232 xfrm_address_t *saddr, xfrm_address_t *daddr, xfrm_flowi_addr_get() 1237 memcpy(&saddr->a4, &fl->u.ip4.saddr, sizeof(saddr->a4)); xfrm_flowi_addr_get() 1241 saddr->in6 = fl->u.ip6.saddr; xfrm_flowi_addr_get() 1249 const xfrm_address_t *daddr, const xfrm_address_t *saddr) __xfrm4_state_addr_check() 1252 (saddr->a4 == x->props.saddr.a4 || !saddr->a4 || !x->props.saddr.a4)) __xfrm4_state_addr_check() 1259 const xfrm_address_t *daddr, const xfrm_address_t *saddr) __xfrm6_state_addr_check() 1262 (ipv6_addr_equal((struct in6_addr *)saddr, (struct in6_addr *)&x->props.saddr) || __xfrm6_state_addr_check() 1263 ipv6_addr_any((struct in6_addr *)saddr) || __xfrm6_state_addr_check() 1264 ipv6_addr_any((struct in6_addr *)&x->props.saddr))) __xfrm6_state_addr_check() 1271 const xfrm_address_t *daddr, const xfrm_address_t *saddr, xfrm_state_addr_check() 1276 return __xfrm4_state_addr_check(x, daddr, saddr); xfrm_state_addr_check() 1278 return __xfrm6_state_addr_check(x, daddr, saddr); xfrm_state_addr_check() 1291 (const xfrm_address_t *)&fl->u.ip4.saddr); xfrm_state_addr_flow_check() 1295 (const xfrm_address_t *)&fl->u.ip6.saddr); xfrm_state_addr_flow_check() 1432 const xfrm_address_t *saddr, 1439 xfrm_address_t *saddr, 1453 const xfrm_address_t *saddr, 1540 xfrm_address_t *saddr, u8 proto); 1547 __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr); 1548 __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr); 1597 const xfrm_address_t *saddr, int create, 1231 xfrm_flowi_addr_get(const struct flowi *fl, xfrm_address_t *saddr, xfrm_address_t *daddr, unsigned short family) xfrm_flowi_addr_get() argument 1248 __xfrm4_state_addr_check(const struct xfrm_state *x, const xfrm_address_t *daddr, const xfrm_address_t *saddr) __xfrm4_state_addr_check() argument 1258 __xfrm6_state_addr_check(const struct xfrm_state *x, const xfrm_address_t *daddr, const xfrm_address_t *saddr) __xfrm6_state_addr_check() argument 1270 xfrm_state_addr_check(const struct xfrm_state *x, const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family) xfrm_state_addr_check() argument
|
H A D | udp.h | 152 static inline __sum16 udp_v4_check(int len, __be32 saddr, udp_v4_check() argument 155 return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_UDP, base); udp_v4_check() 159 __be32 saddr, __be32 daddr, int len); 257 struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, 259 struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, 263 const struct in6_addr *saddr, __be16 sport, 267 const struct in6_addr *saddr, __be16 sport,
|
H A D | llc_s_ev.h | 43 struct llc_addr saddr; member in struct:llc_sap_state_ev
|
H A D | ndisc.h | 185 const struct in6_addr *daddr, const struct in6_addr *saddr); 188 const struct in6_addr *saddr, const struct in6_addr *daddr);
|
/linux-4.1.27/net/xfrm/ |
H A D | xfrm_hash.h | 19 const xfrm_address_t *saddr) __xfrm4_daddr_saddr_hash() 21 u32 sum = (__force u32)daddr->a4 + (__force u32)saddr->a4; __xfrm4_daddr_saddr_hash() 26 const xfrm_address_t *saddr) __xfrm6_daddr_saddr_hash() 29 saddr->a6[2] ^ saddr->a6[3]); __xfrm6_daddr_saddr_hash() 45 const xfrm_address_t *saddr, __xfrm4_dpref_spref_hash() 50 ntohl(saddr->a4) & __bits2mask32(sbits), __xfrm4_dpref_spref_hash() 76 const xfrm_address_t *saddr, __xfrm6_dpref_spref_hash() 81 __xfrm6_pref_hash(saddr, sbits); __xfrm6_dpref_spref_hash() 85 const xfrm_address_t *saddr, __xfrm_dst_hash() 92 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); __xfrm_dst_hash() 95 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); __xfrm_dst_hash() 102 const xfrm_address_t *saddr, __xfrm_src_hash() 109 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); __xfrm_src_hash() 112 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); __xfrm_src_hash() 144 const xfrm_address_t *saddr = &sel->saddr; __sel_hash() local 153 h = __xfrm4_dpref_spref_hash(daddr, saddr, dbits, sbits); __sel_hash() 161 h = __xfrm6_dpref_spref_hash(daddr, saddr, dbits, sbits); __sel_hash() 169 const xfrm_address_t *saddr, __addr_hash() 178 h = __xfrm4_dpref_spref_hash(daddr, saddr, dbits, sbits); __addr_hash() 182 h = __xfrm6_dpref_spref_hash(daddr, saddr, dbits, sbits); __addr_hash() 18 __xfrm4_daddr_saddr_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr) __xfrm4_daddr_saddr_hash() argument 25 __xfrm6_daddr_saddr_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr) __xfrm6_daddr_saddr_hash() argument 44 __xfrm4_dpref_spref_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, __u8 dbits, __u8 sbits) __xfrm4_dpref_spref_hash() argument 75 __xfrm6_dpref_spref_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, __u8 dbits, __u8 sbits) __xfrm6_dpref_spref_hash() argument 84 __xfrm_dst_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, u32 reqid, unsigned short family, unsigned int hmask) __xfrm_dst_hash() argument 101 __xfrm_src_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family, unsigned int hmask) __xfrm_src_hash() argument 168 __addr_hash(const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family, unsigned int hmask, u8 dbits, u8 sbits) __addr_hash() argument
|
H A D | xfrm_state.c | 42 const xfrm_address_t *saddr, xfrm_dst_hash() 46 return __xfrm_dst_hash(daddr, saddr, reqid, family, net->xfrm.state_hmask); xfrm_dst_hash() 51 const xfrm_address_t *saddr, xfrm_src_hash() 54 return __xfrm_src_hash(daddr, saddr, family, net->xfrm.state_hmask); xfrm_src_hash() 76 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, hlist_for_each_entry_safe() 81 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, hlist_for_each_entry_safe() 635 const xfrm_address_t *daddr, const xfrm_address_t *saddr, xfrm_init_tempstate() 649 afinfo->init_temprop(x, tmpl, daddr, saddr); xfrm_init_tempstate() 680 const xfrm_address_t *saddr, __xfrm_state_lookup_byaddr() 683 unsigned int h = xfrm_src_hash(net, daddr, saddr, family); __xfrm_state_lookup_byaddr() 690 !xfrm_addr_equal(&x->props.saddr, saddr, family)) __xfrm_state_lookup_byaddr() 714 &x->props.saddr, __xfrm_state_locate() 764 xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr, xfrm_state_find() argument 783 h = xfrm_dst_hash(net, daddr, saddr, tmpl->reqid, encap_family); xfrm_state_find() 789 xfrm_state_addr_check(x, daddr, saddr, encap_family) && xfrm_state_find() 841 xfrm_init_tempstate(x, fl, tmpl, daddr, saddr, family); xfrm_state_find() 856 h = xfrm_src_hash(net, daddr, saddr, encap_family); xfrm_state_find() 886 xfrm_address_t *daddr, xfrm_address_t *saddr, xfrm_stateonly_find() 893 h = xfrm_dst_hash(net, daddr, saddr, reqid, family); xfrm_stateonly_find() 899 xfrm_state_addr_check(x, daddr, saddr, family) && xfrm_stateonly_find() 946 h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr, __xfrm_state_insert() 950 h = xfrm_src_hash(net, &x->id.daddr, &x->props.saddr, x->props.family); __xfrm_state_insert() 979 h = xfrm_dst_hash(net, &xnew->id.daddr, &xnew->props.saddr, reqid, family); __xfrm_state_bump_genids() 985 xfrm_addr_equal(&x->props.saddr, &xnew->props.saddr, family)) __xfrm_state_bump_genids() 1007 const xfrm_address_t *saddr, __find_acq_core() 1010 unsigned int h = xfrm_dst_hash(net, daddr, saddr, reqid, family); __find_acq_core() 1023 !xfrm_addr_equal(&x->props.saddr, saddr, family)) __find_acq_core() 1038 x->sel.saddr.a4 = saddr->a4; __find_acq_core() 1041 x->props.saddr.a4 = saddr->a4; __find_acq_core() 1047 x->sel.saddr.in6 = saddr->in6; __find_acq_core() 1050 x->props.saddr.in6 = saddr->in6; __find_acq_core() 1067 h = xfrm_src_hash(net, daddr, saddr, family); __find_acq_core() 1115 &x->id.daddr, &x->props.saddr, 0); xfrm_state_add() 1151 x->props.saddr = orig->props.saddr; xfrm_state_clone() 1238 !xfrm_addr_equal(&x->props.saddr, &m->old_saddr, xfrm_migrate_state_find() 1253 !xfrm_addr_equal(&x->props.saddr, &m->old_saddr, xfrm_migrate_state_find() 1277 memcpy(&xc->props.saddr, &m->new_saddr, sizeof(xc->props.saddr)); xfrm_state_migrate() 1406 const xfrm_address_t *daddr, const xfrm_address_t *saddr, xfrm_state_lookup_byaddr() 1412 x = __xfrm_state_lookup_byaddr(net, mark, daddr, saddr, proto, family); xfrm_state_lookup_byaddr() 1421 const xfrm_address_t *saddr, int create, unsigned short family) xfrm_find_acq() 1426 x = __find_acq_core(net, mark, family, mode, reqid, proto, daddr, saddr, create); xfrm_find_acq() 1606 return addr_match(&x->props.saddr, &filter->saddr, __xfrm_state_filter_match() 2148 &x->props.saddr.a4, &x->id.daddr.a4); xfrm_audit_helper_sainfo() 2152 x->props.saddr.a6, x->id.daddr.a6); xfrm_audit_helper_sainfo() 2169 &iph4->saddr, &iph4->daddr); xfrm_audit_helper_pktinfo() 2175 &iph6->saddr, &iph6->daddr, xfrm_audit_helper_pktinfo() 40 xfrm_dst_hash(struct net *net, const xfrm_address_t *daddr, const xfrm_address_t *saddr, u32 reqid, unsigned short family) xfrm_dst_hash() argument 49 xfrm_src_hash(struct net *net, const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family) xfrm_src_hash() argument 633 xfrm_init_tempstate(struct xfrm_state *x, const struct flowi *fl, const struct xfrm_tmpl *tmpl, const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family) xfrm_init_tempstate() argument 678 __xfrm_state_lookup_byaddr(struct net *net, u32 mark, const xfrm_address_t *daddr, const xfrm_address_t *saddr, u8 proto, unsigned short family) __xfrm_state_lookup_byaddr() argument 885 xfrm_stateonly_find(struct net *net, u32 mark, xfrm_address_t *daddr, xfrm_address_t *saddr, unsigned short family, u8 mode, u8 proto, u32 reqid) xfrm_stateonly_find() argument 1002 __find_acq_core(struct net *net, const struct xfrm_mark *m, unsigned short family, u8 mode, u32 reqid, u8 proto, const xfrm_address_t *daddr, const xfrm_address_t *saddr, int create) __find_acq_core() argument 1405 xfrm_state_lookup_byaddr(struct net *net, u32 mark, const xfrm_address_t *daddr, const xfrm_address_t *saddr, u8 proto, unsigned short family) xfrm_state_lookup_byaddr() argument 1419 xfrm_find_acq(struct net *net, const struct xfrm_mark *mark, u8 mode, u32 reqid, u8 proto, const xfrm_address_t *daddr, const xfrm_address_t *saddr, int create, unsigned short family) xfrm_find_acq() argument
|
H A D | xfrm_policy.c | 68 addr4_match(fl4->saddr, sel->saddr.a4, sel->prefixlen_s) && __xfrm4_selector_match() 81 addr_match(&fl6->saddr, &sel->saddr, sel->prefixlen_s) && __xfrm6_selector_match() 119 const xfrm_address_t *saddr, __xfrm_dst_lookup() 130 dst = afinfo->dst_lookup(net, tos, saddr, daddr); __xfrm_dst_lookup() 143 xfrm_address_t *saddr = &x->props.saddr; xfrm_dst_lookup() local 148 saddr = x->coaddr; xfrm_dst_lookup() 152 saddr = prev_saddr; xfrm_dst_lookup() 156 dst = __xfrm_dst_lookup(net, tos, saddr, daddr, family); xfrm_dst_lookup() 159 if (prev_saddr != saddr) xfrm_dst_lookup() 160 memcpy(prev_saddr, saddr, sizeof(*prev_saddr)); xfrm_dst_lookup() 394 const xfrm_address_t *saddr, policy_hash_direct() 403 hash = __addr_hash(daddr, saddr, family, hmask, dbits, sbits); policy_hash_direct() 425 h = __addr_hash(&pol->selector.daddr, &pol->selector.saddr, hlist_for_each_entry_safe() 1094 const xfrm_address_t *daddr, *saddr; xfrm_policy_lookup_bytype() local 1099 saddr = xfrm_flowi_saddr(fl, family); xfrm_policy_lookup_bytype() 1100 if (unlikely(!daddr || !saddr)) xfrm_policy_lookup_bytype() 1104 chain = policy_hash_direct(net, daddr, saddr, family, dir); xfrm_policy_lookup_bytype() 1402 xfrm_address_t *saddr = xfrm_flowi_saddr(fl, family); xfrm_tmpl_resolve_one() local 1408 xfrm_address_t *local = saddr; xfrm_tmpl_resolve_one() 1414 local = &tmpl->saddr; xfrm_tmpl_resolve_one() 1428 saddr = local; xfrm_tmpl_resolve_one() 1652 xfrm_address_t saddr, daddr; xfrm_bundle_create() local 1654 xfrm_flowi_addr_get(fl, &saddr, &daddr, family); xfrm_bundle_create() 1696 dst = xfrm_dst_lookup(xfrm[i], tos, &saddr, &daddr, xfrm_bundle_create() 3081 audit_log_format(audit_buf, " src=%pI4", &sel->saddr.a4); xfrm_audit_common_policyinfo() 3091 audit_log_format(audit_buf, " src=%pI6", sel->saddr.a6); xfrm_audit_common_policyinfo() 3141 xfrm_addr_equal(&sel_tgt->saddr, &sel_cmp->saddr, xfrm_migrate_selector_match() 3163 chain = policy_hash_direct(net, &sel->daddr, &sel->saddr, sel->family, dir); hlist_for_each_entry() 3201 xfrm_addr_equal(&t->saddr, &m->old_saddr, migrate_tmpl_match() 3244 memcpy(&pol->xfrm_vec[i].saddr, &mp->new_saddr, xfrm_policy_migrate() 3245 sizeof(pol->xfrm_vec[i].saddr)); xfrm_policy_migrate() 118 __xfrm_dst_lookup(struct net *net, int tos, const xfrm_address_t *saddr, const xfrm_address_t *daddr, int family) __xfrm_dst_lookup() argument 392 policy_hash_direct(struct net *net, const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family, int dir) policy_hash_direct() argument
|
/linux-4.1.27/net/ipv4/ |
H A D | xfrm4_state.c | 30 sel->saddr.a4 = fl4->saddr; __xfrm4_init_tempsel() 44 const xfrm_address_t *daddr, const xfrm_address_t *saddr) xfrm4_init_temprop() 49 x->props.saddr = tmpl->saddr; xfrm4_init_temprop() 50 if (x->props.saddr.a4 == 0) xfrm4_init_temprop() 51 x->props.saddr.a4 = saddr->a4; xfrm4_init_temprop() 43 xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, const xfrm_address_t *daddr, const xfrm_address_t *saddr) xfrm4_init_temprop() argument
|
H A D | netfilter.c | 26 __be32 saddr = iph->saddr; ip_route_me_harder() local 31 addr_type = inet_addr_type(net, saddr); ip_route_me_harder() 35 saddr = 0; ip_route_me_harder() 38 * packets with foreign saddr to appear on the NF_INET_LOCAL_OUT hook. ip_route_me_harder() 41 fl4.saddr = saddr; ip_route_me_harder() 87 __be32 saddr; member in struct:ip_rt_info 102 rt_info->saddr = iph->saddr; nf_ip_saveroute() 118 iph->saddr == rt_info->saddr)) nf_ip_reroute() 135 !csum_tcpudp_magic(iph->saddr, iph->daddr, nf_ip_checksum() 146 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, nf_ip_checksum() 168 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, nf_ip_checksum_partial()
|
H A D | datagram.c | 29 __be32 saddr; __ip4_datagram_connect() local 43 saddr = inet->inet_saddr; __ip4_datagram_connect() 47 if (!saddr) __ip4_datagram_connect() 48 saddr = inet->mc_addr; __ip4_datagram_connect() 51 rt = ip_route_connect(fl4, usin->sin_addr.s_addr, saddr, __ip4_datagram_connect() 68 inet->inet_saddr = fl4->saddr; /* Update source address */ __ip4_datagram_connect() 70 inet->inet_rcv_saddr = fl4->saddr; __ip4_datagram_connect()
|
H A D | xfrm4_policy.c | 23 const xfrm_address_t *saddr, __xfrm4_dst_lookup() 31 if (saddr) __xfrm4_dst_lookup() 32 fl4->saddr = saddr->a4; __xfrm4_dst_lookup() 42 const xfrm_address_t *saddr, xfrm4_dst_lookup() 47 return __xfrm4_dst_lookup(net, &fl4, tos, saddr, daddr); xfrm4_dst_lookup() 51 xfrm_address_t *saddr, xfrm_address_t *daddr) xfrm4_get_saddr() 60 saddr->a4 = fl4.saddr; xfrm4_get_saddr() 184 fl4->daddr = reverse ? iph->saddr : iph->daddr; _decode_session4() 185 fl4->saddr = reverse ? iph->daddr : iph->saddr; _decode_session4() 21 __xfrm4_dst_lookup(struct net *net, struct flowi4 *fl4, int tos, const xfrm_address_t *saddr, const xfrm_address_t *daddr) __xfrm4_dst_lookup() argument 41 xfrm4_dst_lookup(struct net *net, int tos, const xfrm_address_t *saddr, const xfrm_address_t *daddr) xfrm4_dst_lookup() argument 50 xfrm4_get_saddr(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr) xfrm4_get_saddr() argument
|
H A D | xfrm4_mode_beet.c | 78 top_iph->saddr = x->props.saddr.a4; xfrm4_beet_output() 122 iph->saddr = x->sel.saddr.a4; xfrm4_beet_input()
|
H A D | tcp_metrics.c | 25 static struct tcp_metrics_block *__tcp_get_metrics(const struct inetpeer_addr *saddr, 156 struct inetpeer_addr *saddr, tcpm_new() 170 tm = __tcp_get_metrics(saddr, daddr, net, hash); tcpm_new() 196 tm->tcpm_saddr = *saddr; tcpm_new() 220 static struct tcp_metrics_block *__tcp_get_metrics(const struct inetpeer_addr *saddr, __tcp_get_metrics() argument 229 if (addr_same(&tm->tcpm_saddr, saddr) && __tcp_get_metrics() 242 struct inetpeer_addr saddr, daddr; __tcp_get_metrics_req() local 246 saddr.family = req->rsk_ops->family; __tcp_get_metrics_req() 250 saddr.addr.a4 = inet_rsk(req)->ir_loc_addr; __tcp_get_metrics_req() 256 saddr.addr.in6 = inet_rsk(req)->ir_v6_loc_addr; __tcp_get_metrics_req() 271 if (addr_same(&tm->tcpm_saddr, &saddr) && __tcp_get_metrics_req() 283 struct inetpeer_addr saddr, daddr; __tcp_get_metrics_tw() local 288 saddr.family = AF_INET; __tcp_get_metrics_tw() 289 saddr.addr.a4 = tw->tw_rcv_saddr; __tcp_get_metrics_tw() 297 saddr.family = AF_INET; __tcp_get_metrics_tw() 298 saddr.addr.a4 = tw->tw_rcv_saddr; __tcp_get_metrics_tw() 303 saddr.family = AF_INET6; __tcp_get_metrics_tw() 304 saddr.addr.in6 = tw->tw_v6_rcv_saddr; __tcp_get_metrics_tw() 320 if (addr_same(&tm->tcpm_saddr, &saddr) && __tcp_get_metrics_tw() 333 struct inetpeer_addr saddr, daddr; tcp_get_metrics() local 338 saddr.family = AF_INET; tcp_get_metrics() 339 saddr.addr.a4 = inet_sk(sk)->inet_saddr; tcp_get_metrics() 347 saddr.family = AF_INET; tcp_get_metrics() 348 saddr.addr.a4 = inet_sk(sk)->inet_saddr; tcp_get_metrics() 353 saddr.family = AF_INET6; tcp_get_metrics() 354 saddr.addr.in6 = sk->sk_v6_rcv_saddr; tcp_get_metrics() 368 tm = __tcp_get_metrics(&saddr, &daddr, net, hash); tcp_get_metrics() 372 tm = tcpm_new(dst, &saddr, &daddr, hash); tcp_get_metrics() 996 struct inetpeer_addr saddr, daddr; tcp_metrics_nl_cmd_get() local 1008 ret = parse_nl_saddr(info, &saddr); tcp_metrics_nl_cmd_get() 1028 (!src || addr_same(&tm->tcpm_saddr, &saddr)) && tcp_metrics_nl_cmd_get() 1077 struct inetpeer_addr saddr, daddr; tcp_metrics_nl_cmd_del() local 1090 ret = parse_nl_saddr(info, &saddr); tcp_metrics_nl_cmd_del() 1101 (!src || addr_same(&tm->tcpm_saddr, &saddr)) && tcp_metrics_nl_cmd_del() 155 tcpm_new(struct dst_entry *dst, struct inetpeer_addr *saddr, struct inetpeer_addr *daddr, unsigned int hash) tcpm_new() argument
|
H A D | route.c | 494 (__force u32)iph->saddr, __ip_select_ident() 518 iph->daddr, iph->saddr, 0, 0); __build_flow_key() 707 __be32 old_gw = ip_hdr(skb)->saddr; __ip_do_redirect() 772 __be32 saddr = iph->saddr; __ip_do_redirect() local 777 &saddr, &daddr); __ip_do_redirect() 851 peer = inet_getpeer_v4(net->ipv4.peers, ip_hdr(skb)->saddr, 1); ip_rt_send_redirect() 888 &ip_hdr(skb)->saddr, inet_iif(skb), ip_rt_send_redirect() 940 peer = inet_getpeer_v4(net->ipv4.peers, ip_hdr(skb)->saddr, 1); ip_error() 1154 __func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, ip_rt_bug() 1175 src = ip_hdr(skb)->saddr; ip_rt_get_source() 1185 fl4.saddr = iph->saddr; ip_rt_get_source() 1445 static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, ip_route_input_mc() argument 1458 if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr) || ip_route_input_mc() 1463 if (ipv4_is_loopback(saddr)) ip_route_input_mc() 1466 if (ipv4_is_zeronet(saddr)) { ip_route_input_mc() 1470 err = fib_validate_source(skb, saddr, 0, tos, 0, dev, ip_route_input_mc() 1521 __be32 saddr) ip_handle_martian_source() 1531 &daddr, &saddr, dev->name); ip_handle_martian_source() 1576 __be32 daddr, __be32 saddr, u32 tos) __mkroute_input() 1593 err = fib_validate_source(skb, saddr, daddr, tos, FIB_RES_OIF(*res), __mkroute_input() 1597 saddr); __mkroute_input() 1606 inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) __mkroute_input() 1680 __be32 daddr, __be32 saddr, u32 tos) ip_mkroute_input() 1688 return __mkroute_input(skb, res, in_dev, daddr, saddr, tos); ip_mkroute_input() 1702 static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, ip_route_input_slow() argument 1724 if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr)) ip_route_input_slow() 1728 if (ipv4_is_lbcast(daddr) || (saddr == 0 && daddr == 0)) ip_route_input_slow() 1734 if (ipv4_is_zeronet(saddr)) ip_route_input_slow() 1741 * and call it once if daddr or/and saddr are loopback addresses ip_route_input_slow() 1746 } else if (ipv4_is_loopback(saddr)) { ip_route_input_slow() 1760 fl4.saddr = saddr; ip_route_input_slow() 1772 err = fib_validate_source(skb, saddr, daddr, tos, ip_route_input_slow() 1786 err = ip_mkroute_input(skb, &res, &fl4, in_dev, daddr, saddr, tos); ip_route_input_slow() 1793 if (!ipv4_is_zeronet(saddr)) { ip_route_input_slow() 1794 err = fib_validate_source(skb, saddr, 0, tos, 0, dev, ip_route_input_slow() 1867 &daddr, &saddr, dev->name); ip_route_input_slow() 1881 ip_handle_martian_source(dev, in_dev, skb, daddr, saddr); ip_route_input_slow() 1885 int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr, ip_route_input_noref() argument 1907 int our = ip_check_mc_rcu(in_dev, daddr, saddr, ip_route_input_noref() 1916 int res = ip_route_input_mc(skb, daddr, saddr, ip_route_input_noref() 1925 res = ip_route_input_slow(skb, daddr, saddr, tos, dev); ip_route_input_noref() 1949 if (ipv4_is_loopback(fl4->saddr) && !(dev_out->flags & IFF_LOOPBACK)) __mkroute_output() 1968 if (!ip_check_mc_rcu(in_dev, fl4->daddr, fl4->saddr, __mkroute_output() 2088 if (fl4->saddr) { __ip_route_output_key() 2090 if (ipv4_is_multicast(fl4->saddr) || __ip_route_output_key() 2091 ipv4_is_lbcast(fl4->saddr) || __ip_route_output_key() 2092 ipv4_is_zeronet(fl4->saddr)) __ip_route_output_key() 2097 1. ip_dev_find(net, saddr) can return wrong iface, if saddr __ip_route_output_key() 2099 2. Moreover, we are allowed to send packets with saddr __ip_route_output_key() 2106 /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ __ip_route_output_key() 2107 dev_out = __ip_dev_find(net, fl4->saddr, false); __ip_route_output_key() 2131 /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ __ip_route_output_key() 2132 if (!__ip_dev_find(net, fl4->saddr, false)) __ip_route_output_key() 2151 if (!fl4->saddr) __ip_route_output_key() 2152 fl4->saddr = inet_select_addr(dev_out, 0, __ip_route_output_key() 2156 if (!fl4->saddr) { __ip_route_output_key() 2158 fl4->saddr = inet_select_addr(dev_out, 0, __ip_route_output_key() 2161 fl4->saddr = inet_select_addr(dev_out, 0, __ip_route_output_key() 2167 fl4->daddr = fl4->saddr; __ip_route_output_key() 2169 fl4->daddr = fl4->saddr = htonl(INADDR_LOOPBACK); __ip_route_output_key() 2199 if (fl4->saddr == 0) __ip_route_output_key() 2200 fl4->saddr = inet_select_addr(dev_out, 0, __ip_route_output_key() 2210 if (!fl4->saddr) { __ip_route_output_key() 2212 fl4->saddr = res.fi->fib_prefsrc; __ip_route_output_key() 2214 fl4->saddr = fl4->daddr; __ip_route_output_key() 2232 if (!fl4->saddr) __ip_route_output_key() 2233 fl4->saddr = FIB_RES_PREFSRC(net, res); __ip_route_output_key() 2389 fl4->saddr != src) { rt_fill_info() 2390 if (nla_put_in_addr(skb, RTA_PREFSRC, fl4->saddr)) rt_fill_info() 2424 fl4->saddr, fl4->daddr, rt_fill_info() 2497 fl4.saddr = src; inet_rtm_getroute() 1517 ip_handle_martian_source(struct net_device *dev, struct in_device *in_dev, struct sk_buff *skb, __be32 daddr, __be32 saddr) ip_handle_martian_source() argument 1573 __mkroute_input(struct sk_buff *skb, const struct fib_result *res, struct in_device *in_dev, __be32 daddr, __be32 saddr, u32 tos) __mkroute_input() argument 1676 ip_mkroute_input(struct sk_buff *skb, struct fib_result *res, const struct flowi4 *fl4, struct in_device *in_dev, __be32 daddr, __be32 saddr, u32 tos) ip_mkroute_input() argument
|
H A D | syncookies.c | 56 static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, cookie_hash() argument 65 tmp[0] = (__force u32)saddr; cookie_hash() 108 static __u32 secure_tcp_syn_cookie(__be32 saddr, __be32 daddr, __be16 sport, secure_tcp_syn_cookie() argument 114 * HASH(sec1,saddr,sport,daddr,dport,sec1) + sseq + (count * 2^24) secure_tcp_syn_cookie() 115 * + (HASH(sec2,saddr,sport,daddr,dport,count,sec2) % 2^24). secure_tcp_syn_cookie() 122 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + secure_tcp_syn_cookie() 124 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) secure_tcp_syn_cookie() 137 static __u32 check_tcp_syn_cookie(__u32 cookie, __be32 saddr, __be32 daddr, check_tcp_syn_cookie() argument 143 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; check_tcp_syn_cookie() 151 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) check_tcp_syn_cookie() 189 return secure_tcp_syn_cookie(iph->saddr, iph->daddr, __cookie_v4_init_sequence() 215 __u32 mssind = check_tcp_syn_cookie(cookie, iph->saddr, iph->daddr, __cookie_v4_check() 341 sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr); cookie_v4_check()
|
H A D | ip_tunnel.c | 73 struct dst_entry *dst, __be32 saddr) __tunnel_dst_set() 80 idst->saddr = saddr; __tunnel_dst_set() 84 struct dst_entry *dst, __be32 saddr) tunnel_dst_set() 86 __tunnel_dst_set(raw_cpu_ptr(t->dst_cache), dst, saddr); tunnel_dst_set() 104 u32 cookie, __be32 *saddr) tunnel_rtable_get() 116 *saddr = idst->saddr; tunnel_rtable_get() 164 if (local != t->parms.iph.saddr || hlist_for_each_entry_rcu() 180 t->parms.iph.saddr != 0 || hlist_for_each_entry_rcu() 197 if ((local != t->parms.iph.saddr || t->parms.iph.daddr != 0) && hlist_for_each_entry_rcu() 218 t->parms.iph.saddr != 0 || hlist_for_each_entry_rcu() 277 __be32 local = parms->iph.saddr; ip_tunnel_find() 285 if (local == t->parms.iph.saddr && hlist_for_each_entry_rcu() 343 __be32 daddr, __be32 saddr, init_tunnel_flow() 349 fl4->saddr = saddr; init_tunnel_flow() 372 iph->saddr, tunnel->parms.o_key, ip_tunnel_bind_dev() 378 tunnel_dst_set(tunnel, &rt->dst, fl4.saddr); ip_tunnel_bind_dev() 458 &iph->saddr, iph->tos); ip_tunnel_rcv() 717 init_tunnel_flow(&fl4, protocol, dst, tnl_params->saddr, ip_tunnel_xmit() 723 rt = connected ? tunnel_rtable_get(tunnel, 0, &fl4.saddr) : NULL; ip_tunnel_xmit() 733 tunnel_dst_set(tunnel, &rt->dst, fl4.saddr); ip_tunnel_xmit() 787 err = iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, ip_tunnel_xmit() 810 t->parms.iph.saddr = p->iph.saddr; ip_tunnel_update() 815 memcpy(dev->dev_addr, &p->iph.saddr, 4); ip_tunnel_update() 72 __tunnel_dst_set(struct ip_tunnel_dst *idst, struct dst_entry *dst, __be32 saddr) __tunnel_dst_set() argument 83 tunnel_dst_set(struct ip_tunnel *t, struct dst_entry *dst, __be32 saddr) tunnel_dst_set() argument 103 tunnel_rtable_get(struct ip_tunnel *t, u32 cookie, __be32 *saddr) tunnel_rtable_get() argument 341 init_tunnel_flow(struct flowi4 *fl4, int proto, __be32 daddr, __be32 saddr, __be32 key, __u8 tos, int oif) init_tunnel_flow() argument
|
H A D | ipcomp.c | 70 t->id.spi = x->props.saddr.a4; ipcomp_tunnel_create() 75 t->props.saddr.a4 = x->props.saddr.a4; ipcomp_tunnel_create() 106 x->props.saddr.a4, IPPROTO_IPIP, AF_INET); ipcomp_tunnel_attach()
|
H A D | inet_hashtables.c | 207 const __be32 saddr, __be16 sport, __inet_lookup_listener() 230 saddr, sport); __inet_lookup_listener() 284 const __be32 saddr, const __be16 sport, __inet_lookup_established() 288 INET_ADDR_COOKIE(acookie, saddr, daddr); __inet_lookup_established() 295 unsigned int hash = inet_ehashfn(net, daddr, hnum, saddr, sport); __inet_lookup_established() 305 saddr, daddr, ports, dif))) { __inet_lookup_established() 309 saddr, daddr, ports, dif))) { __inet_lookup_established() 339 __be32 saddr = inet->inet_daddr; __inet_check_established() local 341 INET_ADDR_COOKIE(acookie, saddr, daddr); __inet_check_established() 345 saddr, inet->inet_dport); __inet_check_established() 360 saddr, daddr, ports, dif))) { __inet_check_established() 205 __inet_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, __be16 sport, const __be32 daddr, const unsigned short hnum, const int dif) __inet_lookup_listener() argument 282 __inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const u16 hnum, const int dif) __inet_lookup_established() argument
|
H A D | ip_vti.c | 62 iph->saddr, iph->daddr, 0); vti_input() 134 xfrm_address_t *saddr = (xfrm_address_t *)&src; vti_state_check() local 144 return xfrm_addr_equal(saddr, &x->props.saddr, AF_INET); vti_state_check() 146 if (!xfrm_state_addr_check(x, daddr, saddr, AF_INET)) vti_state_check() 173 if (!vti_state_check(dst->xfrm, parms->iph.daddr, parms->iph.saddr)) { vti_xmit() 260 iph->daddr, iph->saddr, 0); vti4_err() 365 memcpy(dev->dev_addr, &iph->saddr, 4); vti_tunnel_init() 465 parms->iph.saddr = nla_get_in_addr(data[IFLA_VTI_LOCAL]); vti_netlink_parms() 514 nla_put_in_addr(skb, IFLA_VTI_LOCAL, p->iph.saddr); vti_fill_info() 524 [IFLA_VTI_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) },
|
H A D | xfrm4_mode_tunnel.c | 64 top_iph->saddr = x->props.saddr.a4; xfrm4_mode_tunnel_output()
|
H A D | ip_gre.c | 183 iph->daddr, iph->saddr, tpi->key); ipgre_err() 217 iph->saddr, iph->daddr, tpi->key); ipgre_rcv() 371 const void *daddr, const void *saddr, unsigned int len) ipgre_header() 385 if (saddr) ipgre_header() 386 memcpy(&iph->saddr, saddr, 4); ipgre_header() 398 memcpy(haddr, &iph->saddr, 4); ipgre_header_parse() 418 t->parms.iph.saddr, ipgre_open() 511 memcpy(dev->dev_addr, &iph->saddr, 4); ipgre_tunnel_init() 521 if (!iph->saddr) ipgre_tunnel_init() 625 parms->iph.saddr = nla_get_in_addr(data[IFLA_GRE_LOCAL]); ipgre_netlink_parms() 781 nla_put_in_addr(skb, IFLA_GRE_LOCAL, p->iph.saddr) || ipgre_fill_info() 811 [IFLA_GRE_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) }, 369 ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) ipgre_header() argument
|
H A D | icmp.c | 395 __be32 daddr, saddr; icmp_reply() local 410 daddr = ipc.addr = ip_hdr(skb)->saddr; icmp_reply() 411 saddr = fib_compute_spec_dst(skb); icmp_reply() 424 fl4.saddr = saddr; icmp_reply() 444 __be32 saddr, u8 tos, u32 mark, icmp_route_lookup() 454 param->replyopts.opt.opt.faddr : iph->saddr); icmp_route_lookup() 455 fl4->saddr = saddr; icmp_route_lookup() 483 if (inet_addr_type(net, fl4_dec.saddr) == RTN_LOCAL) { icmp_route_lookup() 491 fl4_2.daddr = fl4_dec.saddr; icmp_route_lookup() 499 err = ip_route_input(skb_in, fl4_dec.daddr, fl4_dec.saddr, icmp_route_lookup() 552 __be32 saddr; icmp_send() local 637 saddr = iph->daddr; icmp_send() 647 saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK); icmp_send() 649 saddr = 0; icmp_send() 674 ipc.addr = iph->saddr; icmp_send() 680 rt = icmp_route_lookup(net, &fl4, skb_in, iph, saddr, tos, mark, icmp_send() 833 &ip_hdr(skb)->saddr, icmp_unreach() 440 icmp_route_lookup(struct net *net, struct flowi4 *fl4, struct sk_buff *skb_in, const struct iphdr *iph, __be32 saddr, u8 tos, u32 mark, int type, int code, struct icmp_bxm *param) icmp_route_lookup() argument
|
H A D | ip_fragment.c | 73 __be32 saddr; member in struct:ipq 103 static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot) ipqhashfn() argument 107 (__force u32)saddr, (__force u32)daddr, ipqhashfn() 116 return ipqhashfn(ipq->id, ipq->saddr, ipq->daddr, ipq->protocol); ip4_hashfn() 126 qp->saddr == arg->iph->saddr && ip4_frag_match() 144 qp->saddr = arg->iph->saddr; ip4_frag_init() 148 inet_getpeer_v4(net->ipv4.peers, arg->iph->saddr, 1) : NULL; ip4_frag_init() 212 err = ip_route_input_noref(head, iph->daddr, iph->saddr, ip_expire() 248 hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol); ip_find() 629 net_info_ratelimited("Oversized IP packet from %pI4\n", &qp->saddr); ip_frag_reasm()
|
H A D | tcp_ipv4.c | 94 __be32 daddr, __be32 saddr, const struct tcphdr *th); 103 ip_hdr(skb)->saddr, tcp_v4_init_sequence() 191 inet->inet_saddr = fl4->saddr; tcp_v4_connect() 375 th->dest, iph->saddr, ntohs(th->source), tcp_v4_err() 541 void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr) __tcp_v4_send_check() argument 546 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); __tcp_v4_send_check() 550 th->check = tcp_v4_check(skb->len, saddr, daddr, __tcp_v4_send_check() 639 &tcp_hashinfo, ip_hdr(skb)->saddr, tcp_v4_send_reset() 647 &ip_hdr(skb)->saddr, AF_INET); tcp_v4_send_reset() 656 &ip_hdr(skb)->saddr, tcp_v4_send_reset() 670 key, ip_hdr(skb)->saddr, tcp_v4_send_reset() 675 ip_hdr(skb)->saddr, /* XXX */ tcp_v4_send_reset() 689 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, tcp_v4_send_reset() 760 key, ip_hdr(skb)->saddr, tcp_v4_send_ack() 766 ip_hdr(skb)->saddr, /* XXX */ tcp_v4_send_ack() 774 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, tcp_v4_send_ack() 1017 __be32 daddr, __be32 saddr, int nbytes) tcp_v4_md5_hash_pseudoheader() 1029 bp->saddr = saddr; tcp_v4_md5_hash_pseudoheader() 1040 __be32 daddr, __be32 saddr, const struct tcphdr *th) tcp_v4_md5_hash_hdr() 1052 if (tcp_v4_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) tcp_v4_md5_hash_hdr() 1078 __be32 saddr, daddr; tcp_v4_md5_hash_skb() local 1081 saddr = sk->sk_rcv_saddr; tcp_v4_md5_hash_skb() 1085 saddr = iph->saddr; tcp_v4_md5_hash_skb() 1097 if (tcp_v4_md5_hash_pseudoheader(hp, daddr, saddr, skb->len)) tcp_v4_md5_hash_skb() 1138 hash_expected = tcp_md5_do_lookup(sk, (union tcp_md5_addr *)&iph->saddr, tcp_v4_inbound_md5_hash() 1165 &iph->saddr, ntohs(th->source), tcp_v4_inbound_md5_hash() 1181 sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr); tcp_v4_init_req() 1352 req = inet_csk_search_req(sk, th->source, iph->saddr, iph->daddr); tcp_v4_hnd_req() 1360 nsk = inet_lookup_established(sock_net(sk), &tcp_hashinfo, iph->saddr, tcp_v4_hnd_req() 1470 iph->saddr, th->source, tcp_v4_early_demux() 1689 iph->saddr, th->source, tcp_v4_rcv() 1016 tcp_v4_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp, __be32 daddr, __be32 saddr, int nbytes) tcp_v4_md5_hash_pseudoheader() argument 1039 tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key, __be32 daddr, __be32 saddr, const struct tcphdr *th) tcp_v4_md5_hash_hdr() argument
|
H A D | udp.c | 322 static u32 udp4_portaddr_hash(const struct net *net, __be32 saddr, udp4_portaddr_hash() argument 325 return jhash_1word((__force u32)saddr, net_hash_mix(net)) ^ port; udp4_portaddr_hash() 341 __be32 saddr, unsigned short hnum, __be16 sport, compute_score() 362 if (inet->inet_daddr != saddr) compute_score() 386 __be32 saddr, __be16 sport, compute_score2() 405 if (inet->inet_daddr != saddr) compute_score2() 439 __be32 saddr, __be16 sport, udp4_lib_lookup2() 452 score = compute_score2(sk, net, saddr, sport, udp4_lib_lookup2() 460 saddr, sport); udp4_lib_lookup2() 480 else if (unlikely(compute_score2(result, net, saddr, sport, udp4_lib_lookup2() 492 struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __udp4_lib_lookup() argument 512 result = udp4_lib_lookup2(net, saddr, sport, __udp4_lib_lookup() 522 result = udp4_lib_lookup2(net, saddr, sport, __udp4_lib_lookup() 533 score = compute_score(sk, net, saddr, hnum, sport, __udp4_lib_lookup() 541 saddr, sport); __udp4_lib_lookup() 562 else if (unlikely(compute_score(result, net, saddr, hnum, sport, __udp4_lib_lookup() 579 return __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport, __udp4_lib_lookup_skb() 584 struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, udp4_lib_lookup() argument 587 return __udp4_lib_lookup(net, saddr, sport, daddr, dport, dif, &udp_table); udp4_lib_lookup() 635 iph->saddr, uh->source, skb->dev->ifindex, udptable); __udp4_lib_err() 763 __be32 saddr, __be32 daddr, int len) udp_set_csum() 770 uh->check = ~udp_v4_check(len, saddr, daddr, 0); udp_set_csum() 779 uh->check = ~udp_v4_check(len, saddr, daddr, 0); udp_set_csum() 787 uh->check = udp_v4_check(len, saddr, daddr, csum); udp_set_csum() 826 udp4_hwcsum(skb, fl4->saddr, fl4->daddr); udp_send_skb() 833 uh->check = csum_tcpudp_magic(fl4->saddr, fl4->daddr, len, udp_send_skb() 887 __be32 daddr, faddr, saddr; udp_sendmsg() local 987 saddr = ipc.addr; udp_sendmsg() 1007 if (!saddr) udp_sendmsg() 1008 saddr = inet->mc_addr; udp_sendmsg() 1023 faddr, saddr, dport, inet->inet_sport); udp_sendmsg() 1047 saddr = fl4->saddr; udp_sendmsg() 1077 fl4->saddr = saddr; udp_sendmsg() 1327 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; udp_recvmsg() 1657 __be32 saddr, __be32 daddr, __udp4_lib_mcast_deliver() 1683 uh->source, saddr, __udp4_lib_mcast_deliver() 1751 __be32 saddr, daddr; __udp4_lib_rcv() local 1762 saddr = ip_hdr(skb)->saddr; __udp4_lib_rcv() 1798 saddr, daddr, udptable, proto); __udp4_lib_rcv() 1840 &saddr, ntohs(uh->source), __udp4_lib_rcv() 1852 &saddr, ntohs(uh->source), &daddr, ntohs(uh->dest), __udp4_lib_rcv() 1982 ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr, udp_v4_early_demux() 1987 uh->source, iph->saddr, dif); udp_v4_early_demux() 1990 uh->source, iph->saddr, dif); udp_v4_early_demux() 340 compute_score(struct sock *sk, struct net *net, __be32 saddr, unsigned short hnum, __be16 sport, __be32 daddr, __be16 dport, int dif) compute_score() argument 385 compute_score2(struct sock *sk, struct net *net, __be32 saddr, __be16 sport, __be32 daddr, unsigned int hnum, int dif) compute_score2() argument 438 udp4_lib_lookup2(struct net *net, __be32 saddr, __be16 sport, __be32 daddr, unsigned int hnum, int dif, struct udp_hslot *hslot2, unsigned int slot2) udp4_lib_lookup2() argument 762 udp_set_csum(bool nocheck, struct sk_buff *skb, __be32 saddr, __be32 daddr, int len) udp_set_csum() argument 1655 __udp4_lib_mcast_deliver(struct net *net, struct sk_buff *skb, struct udphdr *uh, __be32 saddr, __be32 daddr, struct udp_table *udptable, int proto) __udp4_lib_mcast_deliver() argument
|
H A D | inet_lro.c | 124 tcph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, lro_update_tcp_ip_header() 139 tcp_ps_hdr_csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, lro_tcp_data_csum() 238 if ((lro_desc->iph->saddr != iph->saddr) || lro_check_tcp_conn()
|
H A D | ping.c | 379 static void ping_set_saddr(struct sock *sk, struct sockaddr *saddr) ping_set_saddr() argument 381 if (saddr->sa_family == AF_INET) { ping_set_saddr() 383 struct sockaddr_in *addr = (struct sockaddr_in *) saddr; ping_set_saddr() 386 } else if (saddr->sa_family == AF_INET6) { ping_set_saddr() 387 struct sockaddr_in6 *addr = (struct sockaddr_in6 *) saddr; ping_set_saddr() 389 sk->sk_v6_rcv_saddr = np->saddr = addr->sin6_addr; ping_set_saddr() 404 memset(&np->saddr, 0, sizeof(np->saddr)); ping_clear_saddr() 707 __be32 saddr, daddr, faddr; ping_v4_sendmsg() local 768 saddr = ipc.addr; ping_v4_sendmsg() 786 if (!saddr) ping_v4_sendmsg() 787 saddr = inet->mc_addr; ping_v4_sendmsg() 793 inet_sk_flowi_flags(sk), faddr, saddr, 0, 0); ping_v4_sendmsg() 895 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; ping_recvmsg() 912 sin6->sin6_addr = ip6->saddr; ping_recvmsg()
|
H A D | arp.c | 296 __be32 saddr = 0; arp_solicit() local 313 ip_hdr(skb)->saddr) == RTN_LOCAL) arp_solicit() 314 saddr = ip_hdr(skb)->saddr; arp_solicit() 316 case 1: /* Restrict announcements of saddr in same subnet */ arp_solicit() 319 saddr = ip_hdr(skb)->saddr; arp_solicit() 320 if (inet_addr_type(dev_net(dev), saddr) == RTN_LOCAL) { arp_solicit() 321 /* saddr should be known to target */ arp_solicit() 322 if (inet_addr_onlink(in_dev, target, saddr)) arp_solicit() 325 saddr = 0; arp_solicit() 332 if (!saddr) arp_solicit() 333 saddr = inet_select_addr(dev, target, RT_SCOPE_LINK); arp_solicit() 349 arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr, arp_solicit()
|
H A D | raw.c | 182 iph->saddr, iph->daddr, raw_v4_input() 188 ip_mc_sf_allow(sk, iph->daddr, iph->saddr, raw_v4_input() 197 iph->saddr, iph->daddr, raw_v4_input() 300 iph->daddr, iph->saddr, raw_icmp_error() 401 if (!iph->saddr) raw_send_hdrinc() 402 iph->saddr = fl4->saddr; raw_send_hdrinc() 491 __be32 saddr; raw_sendmsg() local 554 saddr = ipc.addr; raw_sendmsg() 590 if (!saddr) raw_sendmsg() 591 saddr = inet->mc_addr; raw_sendmsg() 600 daddr, saddr, 0, 0); raw_sendmsg() 748 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; raw_recvmsg()
|
H A D | xfrm4_tunnel.c | 55 return xfrm4_rcv_spi(skb, IPPROTO_IPIP, ip_hdr(skb)->saddr); xfrm_tunnel_rcv()
|
H A D | fib_rules.c | 139 __be32 saddr = fl4->saddr; fib4_rule_match() local 141 if (((saddr ^ r->src) & r->srcmask) || fib4_rule_match()
|
/linux-4.1.27/net/ipv6/ |
H A D | ip6_checksum.c | 7 __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 18 sum += (__force u32)saddr->s6_addr32[0]; csum_ipv6_magic() 19 carry = (sum < (__force u32)saddr->s6_addr32[0]); csum_ipv6_magic() 22 sum += (__force u32)saddr->s6_addr32[1]; csum_ipv6_magic() 23 carry = (sum < (__force u32)saddr->s6_addr32[1]); csum_ipv6_magic() 26 sum += (__force u32)saddr->s6_addr32[2]; csum_ipv6_magic() 27 carry = (sum < (__force u32)saddr->s6_addr32[2]); csum_ipv6_magic() 30 sum += (__force u32)saddr->s6_addr32[3]; csum_ipv6_magic() 31 carry = (sum < (__force u32)saddr->s6_addr32[3]); csum_ipv6_magic() 92 const struct in6_addr *saddr, udp6_set_csum() 100 uh->check = ~udp_v6_check(len, saddr, daddr, 0); udp6_set_csum() 109 uh->check = ~udp_v6_check(len, saddr, daddr, 0); udp6_set_csum() 117 uh->check = udp_v6_check(len, saddr, daddr, csum); udp6_set_csum() 91 udp6_set_csum(bool nocheck, struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr, int len) udp6_set_csum() argument
|
H A D | xfrm6_tunnel.c | 87 static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) __xfrm6_tunnel_spi_lookup() argument 93 &xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)], __xfrm6_tunnel_spi_lookup() 95 if (xfrm6_addr_equal(&x6spi->addr, saddr)) __xfrm6_tunnel_spi_lookup() 102 __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) xfrm6_tunnel_spi_lookup() argument 108 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); xfrm6_tunnel_spi_lookup() 130 static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) __xfrm6_tunnel_alloc_spi() argument 161 memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); __xfrm6_tunnel_alloc_spi() 167 index = xfrm6_tunnel_spi_hash_byaddr(saddr); __xfrm6_tunnel_alloc_spi() 173 __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) xfrm6_tunnel_alloc_spi() argument 179 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); xfrm6_tunnel_alloc_spi() 184 spi = __xfrm6_tunnel_alloc_spi(net, saddr); xfrm6_tunnel_alloc_spi() 197 static void xfrm6_tunnel_free_spi(struct net *net, xfrm_address_t *saddr) xfrm6_tunnel_free_spi() argument 206 &xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)], xfrm6_tunnel_free_spi() 209 if (xfrm6_addr_equal(&x6spi->addr, saddr)) { xfrm6_tunnel_free_spi() 238 spi = xfrm6_tunnel_spi_lookup(net, (const xfrm_address_t *)&iph->saddr); xfrm6_tunnel_rcv() 300 xfrm6_tunnel_free_spi(net, (xfrm_address_t *)&x->props.saddr); xfrm6_tunnel_destroy()
|
H A D | netfilter.c | 31 .saddr = iph->saddr, ip6_route_me_harder() 78 struct in6_addr saddr; member in struct:ip6_rt_info 91 rt_info->saddr = iph->saddr; nf_ip6_saveroute() 104 !ipv6_addr_equal(&iph->saddr, &rt_info->saddr) || nf_ip6_reroute() 143 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, nf_ip6_checksum() 154 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, nf_ip6_checksum() 181 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, nf_ip6_checksum_partial()
|
H A D | xfrm6_state.c | 31 *(struct in6_addr *)&sel->saddr = fl6->saddr; __xfrm6_init_tempsel() 45 const xfrm_address_t *daddr, const xfrm_address_t *saddr) xfrm6_init_temprop() 50 memcpy(&x->props.saddr, &tmpl->saddr, sizeof(x->props.saddr)); xfrm6_init_temprop() 51 if (ipv6_addr_any((struct in6_addr *)&x->props.saddr)) xfrm6_init_temprop() 52 memcpy(&x->props.saddr, saddr, sizeof(x->props.saddr)); xfrm6_init_temprop() 44 xfrm6_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, const xfrm_address_t *daddr, const xfrm_address_t *saddr) xfrm6_init_temprop() argument
|
H A D | ip6_udp_tunnel.c | 67 struct net_device *dev, struct in6_addr *saddr, udp_tunnel6_xmit_skb() 89 udp6_set_csum(nocheck, skb, saddr, daddr, skb->len); udp_tunnel6_xmit_skb() 99 ip6h->saddr = *saddr; udp_tunnel6_xmit_skb() 65 udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, struct sk_buff *skb, struct net_device *dev, struct in6_addr *saddr, struct in6_addr *daddr, __u8 prio, __u8 ttl, __be16 src_port, __be16 dst_port, bool nocheck) udp_tunnel6_xmit_skb() argument
|
H A D | syncookies.c | 64 static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr, cookie_hash() argument 79 memcpy(tmp, saddr, 16); cookie_hash() 88 static __u32 secure_tcp_syn_cookie(const struct in6_addr *saddr, secure_tcp_syn_cookie() argument 94 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + secure_tcp_syn_cookie() 96 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) secure_tcp_syn_cookie() 100 static __u32 check_tcp_syn_cookie(__u32 cookie, const struct in6_addr *saddr, check_tcp_syn_cookie() argument 106 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; check_tcp_syn_cookie() 113 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) check_tcp_syn_cookie() 129 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, __cookie_v6_init_sequence() 149 __u32 mssind = check_tcp_syn_cookie(cookie, &iph->saddr, &iph->daddr, __cookie_v6_check() 207 ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; cookie_v6_check() 246 fl6.saddr = ireq->ir_v6_loc_addr; cookie_v6_check()
|
H A D | inet6_hashtables.c | 53 const struct in6_addr *saddr, __inet6_lookup_established() 65 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); __inet6_lookup_established() 75 if (!INET6_MATCH(sk, net, saddr, daddr, ports, dif)) __inet6_lookup_established() 80 if (unlikely(!INET6_MATCH(sk, net, saddr, daddr, ports, dif))) { __inet6_lookup_established() 122 struct inet_hashinfo *hashinfo, const struct in6_addr *saddr, inet6_lookup_listener() 146 saddr, sport); inet6_lookup_listener() 178 const struct in6_addr *saddr, const __be16 sport, inet6_lookup() 185 sk = __inet6_lookup(net, hashinfo, saddr, sport, daddr, ntohs(dport), dif); inet6_lookup() 199 const struct in6_addr *saddr = &sk->sk_v6_daddr; __inet6_check_established() local 203 const unsigned int hash = inet6_ehashfn(net, daddr, lport, saddr, __inet6_check_established() 218 if (likely(INET6_MATCH(sk2, net, saddr, daddr, ports, dif))) { __inet6_check_established() 51 __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) __inet6_lookup_established() argument 121 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) inet6_lookup_listener() argument 177 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) inet6_lookup() argument
|
H A D | icmp.c | 256 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, icmpv6_push_pending_frames() 269 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, icmpv6_push_pending_frames() 313 tmp = iph->saddr; mip6_addr_swap() 314 iph->saddr = hao->addr; mip6_addr_swap() 397 const struct in6_addr *saddr = NULL; icmp6_send() local 423 saddr = &hdr->daddr; icmp6_send() 436 saddr = NULL; icmp6_send() 439 addr_type = ipv6_addr_type(&hdr->saddr); icmp6_send() 471 fl6.daddr = hdr->saddr; icmp6_send() 472 if (saddr) icmp6_send() 473 fl6.saddr = *saddr; icmp6_send() 552 const struct in6_addr *saddr = NULL; icmpv6_echo_reply() local 563 saddr = &ipv6_hdr(skb)->daddr; icmpv6_echo_reply() 568 saddr = NULL; icmpv6_echo_reply() 575 fl6.daddr = ipv6_hdr(skb)->saddr; icmpv6_echo_reply() 576 if (saddr) icmpv6_echo_reply() 577 fl6.saddr = *saddr; icmpv6_echo_reply() 679 const struct in6_addr *saddr, *daddr; icmpv6_rcv() local 706 saddr = &ipv6_hdr(skb)->saddr; icmpv6_rcv() 711 saddr, daddr); icmpv6_rcv() 815 const struct in6_addr *saddr, icmpv6_flow_init() 820 fl6->saddr = *saddr; icmpv6_flow_init() 813 icmpv6_flow_init(struct sock *sk, struct flowi6 *fl6, u8 type, const struct in6_addr *saddr, const struct in6_addr *daddr, int oif) icmpv6_flow_init() argument
|
H A D | xfrm6_mode_beet.c | 75 top_iph->saddr = *(struct in6_addr *)&x->props.saddr; xfrm6_beet_output() 99 ip6h->saddr = x->sel.saddr.in6; xfrm6_beet_input()
|
H A D | ndisc.c | 408 const struct in6_addr *saddr, ip6_nd_hdr() 424 hdr->saddr = *saddr; ip6_nd_hdr() 430 const struct in6_addr *saddr) ndisc_send_skb() 445 icmpv6_flow_init(sk, &fl6, type, saddr, daddr, skb->dev->ifindex); ndisc_send_skb() 455 icmp6h->icmp6_cksum = csum_ipv6_magic(saddr, daddr, skb->len, ndisc_send_skb() 460 ip6_nd_hdr(skb, saddr, daddr, inet6_sk(sk)->hop_limit, skb->len); ndisc_send_skb() 556 const struct in6_addr *daddr, const struct in6_addr *saddr) ndisc_send_ns() 564 if (!saddr) { ndisc_send_ns() 568 saddr = &addr_buf; ndisc_send_ns() 571 if (ipv6_addr_any(saddr)) ndisc_send_ns() 592 ndisc_send_skb(skb, daddr, saddr); ndisc_send_ns() 595 void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr, ndisc_send_rs() argument 613 struct inet6_ifaddr *ifp = ipv6_get_ifaddr(dev_net(dev), saddr, ndisc_send_rs() 643 ndisc_send_skb(skb, daddr, saddr); ndisc_send_rs() 661 struct in6_addr *saddr = NULL; ndisc_solicit() local 667 if (skb && ipv6_chk_addr_and_flags(dev_net(dev), &ipv6_hdr(skb)->saddr, ndisc_solicit() 670 saddr = &ipv6_hdr(skb)->saddr; ndisc_solicit() 678 ndisc_send_ns(dev, neigh, target, target, saddr); ndisc_solicit() 683 ndisc_send_ns(dev, NULL, target, &mcaddr, saddr); ndisc_solicit() 705 const struct in6_addr *saddr = &ipv6_hdr(skb)->saddr; ndisc_recv_ns() local 715 int dad = ipv6_addr_any(saddr); ndisc_recv_ns() 841 neigh = __neigh_lookup(&nd_tbl, saddr, dev, ndisc_recv_ns() 848 ndisc_send_na(dev, neigh, saddr, &msg->target, ndisc_recv_ns() 865 struct in6_addr *saddr = &ipv6_hdr(skb)->saddr; ndisc_recv_na() local 958 rt6_clean_tohost(dev_net(dev), saddr); ndisc_recv_na() local 972 const struct in6_addr *saddr = &ipv6_hdr(skb)->saddr; ndisc_recv_rs() local 993 if (ipv6_addr_any(saddr)) ndisc_recv_rs() 1009 neigh = __neigh_lookup(&nd_tbl, saddr, skb->dev, 1); ndisc_recv_rs() 1053 if (nla_put_in6_addr(skb, NDUSEROPT_SRCADDR, &ipv6_hdr(ra)->saddr)) ndisc_ra_useropt() 1086 if (!(ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL)) { ndisc_router_discovery() 1165 ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr, ndisc_router_discovery() 1183 rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev); ndisc_router_discovery() 1186 neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr); ndisc_router_discovery() 1205 rt = rt6_add_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev, pref); ndisc_router_discovery() 1213 neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr); ndisc_router_discovery() 1284 neigh = __neigh_lookup(&nd_tbl, &ipv6_hdr(skb)->saddr, ndisc_router_discovery() 1313 ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr, ndisc_router_discovery() 1338 &ipv6_hdr(skb)->saddr); ndisc_router_discovery() 1421 if (!(ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL)) { ndisc_redirect_rcv() 1489 &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex); ndisc_send_redirect() 1568 ndisc_send_skb(buff, &ipv6_hdr(skb)->saddr, &saddr_buf); ndisc_send_redirect() 407 ip6_nd_hdr(struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr, int hop_limit, int len) ip6_nd_hdr() argument 428 ndisc_send_skb(struct sk_buff *skb, const struct in6_addr *daddr, const struct in6_addr *saddr) ndisc_send_skb() argument 554 ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, const struct in6_addr *solicit, const struct in6_addr *daddr, const struct in6_addr *saddr) ndisc_send_ns() argument
|
H A D | udp.c | 146 const struct in6_addr *saddr, __be16 sport, compute_score() 174 if (!ipv6_addr_equal(&sk->sk_v6_daddr, saddr)) compute_score() 190 const struct in6_addr *saddr, __be16 sport, compute_score2() 215 if (!ipv6_addr_equal(&sk->sk_v6_daddr, saddr)) compute_score2() 231 const struct in6_addr *saddr, __be16 sport, udp6_lib_lookup2() 244 score = compute_score2(sk, net, saddr, sport, udp6_lib_lookup2() 252 saddr, sport); udp6_lib_lookup2() 275 else if (unlikely(compute_score2(result, net, saddr, sport, udp6_lib_lookup2() 285 const struct in6_addr *saddr, __be16 sport, __udp6_lib_lookup() 305 result = udp6_lib_lookup2(net, saddr, sport, __udp6_lib_lookup() 315 result = udp6_lib_lookup2(net, saddr, sport, __udp6_lib_lookup() 326 score = compute_score(sk, net, hnum, saddr, sport, daddr, dport, dif); __udp6_lib_lookup() 333 saddr, sport); __udp6_lib_lookup() 354 else if (unlikely(compute_score(result, net, hnum, saddr, sport, __udp6_lib_lookup() 375 return __udp6_lib_lookup(dev_net(skb_dst(skb)->dev), &iph->saddr, sport, __udp6_lib_lookup_skb() 380 struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport, udp6_lib_lookup() argument 383 return __udp6_lib_lookup(net, saddr, sport, daddr, dport, dif, &udp_table); udp6_lib_lookup() 479 ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, udpv6_recvmsg() 483 sin6->sin6_addr = ipv6_hdr(skb)->saddr; udpv6_recvmsg() 540 const struct in6_addr *saddr = &hdr->saddr; __udp6_lib_err() local 548 saddr, uh->source, inet6_iif(skb), udptable); __udp6_lib_err() 774 &ipv6_hdr(skb)->saddr, ntohs(udp_hdr(skb)->source), udp6_csum_zero_error() 783 const struct in6_addr *saddr, const struct in6_addr *daddr, __udp6_lib_mcast_deliver() 809 uh->source, saddr, __udp6_lib_mcast_deliver() 850 const struct in6_addr *saddr, *daddr; __udp6_lib_rcv() local 856 saddr = &ipv6_hdr(skb)->saddr; __udp6_lib_rcv() 877 saddr = &ipv6_hdr(skb)->saddr; __udp6_lib_rcv() 891 saddr, daddr, udptable, proto); __udp6_lib_rcv() 945 saddr, ntohs(uh->source), __udp6_lib_rcv() 985 const struct in6_addr *saddr, udp6_hwcsum_outgoing() 997 uh->check = ~csum_ipv6_magic(saddr, daddr, len, IPPROTO_UDP, 0); udp6_hwcsum_outgoing() 1013 uh->check = csum_ipv6_magic(saddr, daddr, len, IPPROTO_UDP, udp6_hwcsum_outgoing() 1049 udp6_hwcsum_outgoing(sk, skb, &fl6->saddr, &fl6->daddr, len); udp_v6_send_skb() 1055 uh->check = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, udp_v6_send_skb() 1277 if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) udpv6_sendmsg() 1278 fl6.saddr = np->saddr; udpv6_sendmsg() 1363 ipv6_addr_equal(&fl6.saddr, &np->saddr) ? udpv6_sendmsg() 1364 &np->saddr : udpv6_sendmsg() 144 compute_score(struct sock *sk, struct net *net, unsigned short hnum, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, __be16 dport, int dif) compute_score() argument 189 compute_score2(struct sock *sk, struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, unsigned short hnum, int dif) compute_score2() argument 230 udp6_lib_lookup2(struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, unsigned int hnum, int dif, struct udp_hslot *hslot2, unsigned int slot2) udp6_lib_lookup2() argument 284 __udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, __be16 dport, int dif, struct udp_table *udptable) __udp6_lib_lookup() argument 782 __udp6_lib_mcast_deliver(struct net *net, struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr, struct udp_table *udptable, int proto) __udp6_lib_mcast_deliver() argument 984 udp6_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr, int len) udp6_hwcsum_outgoing() argument
|
H A D | tcp_ipv6.c | 109 ipv6_hdr(skb)->saddr.s6_addr32, tcp_v6_init_sequence() 122 struct in6_addr *saddr = NULL, *final_p, final; tcp_v6_connect() local 224 np->saddr = sk->sk_v6_rcv_saddr; tcp_v6_connect() 230 saddr = &sk->sk_v6_rcv_saddr; tcp_v6_connect() 234 fl6.saddr = saddr ? *saddr : np->saddr; tcp_v6_connect() 251 if (!saddr) { tcp_v6_connect() 252 saddr = &fl6.saddr; tcp_v6_connect() 253 sk->sk_v6_rcv_saddr = *saddr; tcp_v6_connect() 257 np->saddr = *saddr; tcp_v6_connect() 286 tp->write_seq = secure_tcpv6_sequence_number(np->saddr.s6_addr32, tcp_v6_connect() 338 &hdr->saddr, ntohs(th->source), tcp_v6_err() 534 const struct in6_addr *saddr, int nbytes) tcp_v6_md5_hash_pseudoheader() 541 bp->saddr = *saddr; tcp_v6_md5_hash_pseudoheader() 551 const struct in6_addr *daddr, struct in6_addr *saddr, tcp_v6_md5_hash_hdr() 564 if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) tcp_v6_md5_hash_hdr() 588 const struct in6_addr *saddr, *daddr; tcp_v6_md5_hash_skb() local 594 saddr = &sk->sk_v6_rcv_saddr; tcp_v6_md5_hash_skb() 598 saddr = &ip6h->saddr; tcp_v6_md5_hash_skb() 610 if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, skb->len)) tcp_v6_md5_hash_skb() 640 hash_expected = tcp_v6_md5_do_lookup(sk, &ip6h->saddr); tcp_v6_inbound_md5_hash() 665 &ip6h->saddr, ntohs(th->source), tcp_v6_inbound_md5_hash() 679 ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; tcp_v6_init_req() 790 &ipv6_hdr(skb)->saddr, tcp_v6_send_response() 796 fl6.daddr = ipv6_hdr(skb)->saddr; tcp_v6_send_response() 797 fl6.saddr = ipv6_hdr(skb)->daddr; tcp_v6_send_response() 803 __tcp_v6_send_check(buff, &fl6.saddr, &fl6.daddr); tcp_v6_send_response() 866 &tcp_hashinfo, &ipv6h->saddr, tcp_v6_send_reset() 873 key = tcp_v6_md5_do_lookup(sk1, &ipv6h->saddr); tcp_v6_send_reset() 881 key = sk ? tcp_v6_md5_do_lookup(sk, &ipv6h->saddr) : NULL; tcp_v6_send_reset() 949 &ipv6_hdr(skb)->saddr, tcp_v6_hnd_req() 958 &ipv6_hdr(skb)->saddr, th->source, tcp_v6_hnd_req() 1029 newnp->saddr = newsk->sk_v6_rcv_saddr; tcp_v6_syn_recv_sock() 1097 newnp->saddr = ireq->ir_v6_loc_addr; tcp_v6_syn_recv_sock() 1492 &ipv6_hdr(skb)->saddr, th->source, tcp_v6_rcv() 1537 &hdr->saddr, th->source, tcp_v6_early_demux() 532 tcp_v6_md5_hash_pseudoheader(struct tcp_md5sig_pool *hp, const struct in6_addr *daddr, const struct in6_addr *saddr, int nbytes) tcp_v6_md5_hash_pseudoheader() argument 550 tcp_v6_md5_hash_hdr(char *md5_hash, struct tcp_md5sig_key *key, const struct in6_addr *daddr, struct in6_addr *saddr, const struct tcphdr *th) tcp_v6_md5_hash_hdr() argument
|
H A D | tcpv6_offload.c | 37 th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr, tcp6_gro_complete() 62 __tcp_v6_send_check(skb, &ipv6h->saddr, &ipv6h->daddr); tcp6_gso_segment()
|
H A D | xfrm6_policy.c | 30 const xfrm_address_t *saddr, xfrm6_dst_lookup() 39 if (saddr) xfrm6_dst_lookup() 40 memcpy(&fl6.saddr, saddr, sizeof(fl6.saddr)); xfrm6_dst_lookup() 54 xfrm_address_t *saddr, xfrm_address_t *daddr) xfrm6_get_saddr() 64 ipv6_dev_get_saddr(dev_net(dev), dev, &daddr->in6, 0, &saddr->in6); xfrm6_get_saddr() 151 fl6->daddr = reverse ? hdr->saddr : hdr->daddr; _decode_session6() 152 fl6->saddr = reverse ? hdr->daddr : hdr->saddr; _decode_session6() 29 xfrm6_dst_lookup(struct net *net, int tos, const xfrm_address_t *saddr, const xfrm_address_t *daddr) xfrm6_dst_lookup() argument 53 xfrm6_get_saddr(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr) xfrm6_get_saddr() argument
|
H A D | ipcomp6.c | 95 t->id.spi = xfrm6_tunnel_alloc_spi(net, (xfrm_address_t *)&x->props.saddr); ipcomp6_tunnel_create() 103 memcpy(t->props.saddr.a6, x->props.saddr.a6, sizeof(struct in6_addr)); ipcomp6_tunnel_create() 129 spi = xfrm6_tunnel_spi_lookup(net, (xfrm_address_t *)&x->props.saddr); ipcomp6_tunnel_attach()
|
H A D | xfrm6_input.c | 59 xfrm_address_t *saddr, u8 proto) xfrm6_input_addr() 90 src = saddr; xfrm6_input_addr() 58 xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto) xfrm6_input_addr() argument
|
H A D | xfrm6_mode_tunnel.c | 61 top_iph->saddr = *(struct in6_addr *)&x->props.saddr; xfrm6_mode_tunnel_output()
|
H A D | fib6_rules.c | 94 struct in6_addr saddr; fib6_rule_action() local 100 &saddr)) fib6_rule_action() 102 if (!ipv6_prefix_equal(&saddr, &r->src.addr, fib6_rule_action() 105 flp6->saddr = saddr; fib6_rule_action() 166 if (!ipv6_prefix_equal(&fl6->saddr, &r->src.addr, fib6_rule_match()
|
H A D | datagram.c | 111 if (ipv6_addr_any(&np->saddr) || __ip6_datagram_connect() 112 ipv6_mapped_addr_any(&np->saddr)) __ip6_datagram_connect() 113 ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); __ip6_datagram_connect() 159 fl6.saddr = np->saddr; __ip6_datagram_connect() 187 if (ipv6_addr_any(&np->saddr)) __ip6_datagram_connect() 188 np->saddr = fl6.saddr; __ip6_datagram_connect() 191 sk->sk_v6_rcv_saddr = fl6.saddr; __ip6_datagram_connect() 201 ipv6_addr_equal(&fl6.saddr, &np->saddr) ? __ip6_datagram_connect() 202 &np->saddr : __ip6_datagram_connect() 448 sin->sin6_addr = ipv6_hdr(skb)->saddr; ipv6_recv_error() 455 ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, ipv6_recv_error() 751 fl6->saddr = src_info->ipi6_addr; for_each_cmsghdr()
|
H A D | sit.c | 102 if (local == t->parms.iph.saddr && ipip6_tunnel_lookup() 115 if (local == t->parms.iph.saddr && ipip6_tunnel_lookup() 130 __be32 local = parms->iph.saddr; __ipip6_bucket() 198 memcpy(dev->dev_addr, &t->parms.iph.saddr, 4); ipip6_tunnel_create() 225 __be32 local = parms->iph.saddr; ipip6_tunnel_locate() 235 if (local == t->parms.iph.saddr && ipip6_tunnel_locate() 447 p = __ipip6_tunnel_locate_prl(t, iph->saddr); isatap_chksrc() 454 const struct in6_addr *addr6 = &ipv6_hdr(skb)->saddr; isatap_chksrc() 457 (addr6->s6_addr32[3] == iph->saddr) && isatap_chksrc() 503 rt = rt6_lookup(dev_net(skb->dev), &ipv6_hdr(skb2)->saddr, NULL, 0, 0); ipip6_err_gen_icmpv6_unreach() 557 iph->saddr); ipip6_err() 647 if (unlikely(is_spoofed_6rd(tunnel, iph->saddr, &ipv6h->saddr))) { packet_is_spoofed() 649 &iph->saddr, &ipv6h->saddr, packet_is_spoofed() 661 &iph->saddr, &ipv6h->saddr, packet_is_spoofed() 673 iph->saddr, iph->daddr); ipip6_rcv() 697 &iph->saddr, iph->tos); ipip6_rcv() 735 iph->saddr, iph->daddr); ipip_rcv() 894 dst, tiph->saddr, ipip6_tunnel_xmit() 986 err = iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, ipip6_tunnel_xmit() 1055 iph->daddr, iph->saddr, ipip6_tunnel_bind_dev() 1088 t->parms.iph.saddr = p->iph.saddr; ipip6_tunnel_update() 1090 memcpy(t->dev->dev_addr, &p->iph.saddr, 4); ipip6_tunnel_update() 1446 parms->iph.saddr = nla_get_be32(data[IFLA_IPTUN_LOCAL]); ipip6_netlink_parms() 1670 nla_put_in_addr(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) || ipip6_fill_info()
|
H A D | inet6_connection_sock.c | 83 fl6->saddr = ireq->ir_v6_loc_addr; inet6_csk_route_req() 181 const struct in6_addr *saddr) __inet6_csk_dst_store() 183 __ip6_dst_store(sk, dst, daddr, saddr); __inet6_csk_dst_store() 203 fl6->saddr = np->saddr; inet6_csk_route_socket() 179 __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst, const struct in6_addr *daddr, const struct in6_addr *saddr) __inet6_csk_dst_store() argument
|
H A D | raw.c | 160 const struct in6_addr *saddr; ipv6_raw_deliver() local 167 saddr = &ipv6_hdr(skb)->saddr; ipv6_raw_deliver() 168 daddr = saddr + 1; ipv6_raw_deliver() 179 sk = __raw_v6_lookup(net, sk, nexthdr, daddr, saddr, inet6_iif(skb)); ipv6_raw_deliver() 222 sk = __raw_v6_lookup(net, sk_next(sk), nexthdr, daddr, saddr, ipv6_raw_deliver() 310 np->saddr = addr->sin6_addr; rawv6_bind() 363 const struct in6_addr *saddr, *daddr; raw6_icmp_error() local 373 saddr = &ip6h->saddr; raw6_icmp_error() 377 while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, raw6_icmp_error() 430 if (!csum_ipv6_magic(&ipv6_hdr(skb)->saddr, rawv6_rcv() 436 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, rawv6_rcv() 505 sin6->sin6_addr = ipv6_hdr(skb)->saddr; rawv6_recvmsg() 597 csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, rawv6_push_pending_frames() 860 if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) rawv6_sendmsg() 861 fl6.saddr = np->saddr; rawv6_sendmsg()
|
H A D | mip6.c | 138 if (!ipv6_addr_equal(&iph->saddr, (struct in6_addr *)x->coaddr) && mip6_destopt_input() 176 memcpy(&hao->addr, &iph->saddr, sizeof(hao->addr)); mip6_destopt_output() 178 memcpy(&iph->saddr, x->coaddr, sizeof(iph->saddr)); mip6_destopt_output() 236 hao ? &hao->addr : &ipv6_hdr(skb)->saddr, mip6_destopt_reject() 244 memcpy(&sel.saddr, (xfrm_address_t *)&ipv6_hdr(skb)->saddr, mip6_destopt_reject() 245 sizeof(sel.saddr)); mip6_destopt_reject()
|
H A D | route.c | 384 val ^= ipv6_addr_hash(&fl6->saddr); rt6_info_hash_nhsfn() 439 const struct in6_addr *saddr, rt6_device_match() 446 if (!oif && ipv6_addr_any(saddr)) rt6_device_match() 467 if (ipv6_chk_addr(net, saddr, dev, rt6_device_match() 774 struct in6_addr *saddr) fib6_backtrack() 782 fn = fib6_lookup(FIB6_SUBTREE(pn), NULL, saddr); fib6_backtrack() 798 fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr); ip6_pol_route_lookup() 801 rt = rt6_device_match(net, rt, &fl6->saddr, fl6->flowi6_oif, flags); ip6_pol_route_lookup() 805 fn = fib6_backtrack(fn, &fl6->saddr); ip6_pol_route_lookup() 823 const struct in6_addr *saddr, int oif, int strict) rt6_lookup() 832 if (saddr) { rt6_lookup() 833 memcpy(&fl6.saddr, saddr, sizeof(*saddr)); rt6_lookup() 877 const struct in6_addr *saddr) rt6_alloc_cow() 895 if (rt->rt6i_src.plen && saddr) { rt6_alloc_cow() 896 rt->rt6i_src.addr = *saddr; rt6_alloc_cow() 931 fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr); ip6_pol_route() 939 fn = fib6_backtrack(fn, &fl6->saddr); ip6_pol_route() 961 nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); ip6_pol_route() 1018 .saddr = iph->saddr, ip6_route_input() 1041 if (!ipv6_addr_any(&fl6->saddr)) ip6_route_output_flags() 1178 fl6.saddr = iph->saddr; ip6_update_pmtu() 1221 fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr); __ip6_route_redirect() 1245 fn = fib6_backtrack(fn, &fl6->saddr); __ip6_route_redirect() 1283 fl6.saddr = iph->saddr; ip6_redirect() 1286 dst = ip6_route_redirect(net, &fl6, &ipv6_hdr(skb)->saddr); ip6_redirect() 1305 fl6.saddr = iph->daddr; ip6_redirect_no_header() 1307 dst = ip6_route_redirect(net, &fl6, &iph->saddr); ip6_redirect_no_header() 2267 struct in6_addr *saddr) ip6_route_get_saddr() 2273 *saddr = rt->rt6i_prefsrc.addr; ip6_route_get_saddr() 2276 daddr, prefs, saddr); ip6_route_get_saddr() 2939 fl6.saddr = *(struct in6_addr *)nla_data(tb[RTA_SRC]); inet6_rtm_getroute() 2970 if (!ipv6_addr_any(&fl6.saddr)) inet6_rtm_getroute() 2996 err = rt6_fill_node(net, skb, rt, &fl6.daddr, &fl6.saddr, iif, inet6_rtm_getroute() 437 rt6_device_match(struct net *net, struct rt6_info *rt, const struct in6_addr *saddr, int oif, int flags) rt6_device_match() argument 773 fib6_backtrack(struct fib6_node *fn, struct in6_addr *saddr) fib6_backtrack() argument 822 rt6_lookup(struct net *net, const struct in6_addr *daddr, const struct in6_addr *saddr, int oif, int strict) rt6_lookup() argument 875 rt6_alloc_cow(struct rt6_info *ort, const struct in6_addr *daddr, const struct in6_addr *saddr) rt6_alloc_cow() argument 2263 ip6_route_get_saddr(struct net *net, struct rt6_info *rt, const struct in6_addr *daddr, unsigned int prefs, struct in6_addr *saddr) ip6_route_get_saddr() argument
|
H A D | udp_offload.c | 82 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, udp6_ufo_fragment() 164 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, udp6_gro_complete()
|
/linux-4.1.27/include/uapi/linux/netfilter/ |
H A D | xt_policy.h | 21 __u8 saddr:1, member in struct:xt_policy_spec 40 union nf_inet_addr saddr; member in struct:xt_policy_elem::__anon13488::__anon13489 47 union xt_policy_addr saddr;
|
/linux-4.1.27/net/core/ |
H A D | secure_seq.c | 43 __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr, secure_tcpv6_sequence_number() argument 51 memcpy(hash, saddr, 16); secure_tcpv6_sequence_number() 65 u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, secure_ipv6_port_ephemeral() argument 73 memcpy(hash, saddr, 16); secure_ipv6_port_ephemeral() 89 __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, secure_tcp_sequence_number() argument 95 hash[0] = (__force u32)saddr; secure_tcp_sequence_number() 105 u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) secure_ipv4_port_ephemeral() argument 110 hash[0] = (__force u32)saddr; secure_ipv4_port_ephemeral() 123 u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, secure_dccp_sequence_number() argument 130 hash[0] = (__force u32)saddr; secure_dccp_sequence_number() 146 u64 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr, secure_dccpv6_sequence_number() argument 155 memcpy(hash, saddr, 16); secure_dccpv6_sequence_number()
|
/linux-4.1.27/include/net/netfilter/ |
H A D | nf_queue.h | 49 if ((__force u32)iph->saddr < (__force u32)iph->daddr) hash_v4() 50 return jhash_3words((__force u32)iph->saddr, hash_v4() 54 (__force u32)iph->saddr, iph->protocol, jhash_initval); hash_v4() 63 if ((__force u32)ip6h->saddr.s6_addr32[3] < hash_v6() 65 a = (__force u32) ip6h->saddr.s6_addr32[3]; hash_v6() 68 b = (__force u32) ip6h->saddr.s6_addr32[3]; hash_v6() 72 if ((__force u32)ip6h->saddr.s6_addr32[1] < hash_v6() 74 c = (__force u32) ip6h->saddr.s6_addr32[1]; hash_v6()
|
/linux-4.1.27/arch/blackfin/include/asm/ |
H A D | checksum.h | 17 __csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, __csum_tcpudp_nofold() argument 35 : "d" (daddr), "d" (saddr), "d" ((len + proto) << 8), "0"(sum) __csum_tcpudp_nofold()
|
/linux-4.1.27/arch/cris/include/arch-v32/arch/ |
H A D | checksum.h | 13 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 23 : "0" (sum), "r" (daddr), "r" (saddr), \ csum_tcpudp_nofold()
|
/linux-4.1.27/net/ipv6/netfilter/ |
H A D | nft_chain_route_ipv6.c | 31 struct in6_addr saddr, daddr; nf_route_table_hook() local 40 memcpy(&saddr, &ipv6_hdr(skb)->saddr, sizeof(saddr)); nf_route_table_hook() 50 (memcmp(&ipv6_hdr(skb)->saddr, &saddr, sizeof(saddr)) || nf_route_table_hook()
|
H A D | ip6table_mangle.c | 38 struct in6_addr saddr, daddr; ip6t_mangle_out() local 52 memcpy(&saddr, &ipv6_hdr(skb)->saddr, sizeof(saddr)); ip6t_mangle_out() 64 (!ipv6_addr_equal(&ipv6_hdr(skb)->saddr, &saddr) || ip6t_mangle_out()
|
H A D | ip6t_rpfilter.c | 39 .daddr = iph->saddr, rpfilter_lookup_reverse6() 44 memcpy(&fl6.saddr, &iph->daddr, sizeof(struct in6_addr)); rpfilter_lookup_reverse6() 92 saddrtype = ipv6_addr_type(&iph->saddr); rpfilter_mt()
|
H A D | nf_reject_ipv6.c | 82 ip6h->saddr = oip6h->daddr; nf_reject_ip6hdr_put() 83 ip6h->daddr = oip6h->saddr; nf_reject_ip6hdr_put() 125 tcph->check = csum_ipv6_magic(&ipv6_hdr(nskb)->saddr, nf_reject_ip6_tcphdr_put() 144 if ((!(ipv6_addr_type(&oip6h->saddr) & IPV6_ADDR_UNICAST)) || nf_send_reset6() 156 fl6.saddr = oip6h->daddr; nf_send_reset6() 157 fl6.daddr = oip6h->saddr; nf_send_reset6()
|
H A D | ip6t_SYNPROXY.c | 23 synproxy_build_ip(struct sk_buff *skb, const struct in6_addr *saddr, synproxy_build_ip() argument 33 iph->saddr = *saddr; synproxy_build_ip() 49 nth->check = ~tcp_v6_check(tcp_hdr_size, &niph->saddr, &niph->daddr, 0); synproxy_send_tcp() 56 fl6.saddr = niph->saddr; synproxy_send_tcp() 104 niph = synproxy_build_ip(nskb, &iph->daddr, &iph->saddr); synproxy_send_client_synack() 145 niph = synproxy_build_ip(nskb, &iph->saddr, &iph->daddr); synproxy_send_server_syn() 190 niph = synproxy_build_ip(nskb, &iph->daddr, &iph->saddr); synproxy_send_server_ack() 228 niph = synproxy_build_ip(nskb, &iph->saddr, &iph->daddr); synproxy_send_client_ack()
|
H A D | ip6t_NPT.c | 88 if (!ip6t_npt_map_pfx(npt, &ipv6_hdr(skb)->saddr)) { ip6t_snpt_tg() 90 offsetof(struct ipv6hdr, saddr)); ip6t_snpt_tg()
|
H A D | ip6t_eui64.c | 44 if (!memcmp(ipv6_hdr(skb)->saddr.s6_addr + 8, eui64, eui64_mt6()
|
H A D | nf_nat_l3proto_ipv6.c | 53 fl6->saddr = t->src.u3.in6; nf_nat_ipv6_decode_session() 104 ipv6h->saddr = target->src.u3.in6; nf_nat_ipv6_manip_pkt() 120 oldip = &ipv6h->saddr; nf_nat_ipv6_csum_update() 145 *check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, nf_nat_ipv6_csum_recalc() 149 *check = csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, nf_nat_ipv6_csum_recalc() 249 csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, nf_nat_icmpv6_reply_translation()
|
/linux-4.1.27/arch/nios2/include/asm/ |
H A D | checksum.h | 47 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 62 : "=r" (sum), "=r" (saddr) csum_tcpudp_nofold() 65 "1" (saddr) csum_tcpudp_nofold() 71 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 75 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic()
|
/linux-4.1.27/net/ipv4/netfilter/ |
H A D | nft_chain_route_ipv4.c | 31 __be32 saddr, daddr; nf_route_table_hook() local 44 saddr = iph->saddr; nf_route_table_hook() 52 if (iph->saddr != saddr || nf_route_table_hook()
|
H A D | iptable_mangle.c | 46 __be32 saddr, daddr; ipt_mangle_out() local 58 saddr = iph->saddr; ipt_mangle_out() 68 if (iph->saddr != saddr || ipt_mangle_out()
|
H A D | ipt_rpfilter.c | 90 if (ipv4_is_zeronet(iph->saddr)) rpfilter_mt() 94 flow.daddr = iph->saddr; rpfilter_mt() 95 flow.saddr = rpfilter_get_saddr(iph->daddr); rpfilter_mt()
|
H A D | ipt_SYNPROXY.c | 21 synproxy_build_ip(struct sk_buff *skb, u32 saddr, u32 daddr) synproxy_build_ip() argument 35 iph->saddr = saddr; synproxy_build_ip() 47 nth->check = ~tcp_v4_check(tcp_hdr_size, niph->saddr, niph->daddr, 0); synproxy_send_tcp() 89 niph = synproxy_build_ip(nskb, iph->daddr, iph->saddr); synproxy_send_client_synack() 130 niph = synproxy_build_ip(nskb, iph->saddr, iph->daddr); synproxy_send_server_syn() 175 niph = synproxy_build_ip(nskb, iph->daddr, iph->saddr); synproxy_send_server_ack() 213 niph = synproxy_build_ip(nskb, iph->saddr, iph->daddr); synproxy_send_client_ack()
|
H A D | nf_reject_ipv4.c | 60 niph->saddr = oiph->daddr; nf_reject_iphdr_put() 61 niph->daddr = oiph->saddr; nf_reject_iphdr_put() 93 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), niph->saddr, nf_reject_ip_tcphdr_put()
|
H A D | nf_nat_l3proto_ipv4.c | 54 fl4->saddr = t->src.u3.ip; nf_nat_ipv4_decode_session() 99 csum_replace4(&iph->check, iph->saddr, target->src.u3.ip); nf_nat_ipv4_manip_pkt() 100 iph->saddr = target->src.u3.ip; nf_nat_ipv4_manip_pkt() 117 oldip = iph->saddr; nf_nat_ipv4_csum_update() 141 *check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, nf_nat_ipv4_csum_recalc() 145 *check = csum_tcpudp_magic(iph->saddr, iph->daddr, nf_nat_ipv4_csum_recalc()
|
/linux-4.1.27/arch/unicore32/include/asm/ |
H A D | checksum.h | 23 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 33 : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto)) csum_tcpudp_nofold()
|
/linux-4.1.27/arch/microblaze/include/asm/ |
H A D | checksum.h | 19 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 27 : "d" (saddr), "d" (daddr), csum_tcpudp_nofold()
|
/linux-4.1.27/arch/c6x/include/asm/ |
H A D | checksum.h | 13 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 27 : "a" (saddr), "a" (daddr), "a" (proto)); csum_tcpudp_nofold()
|
/linux-4.1.27/arch/cris/include/arch-v10/arch/ |
H A D | checksum.h | 12 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 24 : "0" (sum), "r" (daddr), "r" (saddr), "r" ((len + proto) << 8)); csum_tcpudp_nofold()
|
/linux-4.1.27/arch/arm/include/asm/ |
H A D | checksum.h | 87 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 101 : "r" (daddr), "r" (saddr), "r" (lenprot) csum_tcpudp_nofold() 114 : "r" (sum), "r" (daddr), "r" (saddr), "r" (lenprot) csum_tcpudp_nofold() 124 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 127 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 143 __csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len, 147 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, csum_ipv6_magic() argument 150 return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl(len), csum_ipv6_magic()
|
/linux-4.1.27/tools/testing/selftests/net/ |
H A D | psock_lib.h | 65 struct sockaddr_in saddr, daddr; pair_udp_open() local 74 memset(&saddr, 0, sizeof(saddr)); pair_udp_open() 75 saddr.sin_family = AF_INET; pair_udp_open() 76 saddr.sin_port = htons(port); pair_udp_open() 77 saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); pair_udp_open() 89 if (bind(fds[0], (void *) &saddr, sizeof(saddr))) { pair_udp_open()
|
/linux-4.1.27/arch/m68k/include/asm/ |
H A D | checksum.h | 81 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 89 : "=&d" (sum), "=d" (saddr) csum_tcpudp_nofold() 90 : "g" (daddr), "1" (saddr), "d" (len + proto), csum_tcpudp_nofold() 101 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 104 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 119 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, csum_ipv6_magic() argument 142 : "a" (saddr), "a" (daddr), "d" (len + proto), csum_ipv6_magic()
|
/linux-4.1.27/net/netfilter/ |
H A D | xt_socket.c | 85 * its saddr is the local address */ extract_icmp4_fields() 87 *laddr = inside_iph->saddr; extract_icmp4_fields() 116 const __be32 saddr, const __be32 daddr, xt_socket_get_sock_v4() 123 saddr, sport, daddr, dport, xt_socket_get_sock_v4() 126 return udp4_lib_lookup(net, saddr, sport, daddr, dport, xt_socket_get_sock_v4() 150 __be32 uninitialized_var(daddr), uninitialized_var(saddr); xt_socket_lookup_slow_v4() 167 saddr = iph->saddr; xt_socket_lookup_slow_v4() 173 if (extract_icmp4_fields(skb, &protocol, &saddr, &daddr, xt_socket_lookup_slow_v4() 200 return xt_socket_get_sock_v4(dev_net(skb->dev), protocol, saddr, daddr, xt_socket_lookup_slow_v4() 304 * its saddr is the local address */ extract_icmp6_fields() 306 *laddr = &inside_iph->saddr; extract_icmp6_fields() 316 const struct in6_addr *saddr, const struct in6_addr *daddr, xt_socket_get_sock_v6() 323 saddr, sport, daddr, dport, xt_socket_get_sock_v6() 326 return udp6_lib_lookup(net, saddr, sport, daddr, dport, xt_socket_get_sock_v6() 337 const struct in6_addr *daddr = NULL, *saddr = NULL; xt_socket_lookup_slow_v6() local 354 saddr = &iph->saddr; xt_socket_lookup_slow_v6() 362 if (extract_icmp6_fields(skb, thoff, &tproto, &saddr, &daddr, xt_socket_lookup_slow_v6() 369 return xt_socket_get_sock_v6(dev_net(skb->dev), tproto, saddr, daddr, xt_socket_lookup_slow_v6() 115 xt_socket_get_sock_v4(struct net *net, const u8 protocol, const __be32 saddr, const __be32 daddr, const __be16 sport, const __be16 dport, const struct net_device *in) xt_socket_get_sock_v4() argument 315 xt_socket_get_sock_v6(struct net *net, const u8 protocol, const struct in6_addr *saddr, const struct in6_addr *daddr, const __be16 sport, const __be16 dport, const struct net_device *in) xt_socket_get_sock_v6() argument
|
H A D | xt_iprange.c | 27 m = ntohl(iph->saddr) < ntohl(info->src_min.ip); iprange_mt4() 28 m |= ntohl(iph->saddr) > ntohl(info->src_max.ip); iprange_mt4() 32 &iph->saddr, iprange_mt4() 76 m = iprange_ipv6_lt(&iph->saddr, &info->src_min.in6); iprange_mt6() 77 m |= iprange_ipv6_lt(&info->src_max.in6, &iph->saddr); iprange_mt6() 81 &iph->saddr, iprange_mt6()
|
H A D | xt_TPROXY.c | 109 const __be32 saddr, const __be32 daddr, nf_tproxy_get_sock_v4() 121 saddr, sport, nf_tproxy_get_sock_v4() 133 saddr, sport, daddr, dport, nf_tproxy_get_sock_v4() 141 sk = udp4_lib_lookup(net, saddr, sport, daddr, dport, nf_tproxy_get_sock_v4() 165 protocol, ntohl(saddr), ntohs(sport), ntohl(daddr), ntohs(dport), lookup_type, sk); nf_tproxy_get_sock_v4() 173 const struct in6_addr *saddr, const struct in6_addr *daddr, nf_tproxy_get_sock_v6() 185 saddr, sport, nf_tproxy_get_sock_v6() 197 saddr, sport, daddr, ntohs(dport), nf_tproxy_get_sock_v6() 205 sk = udp6_lib_lookup(net, saddr, sport, daddr, dport, nf_tproxy_get_sock_v6() 229 protocol, saddr, ntohs(sport), daddr, ntohs(dport), lookup_type, sk); nf_tproxy_get_sock_v6() 271 iph->saddr, laddr ? laddr : iph->daddr, tproxy_handle_time_wait4() 310 iph->saddr, iph->daddr, tproxy_tg4() 326 iph->saddr, laddr, tproxy_tg4() 345 iph->protocol, &iph->saddr, ntohs(hp->source), tproxy_tg4() 434 &iph->saddr, tproxy_handle_time_wait6() 478 &iph->saddr, &iph->daddr, tproxy_tg6_v1() 493 &iph->saddr, laddr, tproxy_tg6_v1() 504 tproto, &iph->saddr, ntohs(hp->source), tproxy_tg6_v1() 512 tproto, &iph->saddr, ntohs(hp->source), tproxy_tg6_v1() 108 nf_tproxy_get_sock_v4(struct net *net, const u8 protocol, const __be32 saddr, const __be32 daddr, const __be16 sport, const __be16 dport, const struct net_device *in, const enum nf_tproxy_lookup_t lookup_type) nf_tproxy_get_sock_v4() argument 172 nf_tproxy_get_sock_v6(struct net *net, const u8 protocol, const struct in6_addr *saddr, const struct in6_addr *daddr, const __be16 sport, const __be16 dport, const struct net_device *in, const enum nf_tproxy_lookup_t lookup_type) nf_tproxy_get_sock_v6() argument
|
H A D | xt_AUDIT.c | 85 audit_log_format(ab, " saddr=%pI4 daddr=%pI4 ipid=%hu proto=%hhu", audit_ip4() 86 &ih->saddr, &ih->daddr, ntohs(ih->id), ih->protocol); audit_ip4() 114 audit_log_format(ab, " saddr=%pI6c daddr=%pI6c proto=%hhu", audit_ip6() 115 &ih->saddr, &ih->daddr, nexthdr); audit_ip6()
|
H A D | xt_NETMAP.c | 40 new_addr.in6 = ipv6_hdr(skb)->saddr; netmap_tg6() 87 new_ip = ip_hdr(skb)->saddr & ~netmask; netmap_tg4()
|
H A D | xt_policy.c | 46 return MATCH_ADDR(saddr, smask, &x->props.saddr) && match_xfrm_state()
|
H A D | xt_addrtype.c | 110 ret &= match_type6(net, dev, &iph->saddr, info->source) ^ addrtype_mt6() 134 ret &= match_type(net, NULL, iph->saddr, info->source) ^ addrtype_mt_v0() 163 ret &= match_type(net, dev, iph->saddr, info->source) ^ addrtype_mt_v1()
|
/linux-4.1.27/net/ieee802154/6lowpan/ |
H A D | tx.c | 28 struct lowpan_addr saddr; member in struct:lowpan_addr_info 43 const u8 *saddr = _saddr; lowpan_header_create() local 53 if (!saddr) lowpan_header_create() 54 saddr = dev->dev_addr; lowpan_header_create() 56 raw_dump_inline(__func__, "saddr", (unsigned char *)saddr, 8); lowpan_header_create() 65 info->saddr.mode = IEEE802154_ADDR_LONG; lowpan_header_create() 66 memcpy(&info->saddr.u.extended_addr, saddr, lowpan_header_create() 196 void *daddr, *saddr; lowpan_header() local 202 saddr = &info.saddr.u.extended_addr; lowpan_header() 204 lowpan_header_compress(skb, dev, ETH_P_IPV6, daddr, saddr, skb->len); lowpan_header() 211 sa.extended_addr = ieee802154_devaddr_from_raw(saddr); lowpan_header()
|
H A D | 6lowpan_i.h | 23 struct ieee802154_addr saddr; member in struct:lowpan_frag_queue
|
/linux-4.1.27/arch/parisc/include/asm/ |
H A D | checksum.h | 87 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 98 : "r" (daddr), "r"(saddr), "r"(proto+len), "0"(sum)); csum_tcpudp_nofold() 106 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 111 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 125 static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 140 " ldd,ma 8(%1), %%r19\n" /* get 1st saddr word */ csum_ipv6_magic() 144 " ldd,ma 8(%1), %%r21\n" /* 2cd saddr */ csum_ipv6_magic() 163 " ldw,ma 4(%1), %%r19\n" /* get 1st saddr word */ csum_ipv6_magic() 167 " ldw,ma 4(%1), %%r21\n" /* 2cd saddr */ csum_ipv6_magic() 171 " ldw,ma 4(%1), %%r19\n" /* 3rd saddr */ csum_ipv6_magic() 175 " ldw,ma 4(%1), %%r21\n" /* 4th saddr */ csum_ipv6_magic() 183 : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len) csum_ipv6_magic() 184 : "0" (sum), "1" (saddr), "2" (daddr), "3" (len), "r" (proto) csum_ipv6_magic()
|
/linux-4.1.27/arch/x86/um/asm/ |
H A D | checksum_32.h | 14 static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 32 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
H A D | checksum.h | 79 * @saddr: source address 89 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 97 : "g" (daddr), "g" (saddr), "g" ((len + proto) << 8), "0" (sum)); csum_tcpudp_nofold() 105 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 110 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic()
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | checksum_64.h | 77 * @saddr: source address 87 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 95 : "g" (daddr), "g" (saddr), csum_tcpudp_nofold() 103 * @saddr: source address 112 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 116 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 164 * @saddr: source address 179 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
|
H A D | checksum_32.h | 114 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 124 : "g" (daddr), "g"(saddr), csum_tcpudp_nofold() 133 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 138 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 152 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 169 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/include/uapi/linux/netfilter_bridge/ |
H A D | ebt_arp.h | 24 __be32 saddr; member in struct:ebt_arp_info
|
H A D | ebt_ip.h | 32 __be32 saddr; member in struct:ebt_ip_info
|
H A D | ebt_ip6.h | 32 struct in6_addr saddr; member in struct:ebt_ip6_info
|
H A D | ebt_802_3.h | 47 __u8 saddr[ETH_ALEN]; member in struct:ebt_802_3_hdr
|
/linux-4.1.27/arch/mn10300/include/asm/ |
H A D | checksum.h | 40 static inline __wsum csum_tcpudp_nofold(unsigned long saddr, csum_tcpudp_nofold() argument 57 : "r" (daddr), "r"(saddr), "r"(tmp), "0"(sum) csum_tcpudp_nofold() 67 static inline __sum16 csum_tcpudp_magic(unsigned long saddr, csum_tcpudp_magic() argument 73 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic()
|
/linux-4.1.27/arch/ia64/lib/ |
H A D | checksum.c | 37 csum_tcpudp_magic (__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 41 (__force u64)saddr + (__force u64)daddr + csum_tcpudp_magic() 48 csum_tcpudp_nofold (__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 53 result = (__force u64)saddr + (__force u64)daddr + csum_tcpudp_nofold()
|
/linux-4.1.27/arch/metag/include/asm/ |
H A D | checksum.h | 61 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 74 : "d" (daddr), "d" (saddr), "d" (len_proto), csum_tcpudp_nofold() 81 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 84 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic()
|
/linux-4.1.27/arch/s390/include/asm/ |
H A D | checksum.h | 94 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 100 csum += (__force __u32)saddr; csum_tcpudp_nofold() 101 if (csum < (__force __u32)saddr) csum_tcpudp_nofold() 121 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 125 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic()
|
/linux-4.1.27/net/bridge/netfilter/ |
H A D | ebt_arp.c | 40 __be32 saddr, daddr; ebt_arp_mt() local 45 ah->ar_hln, sizeof(saddr), ebt_arp_mt() 46 &saddr); ebt_arp_mt() 50 2*ah->ar_hln+sizeof(saddr), ebt_arp_mt() 55 FWINV(info->saddr != (*sap & info->smsk), EBT_ARP_SRC_IP)) ebt_arp_mt()
|
H A D | ebt_ip.c | 43 FWINV((ih->saddr & info->smsk) != ebt_ip_mt() 44 info->saddr, EBT_IP_SOURCE)) ebt_ip_mt()
|
H A D | ebt_ip6.c | 52 FWINV(ipv6_masked_addr_cmp(&ih6->saddr, &info->smsk, ebt_ip6_mt() 53 &info->saddr), EBT_IP6_SOURCE)) || ebt_ip6_mt()
|
/linux-4.1.27/net/802/ |
H A D | fc.c | 38 const void *daddr, const void *saddr, unsigned int len) fc_header() 65 if(saddr) fc_header() 66 memcpy(fch->saddr,saddr,dev->addr_len); fc_header() 68 memcpy(fch->saddr,dev->dev_addr,dev->addr_len); fc_header() 36 fc_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) fc_header() argument
|
H A D | fddi.c | 48 * saddr=NULL means use device source address 54 const void *daddr, const void *saddr, unsigned int len) fddi_header() 76 if (saddr != NULL) fddi_header() 77 memcpy(fddi->saddr, saddr, dev->addr_len); fddi_header() 79 memcpy(fddi->saddr, dev->dev_addr, dev->addr_len); fddi_header() 52 fddi_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) fddi_header() argument
|
/linux-4.1.27/arch/sparc/include/asm/ |
H A D | checksum_64.h | 98 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 108 : "=r" (sum), "=r" (saddr) csum_tcpudp_nofold() 109 : "r" (daddr), "r" (proto + len), "0" (sum), "1" (saddr) csum_tcpudp_nofold() 118 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 123 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 128 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 154 : "r" (saddr), "r" (daddr), "r"(htonl(len)), csum_ipv6_magic()
|
H A D | checksum_32.h | 172 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 181 : "=r" (sum), "=r" (saddr) csum_tcpudp_nofold() 183 "1" (saddr) csum_tcpudp_nofold() 192 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 197 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 202 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 228 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/drivers/gpu/drm/radeon/ |
H A D | radeon_benchmark.c | 36 uint64_t saddr, uint64_t daddr, radeon_benchmark_do_move() 49 fence = radeon_copy_dma(rdev, saddr, daddr, radeon_benchmark_do_move() 54 fence = radeon_copy_blit(rdev, saddr, daddr, radeon_benchmark_do_move() 92 uint64_t saddr, daddr; radeon_benchmark_move() local 104 r = radeon_bo_pin(sobj, sdomain, &saddr); radeon_benchmark_move() 123 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, radeon_benchmark_move() 134 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, radeon_benchmark_move() 35 radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size, uint64_t saddr, uint64_t daddr, int flag, int n, struct reservation_object *resv) radeon_benchmark_do_move() argument
|
/linux-4.1.27/net/tipc/ |
H A D | subscr.c | 335 struct sockaddr_tipc *saddr; tipc_subscr_start() local 337 saddr = kzalloc(sizeof(*saddr), GFP_ATOMIC); tipc_subscr_start() 338 if (!saddr) tipc_subscr_start() 340 saddr->family = AF_TIPC; tipc_subscr_start() 341 saddr->addrtype = TIPC_ADDR_NAMESEQ; tipc_subscr_start() 342 saddr->addr.nameseq.type = TIPC_TOP_SRV; tipc_subscr_start() 343 saddr->addr.nameseq.lower = TIPC_TOP_SRV; tipc_subscr_start() 344 saddr->addr.nameseq.upper = TIPC_TOP_SRV; tipc_subscr_start() 345 saddr->scope = TIPC_NODE_SCOPE; tipc_subscr_start() 349 kfree(saddr); tipc_subscr_start() 353 topsrv->saddr = saddr; tipc_subscr_start() 374 kfree(topsrv->saddr); tipc_subscr_stop()
|
H A D | server.c | 93 struct sockaddr_tipc *saddr = con->server->saddr; tipc_conn_kref_release() local 103 saddr->scope = -TIPC_NODE_SCOPE; tipc_conn_kref_release() 104 kernel_bind(sock, (struct sockaddr *)saddr, sizeof(*saddr)); tipc_conn_kref_release() 331 ret = kernel_bind(sock, (struct sockaddr *)s->saddr, sizeof(*s->saddr)); tipc_create_listen_sock()
|
H A D | server.h | 58 * @saddr: TIPC server address 77 struct sockaddr_tipc *saddr; member in struct:tipc_server
|
/linux-4.1.27/drivers/media/usb/cx231xx/ |
H A D | cx231xx-i2c.c | 95 u16 saddr = 0; cx231xx_i2c_send_bytes() local 107 saddr = msg->buf[0] << 8 | msg->buf[1]; cx231xx_i2c_send_bytes() 109 saddr = msg->buf[0]; cx231xx_i2c_send_bytes() 111 switch (saddr) { cx231xx_i2c_send_bytes() 131 "GPIO WRITE: addr 0x%x, len %d, saddr 0x%x\n", cx231xx_i2c_send_bytes() 132 msg->addr, msg->len, saddr); cx231xx_i2c_send_bytes() 202 u16 saddr = 0; cx231xx_i2c_recv_bytes() local 207 saddr = msg->buf[0] << 8 | msg->buf[1]; cx231xx_i2c_recv_bytes() 209 saddr = msg->buf[0]; cx231xx_i2c_recv_bytes() 213 switch (saddr) { cx231xx_i2c_recv_bytes() 233 "GPIO R E A D: addr 0x%x, len %d, saddr 0x%x\n", cx231xx_i2c_recv_bytes() 289 u16 saddr = 0; cx231xx_i2c_recv_bytes_with_saddr() local 293 saddr = msg1->buf[0] << 8 | msg1->buf[1]; cx231xx_i2c_recv_bytes_with_saddr() 295 saddr = msg1->buf[0]; cx231xx_i2c_recv_bytes_with_saddr() 301 "i2c_read: addr 0x%x, len %d, saddr 0x%x, len %d\n", cx231xx_i2c_recv_bytes_with_saddr() 302 msg2->addr, msg2->len, saddr, msg1->len); cx231xx_i2c_recv_bytes_with_saddr() 304 switch (saddr) { cx231xx_i2c_recv_bytes_with_saddr() 331 req_data.saddr_dat = saddr; cx231xx_i2c_recv_bytes_with_saddr()
|
H A D | cx231xx-core.c | 1513 int cx231xx_read_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr, cx231xx_read_i2c_master() argument 1521 saddr = 0; cx231xx_read_i2c_master() 1523 saddr &= 0xff; cx231xx_read_i2c_master() 1529 req_data.saddr_dat = saddr; cx231xx_read_i2c_master() 1553 *data = value[saddr]; cx231xx_read_i2c_master() 1559 int cx231xx_write_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr, cx231xx_write_i2c_master() argument 1572 saddr = 0; cx231xx_write_i2c_master() 1574 saddr &= 0xff; cx231xx_write_i2c_master() 1580 req_data.saddr_dat = saddr; cx231xx_write_i2c_master() 1598 int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr, cx231xx_read_i2c_data() argument 1606 saddr = 0; cx231xx_read_i2c_data() 1608 saddr &= 0xff; cx231xx_read_i2c_data() 1614 req_data.saddr_dat = saddr; cx231xx_read_i2c_data() 1634 int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr, cx231xx_write_i2c_data() argument 1647 saddr = 0; cx231xx_write_i2c_data() 1649 saddr &= 0xff; cx231xx_write_i2c_data() 1655 req_data.saddr_dat = saddr; cx231xx_write_i2c_data() 1715 u16 saddr, u32 mask, u32 value) cx231xx_read_modify_write_i2c_dword() 1720 status = cx231xx_read_i2c_data(dev, dev_addr, saddr, 2, &temp, 4); cx231xx_read_modify_write_i2c_dword() 1728 status = cx231xx_write_i2c_data(dev, dev_addr, saddr, 2, temp, 4); cx231xx_read_modify_write_i2c_dword() 1714 cx231xx_read_modify_write_i2c_dword(struct cx231xx *dev, u8 dev_addr, u16 saddr, u32 mask, u32 value) cx231xx_read_modify_write_i2c_dword() argument
|
/linux-4.1.27/net/decnet/ |
H A D | dn_route.c | 325 (fl1->saddr ^ fl2->saddr) | compare_keys() 924 __le16 saddr = 0; dnet_select_source() local 938 saddr = ifa->ifa_local; dnet_select_source() 943 saddr = ifa->ifa_local; dnet_select_source() 945 saddr = ifa->ifa_local; dnet_select_source() 949 return saddr; dnet_select_source() 967 .saddr = oldflp->saddr, dn_route_output_slow() 987 le16_to_cpu(oldflp->saddr), dn_route_output_slow() 1004 if (oldflp->saddr) { dn_route_output_slow() 1008 if (dn_dev_islocal(dev_out, oldflp->saddr)) dn_route_output_slow() 1017 if (!dn_dev_islocal(dev, oldflp->saddr)) dn_route_output_slow() 1037 fld.daddr = fld.saddr; dn_route_output_slow() 1046 fld.saddr = dnet_select_source(dev_out, 0, dn_route_output_slow() 1060 le16_to_cpu(fld.daddr), le16_to_cpu(fld.saddr), dn_route_output_slow() 1088 (oldflp->saddr && dn_route_output_slow() 1090 oldflp->saddr)))) { dn_route_output_slow() 1133 if (fld.saddr == 0) { dn_route_output_slow() 1134 fld.saddr = dnet_select_source(dev_out, gateway, dn_route_output_slow() 1138 if (fld.saddr == 0 && res.type != RTN_LOCAL) dn_route_output_slow() 1150 if (!fld.saddr) dn_route_output_slow() 1151 fld.saddr = fld.daddr; dn_route_output_slow() 1171 if (!fld.saddr) dn_route_output_slow() 1172 fld.saddr = DN_FIB_RES_PREFSRC(res); dn_route_output_slow() 1190 rt->fld.saddr = oldflp->saddr; dn_route_output_slow() 1196 rt->rt_saddr = fld.saddr; dn_route_output_slow() 1199 rt->rt_local_src = fld.saddr; dn_route_output_slow() 1202 rt->rt_src_map = fld.saddr; dn_route_output_slow() 1218 hash = dn_hash(rt->fld.saddr, rt->fld.daddr); dn_route_output_slow() 1251 unsigned int hash = dn_hash(flp->saddr, flp->daddr); __dn_route_output_key() 1259 (flp->saddr == rt->fld.saddr) && __dn_route_output_key() 1321 .saddr = cb->src, dn_route_input_slow() 1336 if (fld.saddr == 0) dn_route_input_slow() 1362 __le16 src_map = fld.saddr; dn_route_input_slow() 1373 src_map = fld.saddr; /* no NAT support for now */ dn_route_input_slow() 1388 fld.saddr = src_map; dn_route_input_slow() 1421 fld.saddr = cb->dst; dn_route_input_slow() 1454 rt->rt_saddr = fld.saddr; dn_route_input_slow() 1462 rt->rt_src_map = fld.saddr; dn_route_input_slow() 1464 rt->fld.saddr = cb->src; dn_route_input_slow() 1494 hash = dn_hash(rt->fld.saddr, rt->fld.daddr); dn_route_input_slow() 1534 if ((rt->fld.saddr == cb->src) && dn_route_input() 1580 if (rt->fld.saddr) { dn_rt_fill_info() 1582 if (nla_put_le16(skb, RTA_SRC, rt->fld.saddr) < 0) dn_rt_fill_info() 1666 fld.saddr = nla_get_le16(tb[RTA_SRC]); dn_cache_getroute() 1683 cb->src = fld.saddr; dn_cache_getroute()
|
H A D | dn_rules.c | 112 __le16 saddr = fld->saddr; dn_fib_rule_match() local 114 if (((saddr ^ r->src) & r->srcmask) || dn_fib_rule_match()
|
/linux-4.1.27/arch/xtensa/include/asm/ |
H A D | checksum.h | 125 static __inline__ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 151 : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum)); csum_tcpudp_nofold() 159 static __inline__ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 164 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 178 static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 233 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/arch/score/include/asm/ |
H A D | checksum.h | 130 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 153 : "0" (daddr), "r"(saddr), csum_tcpudp_nofold() 164 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 167 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 181 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 239 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/arch/sh/include/asm/ |
H A D | checksum_32.h | 117 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 134 : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum) csum_tcpudp_nofold() 144 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 149 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic() 162 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 190 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/arch/frv/include/asm/ |
H A D | checksum.h | 108 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 116 : "r" (daddr), "r" (saddr), "r" (len + proto), "0"(sum) csum_tcpudp_nofold() 123 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 126 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 137 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, csum_ipv6_magic() argument 173 : "r" (saddr), "r" (daddr), "0" (sum), "2" (len + proto) csum_ipv6_magic()
|
/linux-4.1.27/arch/m32r/include/asm/ |
H A D | checksum.h | 116 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 136 : "r" (daddr), "r" (saddr), "r" (len_proto), "0" (sum) csum_tcpudp_nofold() 147 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 152 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic() 166 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 195 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/arch/ia64/include/asm/ |
H A D | checksum.h | 19 extern __sum16 csum_tcpudp_magic (__be32 saddr, __be32 daddr, 24 extern __wsum csum_tcpudp_nofold (__be32 saddr, __be32 daddr, 75 extern __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
|
/linux-4.1.27/arch/alpha/include/asm/ |
H A D | checksum.h | 16 extern __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, 21 __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, 71 extern __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
|
/linux-4.1.27/include/asm-generic/ |
H A D | checksum.h | 68 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, 74 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_magic() argument 77 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); csum_tcpudp_magic()
|
/linux-4.1.27/arch/avr32/include/asm/ |
H A D | checksum.h | 113 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 123 : "r"(daddr), "r"(saddr), "r"(len + proto), csum_tcpudp_nofold() 134 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 139 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic()
|
/linux-4.1.27/net/netfilter/ipvs/ |
H A D | ip_vs_proto_ah_esp.c | 50 &iph->saddr, htons(PORT_ISAKMP), ah_esp_conn_fill_param_proto() 55 &iph->saddr, htons(PORT_ISAKMP), p); ah_esp_conn_fill_param_proto() 78 IP_VS_DBG_ADDR(af, &iph->saddr), ah_esp_conn_in_get() 101 IP_VS_DBG_ADDR(af, &iph->saddr), ah_esp_conn_out_get()
|
H A D | ip_vs_xmit.c | 55 IP_VS_RT_MODE_CONNECT = 8, /* Always bind route to saddr */ 123 /* Get route to daddr, update *saddr, optionally bind route to saddr */ do_output_route4() 125 int rt_mode, __be32 *saddr) do_output_route4() 139 /* Invalid saddr ? */ do_output_route4() 140 if (PTR_ERR(rt) == -EINVAL && *saddr && do_output_route4() 142 *saddr = 0; do_output_route4() 148 } else if (!*saddr && rt_mode & IP_VS_RT_MODE_CONNECT && fl4.saddr) { do_output_route4() 150 *saddr = fl4.saddr; do_output_route4() 151 flowi4_update_output(&fl4, 0, 0, daddr, fl4.saddr); do_output_route4() 155 *saddr = fl4.saddr; do_output_route4() 178 int addr_type = ipv6_addr_type(&ipv6_hdr(skb)->saddr); crosses_local_route_boundary() 188 source_is_loopback = ipv4_is_loopback(ip_hdr(skb)->saddr); crosses_local_route_boundary() 230 &ipv6_hdr(skb)->saddr); ensure_mtu_is_adequate() 249 &ip_hdr(skb)->saddr); ensure_mtu_is_adequate() 298 __be32 saddr = htonl(INADDR_ANY); __ip_vs_get_out_rt() local 303 * for performance reasons because we do not remember saddr __ip_vs_get_out_rt() 306 rt = do_output_route4(net, daddr, rt_mode, &saddr); __ip_vs_get_out_rt() 310 *ret_saddr = saddr; __ip_vs_get_out_rt() 378 if (ipv6_addr_any(&fl6.saddr) && __ip_vs_route_output_v6() 380 &fl6.daddr, 0, &fl6.saddr) < 0) __ip_vs_route_output_v6() 389 *ret_saddr = fl6.saddr; __ip_vs_route_output_v6() 962 __be32 saddr; /* Source for tunnel */ ip_vs_tunnel_xmit() local 980 IP_VS_RT_MODE_TUNNEL, &saddr, ipvsh); ip_vs_tunnel_xmit() 1025 iph->saddr = saddr; ip_vs_tunnel_xmit() 1057 struct in6_addr saddr; /* Source for tunnel */ ip_vs_tunnel_xmit_v6() local 1071 &saddr, ipvsh, 1, ip_vs_tunnel_xmit_v6() 1117 iph->saddr = saddr; ip_vs_tunnel_xmit_v6() 124 do_output_route4(struct net *net, __be32 daddr, int rt_mode, __be32 *saddr) do_output_route4() argument
|
H A D | ip_vs_proto.c | 251 sprintf(buf, "%pI4->%pI4 frag", &ih->saddr, &ih->daddr); ip_vs_tcpudp_debug_packet_v4() 259 &ih->saddr, &ih->daddr); ip_vs_tcpudp_debug_packet_v4() 262 &ih->saddr, ntohs(pptr[0]), ip_vs_tcpudp_debug_packet_v4() 283 sprintf(buf, "%pI6c->%pI6c frag", &ih->saddr, &ih->daddr); ip_vs_tcpudp_debug_packet_v6() 291 &ih->saddr, &ih->daddr); ip_vs_tcpudp_debug_packet_v6() 294 &ih->saddr, ntohs(pptr[0]), ip_vs_tcpudp_debug_packet_v6()
|
H A D | ip_vs_core.c | 249 /* Mask saddr with the netmask to adjust template granularity */ ip_vs_sched_persist() 252 ipv6_addr_prefix(&snet.in6, &iph->saddr.in6, ip_vs_sched_persist() 256 snet.ip = iph->saddr.ip & svc->netmask; ip_vs_sched_persist() 260 IP_VS_DBG_ADDR(svc->af, &iph->saddr), ntohs(src_port), ip_vs_sched_persist() 369 ip_vs_conn_fill_param(svc->net, svc->af, iph->protocol, &iph->saddr, ip_vs_sched_persist() 499 &iph->saddr, pptr[0], &iph->daddr, ip_vs_schedule() 570 &iph->saddr, pptr[0], ip_vs_leave() 718 iph->saddr = cp->vaddr.ip; ip_vs_nat_icmp() 725 ciph->saddr = cp->daddr.ip; ip_vs_nat_icmp() 773 iph->saddr = cp->vaddr.in6; ip_vs_nat_icmp_v6() 777 ciph->saddr = cp->daddr.in6; ip_vs_nat_icmp_v6() 795 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, ip_vs_nat_icmp_v6() 903 &iph->saddr, &iph->daddr); ip_vs_out_icmp() 944 snet.ip = iph->saddr; ip_vs_out_icmp() 985 &ipvsh->saddr, &ipvsh->daddr); ip_vs_out_icmp_v6() 992 ciph.saddr.in6 = ip6h->saddr; /* conn_out_get() handles reverse order */ ip_vs_out_icmp_v6() 1008 snet.in6 = ciph.saddr.in6; ip_vs_out_icmp_v6() 1107 ipv6_hdr(skb)->saddr = cp->vaddr.in6; handle_response() 1111 ip_hdr(skb)->saddr = cp->vaddr.ip; handle_response() 1244 if (ip_vs_has_real_service(net, af, iph.protocol, &iph.saddr, ip_vs_out() 1366 &iph->saddr, &iph->daddr); ip_vs_in_icmp() 1435 &iph->saddr); ip_vs_in_icmp() 1457 &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, mtu); ip_vs_in_icmp() 1484 &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, ip_vs_in_icmp() 1547 &iph->saddr, &iph->daddr); ip_vs_in_icmp_v6() 1555 ciph.saddr.in6 = ip6h->saddr; /* conn_in_get() handles reverse order */ ip_vs_in_icmp_v6()
|
H A D | ip_vs_sh.c | 334 dest = ip_vs_sh_get_fallback(svc, s, &iph->saddr, port); ip_vs_sh_schedule() 336 dest = ip_vs_sh_get(svc, s, &iph->saddr, port); ip_vs_sh_schedule() 344 IP_VS_DBG_ADDR(svc->af, &iph->saddr), ip_vs_sh_schedule()
|
/linux-4.1.27/net/irda/ |
H A D | irlap_frame.c | 152 frame->saddr = cpu_to_le32(self->saddr); irlap_send_snrm_frame() 191 info->daddr = le32_to_cpu(frame->saddr); irlap_recv_snrm_cmd() 192 info->saddr = le32_to_cpu(frame->daddr); irlap_recv_snrm_cmd() 195 if (info->saddr != self->saddr) { irlap_recv_snrm_cmd() 237 frame->saddr = cpu_to_le32(self->saddr); irlap_send_ua_response_frame() 347 frame->saddr = cpu_to_le32(self->saddr); irlap_send_discovery_xid_frame() 426 info->daddr = le32_to_cpu(xid->saddr); irlap_recv_discovery_xid_rsp() 427 info->saddr = le32_to_cpu(xid->daddr); irlap_recv_discovery_xid_rsp() 430 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { irlap_recv_discovery_xid_rsp() 442 discovery->data.saddr = self->saddr; irlap_recv_discovery_xid_rsp() 497 info->daddr = le32_to_cpu(xid->saddr); irlap_recv_discovery_xid_cmd() 498 info->saddr = le32_to_cpu(xid->daddr); irlap_recv_discovery_xid_cmd() 501 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { irlap_recv_discovery_xid_cmd() 548 discovery->data.saddr = self->saddr; irlap_recv_discovery_xid_cmd() 1204 /* Broadcast frames must include saddr and daddr fields */ irlap_send_test_frame() 1210 frame->saddr = cpu_to_le32(self->saddr); irlap_send_test_frame() 1244 /* Broadcast frames must carry saddr and daddr fields */ irlap_recv_test_frame() 1253 info->daddr = le32_to_cpu(frame->saddr); irlap_recv_test_frame() 1254 info->saddr = le32_to_cpu(frame->daddr); irlap_recv_test_frame() 1257 if ((info->saddr != self->saddr) && irlap_recv_test_frame() 1258 (info->saddr != BROADCAST)) { irlap_recv_test_frame()
|
H A D | discovery.c | 83 if ((node->data.saddr == new->data.saddr) && irlmp_add_discovery() 143 * Function irlmp_expire_discoveries (log, saddr, force) 147 * Note : this assume that IrLAP won't change its saddr, which 150 void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) irlmp_expire_discoveries() argument 169 if ((curr->data.saddr == saddr) && irlmp_expire_discoveries() 233 pr_debug(" saddr=%08x\n", discovery->data.saddr); 387 seq_printf(seq,", saddr: 0x%08x, daddr: 0x%08x\n\n", discovery_seq_show() 388 discovery->data.saddr, discovery_seq_show()
|
H A D | irlap.c | 145 get_random_bytes(&self->saddr, sizeof(self->saddr)); irlap_open() 146 } while ((self->saddr == 0x0) || (self->saddr == BROADCAST) || irlap_open() 147 (hashbin_lock_find(irlap, self->saddr, NULL)) ); irlap_open() 149 memcpy(dev->dev_addr, &self->saddr, 4); irlap_open() 166 hashbin_insert(irlap, (irda_queue_t *) self, self->saddr, NULL); irlap_open() 168 irlmp_register_link(self, self->saddr, &self->notify); irlap_open() 220 irlmp_unregister_link(self->saddr); irlap_close() 224 lap = hashbin_remove(irlap, self->saddr, NULL); irlap_close() 246 irlmp_link_connect_indication(self->notify.instance, self->saddr, irlap_connect_indication() 1122 seq_printf(seq, "saddr: %#08x, ", self->saddr); irlap_seq_show()
|
H A D | irlmp.c | 276 * Function irlmp_register_irlap (saddr, notify) 282 void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify) irlmp_register_link() argument 299 lap->saddr = saddr; irlmp_register_link() 319 hashbin_insert(irlmp->links, (irda_queue_t *) lap, lap->saddr, NULL); irlmp_register_link() 330 * Function irlmp_unregister_irlap (saddr) 335 void irlmp_unregister_link(__u32 saddr) irlmp_unregister_link() argument 342 link = hashbin_remove(irlmp->links, saddr, NULL); irlmp_unregister_link() 352 irlmp_expire_discoveries(irlmp->cachelog, link->saddr, TRUE); irlmp_unregister_link() 369 __u32 saddr, __u32 daddr, irlmp_connect_request() 380 pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", irlmp_connect_request() 381 __func__, self->slsap_sel, dlsap_sel, saddr, daddr); irlmp_connect_request() 412 * passed us the saddr (and already knows which link to use), then irlmp_connect_request() 417 if ((!saddr) || (saddr == DEV_ADDR_ANY)) { irlmp_connect_request() 431 saddr = discovery->data.saddr; irlmp_connect_request() 436 lap = hashbin_lock_find(irlmp->links, saddr, NULL); irlmp_connect_request() 821 irlmp_expire_discoveries(irlmp->cachelog, lap->saddr, irlmp_do_expiry() 1938 seq_printf(seq, "saddr: %#08x, daddr: %#08x, ", irlmp_seq_show() 1939 lap->saddr, lap->daddr); irlmp_seq_show() 368 irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, __u32 saddr, __u32 daddr, struct qos_info *qos, struct sk_buff *userdata) irlmp_connect_request() argument
|
/linux-4.1.27/arch/hexagon/include/asm/ |
H A D | checksum.h | 41 __wsum csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, 45 __sum16 csum_tcpudp_magic(unsigned long saddr, unsigned long daddr,
|
/linux-4.1.27/arch/arc/include/asm/ |
H A D | checksum.h | 73 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, csum_tcpudp_nofold() argument 83 : "r"(saddr), "r"(daddr), csum_tcpudp_nofold()
|
/linux-4.1.27/include/linux/ |
H A D | lsm_audit.h | 34 __be32 saddr; member in struct:lsm_network_audit::__anon11905::__anon11906 38 struct in6_addr saddr; member in struct:lsm_network_audit::__anon11905::__anon11907
|
H A D | icmpv6.h | 42 const struct in6_addr *saddr,
|
H A D | mroute.h | 105 __be32 saddr, __be32 daddr,
|
/linux-4.1.27/arch/x86/lib/ |
H A D | csum-wrappers_64.c | 136 __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 145 asm(" addq (%[saddr]),%[sum]\n" csum_ipv6_magic() 146 " adcq 8(%[saddr]),%[sum]\n" csum_ipv6_magic() 152 : "[sum]" (rest), [saddr] "r" (saddr), [daddr] "r" (daddr)); csum_ipv6_magic()
|
/linux-4.1.27/drivers/video/fbdev/ |
H A D | hitfb.c | 63 u32 saddr = WIDTH * dy + dx; hitfb_accel_set_dest() local 65 saddr <<= 1; hitfb_accel_set_dest() 70 fb_writew(saddr & 0xffff, HD64461_BBTDSARL); hitfb_accel_set_dest() 71 fb_writew(saddr >> 16, HD64461_BBTDSARH); hitfb_accel_set_dest() 79 u32 saddr, daddr; hitfb_accel_bitblt() local 86 saddr = WIDTH * (sy + height) + sx + width; hitfb_accel_bitblt() 99 saddr = WIDTH * sy + sx; hitfb_accel_bitblt() 108 saddr <<= 1; hitfb_accel_bitblt() 113 fb_writew(saddr & 0xffff, HD64461_BBTSSARL); hitfb_accel_bitblt() 114 fb_writew(saddr >> 16, HD64461_BBTSSARH); hitfb_accel_bitblt()
|
/linux-4.1.27/net/dccp/ |
H A D | ipv6.c | 45 const struct in6_addr *saddr, dccp_v6_csum_finish() 48 return csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_DCCP, skb->csum); dccp_v6_csum_finish() 57 dh->dccph_checksum = dccp_v6_csum_finish(skb, &np->saddr, &sk->sk_v6_daddr); dccp_v6_send_check() 63 ipv6_hdr(skb)->saddr.s6_addr32, dccp_v6_init_sequence() 90 &hdr->saddr, ntohs(dh->dccph_sport), dccp_v6_err() 197 fl6.saddr = ireq->ir_v6_loc_addr; dccp_v6_send_response() 262 dccp_hdr(skb)->dccph_checksum = dccp_v6_csum_finish(skb, &rxip6h->saddr, dccp_v6_ctl_send_reset() 266 fl6.daddr = rxip6h->saddr; dccp_v6_ctl_send_reset() 267 fl6.saddr = rxip6h->daddr; dccp_v6_ctl_send_reset() 305 req = inet6_csk_search_req(sk, dh->dccph_sport, &iph->saddr, dccp_v6_hnd_req() 314 &iph->saddr, dh->dccph_sport, dccp_v6_hnd_req() 373 ireq->ir_v6_rmt_addr = ipv6_hdr(skb)->saddr; dccp_v6_conn_request() 443 newnp->saddr = newsk->sk_v6_rcv_saddr; dccp_v6_request_recv_sock() 479 fl6.saddr = ireq->ir_v6_loc_addr; dccp_v6_request_recv_sock() 511 newnp->saddr = ireq->ir_v6_loc_addr; dccp_v6_request_recv_sock() 710 if (dccp_v6_csum_finish(skb, &ipv6_hdr(skb)->saddr, dccp_v6_rcv() 803 struct in6_addr *saddr = NULL, *final_p, final; dccp_v6_connect() local 889 np->saddr = sk->sk_v6_rcv_saddr; dccp_v6_connect() 894 saddr = &sk->sk_v6_rcv_saddr; dccp_v6_connect() 898 fl6.saddr = saddr ? *saddr : np->saddr; dccp_v6_connect() 913 if (saddr == NULL) { dccp_v6_connect() 914 saddr = &fl6.saddr; dccp_v6_connect() 915 sk->sk_v6_rcv_saddr = *saddr; dccp_v6_connect() 919 np->saddr = *saddr; dccp_v6_connect() 935 dp->dccps_iss = secure_dccpv6_sequence_number(np->saddr.s6_addr32, dccp_v6_connect() 44 dccp_v6_csum_finish(struct sk_buff *skb, const struct in6_addr *saddr, const struct in6_addr *daddr) dccp_v6_csum_finish() argument
|
H A D | ipv4.c | 91 inet->inet_saddr = fl4->saddr; dccp_v4_connect() 258 iph->saddr, ntohs(dh->dccph_sport), dccp_v4_err() 382 ip_hdr(skb)->saddr, dccp_v4_init_sequence() 453 iph->saddr, iph->daddr); dccp_v4_hnd_req() 461 iph->saddr, dh->dccph_sport, dccp_v4_hnd_req() 483 .daddr = iph->saddr, dccp_v4_route_skb() 484 .saddr = iph->daddr, dccp_v4_route_skb() 555 dccp_hdr(skb)->dccph_checksum = dccp_v4_csum_finish(skb, rxiph->saddr, dccp_v4_ctl_send_reset() 561 rxiph->daddr, rxiph->saddr, NULL); dccp_v4_ctl_send_reset() 643 sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr); dccp_v4_conn_request() 819 if (dccp_v4_csum_finish(skb, iph->saddr, iph->daddr)) { dccp_v4_rcv() 831 &iph->saddr, ntohs(dh->dccph_sport), dccp_v4_rcv()
|
/linux-4.1.27/net/netrom/ |
H A D | nr_dev.c | 70 const void *daddr, const void *saddr, unsigned int len) nr_header() 74 memcpy(buff, (saddr != NULL) ? saddr : dev->dev_addr, dev->addr_len); nr_header() 68 nr_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) nr_header() argument
|
/linux-4.1.27/include/net/irda/ |
H A D | irlap_frame.h | 92 __le32 saddr; /* Source device address */ member in struct:xid_frame 102 __le32 saddr; /* Source device address */ member in struct:test_frame 109 __le32 saddr; /* Source device address */ member in struct:ua_frame 136 __le32 saddr; member in struct:snrm_frame
|
H A D | iriap.h | 65 __u32 saddr; member in struct:iriap_cb 98 __u32 saddr, __u32 daddr,
|
H A D | irlmp.h | 152 __u32 saddr; /* Source device address */ member in struct:lap_cb 210 void irlmp_register_link(struct irlap_cb *, __u32 saddr, notify_t *); 211 void irlmp_unregister_link(__u32 saddr); 214 __u32 saddr, __u32 daddr, 251 return (self && self->lap) ? self->lap->saddr : 0; irlmp_get_saddr()
|
H A D | ircomm_core.h | 70 __u32 saddr; /* Source device address (link we are using) */ member in struct:ircomm_cb 92 __u32 saddr, __u32 daddr, struct sk_buff *skb,
|
H A D | ircomm_event.h | 65 __u32 saddr; /* Source device address */ member in struct:ircomm_info
|
H A D | irlan_client.h | 37 void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr);
|
H A D | irlmp_frame.h | 52 void irlmp_link_connect_indication(struct lap_cb *, __u32 saddr, __u32 daddr,
|
H A D | af_irda.h | 42 __u32 saddr; /* my local address */ member in struct:irda_sock
|
H A D | ircomm_tty_attach.h | 62 __u32 saddr; /* Source device address */ member in struct:ircomm_tty_info
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | checksum.h | 26 extern __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, 104 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 112 s += (__force u32)saddr; csum_tcpudp_nofold() 125 : "r" (daddr), "r"(saddr), "r"(proto + len), "0"(sum)); csum_tcpudp_nofold()
|
/linux-4.1.27/arch/hexagon/lib/ |
H A D | checksum.c | 63 __sum16 csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, csum_tcpudp_magic() argument 68 (__force u64)saddr + (__force u64)daddr + csum_tcpudp_magic() 72 __wsum csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, csum_tcpudp_nofold() argument 78 result = (__force u64)saddr + (__force u64)daddr + csum_tcpudp_nofold()
|
/linux-4.1.27/arch/alpha/lib/ |
H A D | checksum.c | 44 __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 50 (__force u64)saddr + (__force u64)daddr + csum_tcpudp_magic() 54 __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 61 result = (__force u64)saddr + (__force u64)daddr + csum_tcpudp_nofold()
|
H A D | ev6-csum_ipv6_magic.S | 5 * unsigned short csum_ipv6_magic(struct in6_addr *saddr, 22 * unsigned short csum_ipv6_magic(struct in6_addr *saddr,
|
H A D | csum_ipv6_magic.S | 5 * unsigned short csum_ipv6_magic(struct in6_addr *saddr,
|
/linux-4.1.27/net/ax25/ |
H A D | ax25_ip.c | 51 const void *saddr, unsigned int len) ax25_hard_header() 71 if (saddr != NULL) ax25_hard_header() 72 memcpy(buff, saddr, dev->addr_len); ax25_hard_header() 220 const void *saddr, unsigned int len) ax25_hard_header() 49 ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) ax25_hard_header() argument 218 ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) ax25_hard_header() argument
|
/linux-4.1.27/arch/cris/include/asm/ |
H A D | checksum.h | 65 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, csum_tcpudp_magic() argument 70 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); csum_tcpudp_magic()
|
/linux-4.1.27/security/ |
H A D | lsm_audit.c | 52 ad->u.net->v4info.saddr = ih->saddr; ipv4_skb_to_auditdata() 122 ad->u.net->v6info.saddr = ip6->saddr; ipv6_skb_to_auditdata() 345 print_ipv4_addr(ab, a->u.net->v4info.saddr, dump_common_audit_data() 347 "saddr", "src"); dump_common_audit_data() 353 print_ipv6_addr(ab, &a->u.net->v6info.saddr, dump_common_audit_data() 355 "saddr", "src"); dump_common_audit_data()
|
/linux-4.1.27/include/uapi/linux/ |
H A D | xfrm.h | 50 xfrm_address_t saddr; member in struct:xfrm_selector 238 xfrm_address_t saddr; member in struct:xfrm_user_tmpl 362 xfrm_address_t saddr; member in struct:xfrm_usersa_info 393 xfrm_address_t saddr; member in struct:xfrm_aevent_id 429 xfrm_address_t saddr; member in struct:xfrm_user_acquire 489 xfrm_address_t saddr; member in struct:xfrm_address_filter
|
H A D | if_fc.h | 39 __u8 saddr[FC_ALEN]; /* source address */ member in struct:fch_hdr
|
H A D | ipv6.h | 130 struct in6_addr saddr; member in struct:ipv6hdr
|
/linux-4.1.27/net/llc/ |
H A D | llc_s_ac.c | 57 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, ev->saddr.lsap, llc_sap_action_send_ui() 60 rc = llc_mac_hdr_init(skb, ev->saddr.mac, ev->daddr.mac); llc_sap_action_send_ui() 80 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, ev->saddr.lsap, llc_sap_action_send_xid_c() 83 rc = llc_mac_hdr_init(skb, ev->saddr.mac, ev->daddr.mac); llc_sap_action_send_xid_c() 134 llc_pdu_header_init(skb, LLC_PDU_TYPE_U, ev->saddr.lsap, llc_sap_action_send_test_c() 137 rc = llc_mac_hdr_init(skb, ev->saddr.mac, ev->daddr.mac); llc_sap_action_send_test_c()
|
/linux-4.1.27/net/sctp/ |
H A D | ipv6.c | 78 static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr, 214 skb->len, &fl6->saddr, &fl6->daddr); sctp_v6_xmit() 229 static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr, sctp_v6_get_dst() argument 258 if (saddr) { sctp_v6_get_dst() 259 fl6->saddr = saddr->v6.sin6_addr; sctp_v6_get_dst() 260 fl6->fl6_sport = saddr->v6.sin6_port; sctp_v6_get_dst() 262 pr_debug("src=%pI6 - ", &fl6->saddr); sctp_v6_get_dst() 267 if (!asoc || saddr) sctp_v6_get_dst() 272 /* ip6_dst_lookup has filled in the fl6->saddr for us. Check sctp_v6_get_dst() 279 sctp_v6_to_addr(&dst_saddr, &fl6->saddr, htons(bp->port)); sctp_v6_get_dst() 322 fl6->saddr = baddr->v6.sin6_addr; sctp_v6_get_dst() 336 &fl6->saddr); sctp_v6_get_dst() 353 /* Fills in the source address(saddr) based on the destination address(daddr) 361 union sctp_addr *saddr = &t->saddr; sctp_v6_get_saddr() local 366 saddr->v6.sin6_family = AF_INET6; sctp_v6_get_saddr() 367 saddr->v6.sin6_addr = fl6->saddr; sctp_v6_get_saddr() 419 addr->v6.sin6_addr = ipv6_hdr(skb)->saddr; sctp_v6_from_skb() 489 static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr, sctp_v6_to_addr() argument 494 addr->v6.sin6_addr = *saddr; sctp_v6_to_addr() 774 addr->v4.sin_addr.s_addr = ip_hdr(skb)->saddr; sctp_inet6_skb_msgname() 779 addr->v6.sin6_addr = ipv6_hdr(skb)->saddr; sctp_inet6_skb_msgname()
|
H A D | protocol.c | 245 from = &ip_hdr(skb)->saddr; sctp_v4_from_skb() 299 static void sctp_v4_dst_saddr(union sctp_addr *saddr, struct flowi4 *fl4, sctp_v4_dst_saddr() argument 302 saddr->v4.sin_family = AF_INET; sctp_v4_dst_saddr() 303 saddr->v4.sin_port = port; sctp_v4_dst_saddr() 304 saddr->v4.sin_addr.s_addr = fl4->saddr; sctp_v4_dst_saddr() 423 static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr, sctp_v4_get_dst() argument 444 if (saddr) { sctp_v4_get_dst() 445 fl4->saddr = saddr->v4.sin_addr.s_addr; sctp_v4_get_dst() 446 fl4->fl4_sport = saddr->v4.sin_port; sctp_v4_get_dst() 450 &fl4->saddr); sctp_v4_get_dst() 459 if (!asoc || saddr) sctp_v4_get_dst() 517 &fl4->daddr, &fl4->saddr); sctp_v4_get_dst() 529 union sctp_addr *saddr = &t->saddr; sctp_v4_get_saddr() local 533 saddr->v4.sin_family = AF_INET; sctp_v4_get_saddr() 534 saddr->v4.sin_addr.s_addr = fl->u.ip4.saddr; sctp_v4_get_saddr() 899 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; sctp_inet_skb_msgname() 960 skb->len, &transport->fl.u.ip4.saddr, &transport->fl.u.ip4.daddr); sctp_v4_xmit()
|
H A D | transport.c | 63 memset(&peer->saddr, 0, sizeof(union sctp_addr)); sctp_transport_init() 226 transport->af_specific->get_dst(transport, &transport->saddr, sctp_transport_pmtu() 254 t->af_specific->get_dst(t, &t->saddr, &t->fl, sk); sctp_transport_update_pmtu() 261 t->af_specific->get_dst(t, &t->saddr, &t->fl, sk); sctp_transport_update_pmtu() 269 union sctp_addr *saddr, struct sctp_sock *opt) sctp_transport_route() 274 af->get_dst(transport, saddr, &transport->fl, sctp_opt2sk(opt)); sctp_transport_route() 276 if (saddr) sctp_transport_route() 277 memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); sctp_transport_route() 292 opt->pf->to_sk_saddr(&transport->saddr, sctp_transport_route() 268 sctp_transport_route(struct sctp_transport *transport, union sctp_addr *saddr, struct sctp_sock *opt) sctp_transport_route() argument
|
/linux-4.1.27/drivers/staging/wlan-ng/ |
H A D | p80211conv.c | 195 memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN); skb_ether_to_p80211() 283 u8 saddr[WLAN_ETHADDR_LEN]; skb_p80211_to_ether() local 300 memcpy(saddr, w_hdr->a3.a2, WLAN_ETHADDR_LEN); skb_p80211_to_ether() 304 memcpy(saddr, w_hdr->a3.a3, WLAN_ETHADDR_LEN); skb_p80211_to_ether() 308 memcpy(saddr, w_hdr->a3.a2, WLAN_ETHADDR_LEN); skb_p80211_to_ether() 317 memcpy(saddr, w_hdr->a4.a4, WLAN_ETHADDR_LEN); skb_p80211_to_ether() 362 (memcmp(saddr, e_hdr->saddr, WLAN_ETHADDR_LEN) == 0))) { skb_p80211_to_ether() 409 memcpy(e_hdr->saddr, saddr, WLAN_ETHADDR_LEN); skb_p80211_to_ether() 450 memcpy(e_hdr->saddr, saddr, WLAN_ETHADDR_LEN); skb_p80211_to_ether() 476 memcpy(e_hdr->saddr, saddr, WLAN_ETHADDR_LEN); skb_p80211_to_ether()
|
/linux-4.1.27/net/phonet/ |
H A D | pn_dev.c | 192 u8 saddr; phonet_address_get() local 201 saddr = daddr; phonet_address_get() 203 saddr = find_first_bit(pnd->addrs, 64) << 2; phonet_address_get() 205 saddr = PN_NO_ADDR; phonet_address_get() 208 if (saddr == PN_NO_ADDR) { phonet_address_get() 215 saddr = phonet_address_get(def_dev, daddr); phonet_address_get() 219 return saddr; phonet_address_get()
|
H A D | af_phonet.c | 132 const void *saddr, unsigned int len) pn_header_create() 139 if (!saddr) pn_header_create() 140 saddr = dev->dev_addr; pn_header_create() 141 *media = *(const u8 *)saddr; pn_header_create() 245 u8 daddr, saddr, res; pn_skb_send() local 278 saddr = phonet_address_get(dev, daddr); pn_skb_send() 279 if (saddr == PN_NO_ADDR) pn_skb_send() 283 src = pn_object(saddr, pn_obj(src)); pn_skb_send() 130 pn_header_create(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) pn_header_create() argument
|
H A D | socket.c | 172 u8 saddr; pn_socket_bind() local 183 saddr = pn_addr(handle); pn_socket_bind() 184 if (saddr && phonet_address_lookup(sock_net(sk), saddr)) pn_socket_bind() 199 pn->sobject = pn_object(saddr, pn_port(pn->sobject)); pn_socket_bind() 375 u8 saddr; pn_socket_ioctl() local 387 saddr = phonet_address_get(dev, pn_addr(handle)); pn_socket_ioctl() 389 saddr = PN_NO_ADDR; pn_socket_ioctl() 394 if (saddr == PN_NO_ADDR) pn_socket_ioctl() 397 handle = pn_object(saddr, pn_port(pn->sobject)); pn_socket_ioctl()
|
/linux-4.1.27/net/irda/irlan/ |
H A D | irlan_client.c | 86 irlan_client_wakeup(self, self->saddr, self->daddr); irlan_client_kick_timer_expired() 97 * Function irlan_client_wakeup (self, saddr, daddr) 102 void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) irlan_client_wakeup() argument 119 self->saddr = saddr; irlan_client_wakeup() 148 __u32 saddr, daddr; irlan_client_discovery_indication() local 161 saddr = discovery->saddr; irlan_client_discovery_indication() 173 irlan_client_wakeup(self, saddr, daddr); irlan_client_discovery_indication()
|
H A D | irlan_client_event.c | 111 self->saddr, self->daddr, irlan_client_state_idle() 148 self->saddr, self->daddr, NULL, irlan_client_state_query() 159 irlan_client_wakeup(self, self->saddr, self->daddr); irlan_client_state_query() 329 self->saddr, self->daddr, &qos, irlan_client_state_open() 411 self->saddr, self->daddr, &qos, irlan_client_state_arb()
|
/linux-4.1.27/net/irda/ircomm/ |
H A D | ircomm_tty_attach.c | 192 self->daddr = self->saddr = 0; ircomm_tty_detach_cable() 377 info.saddr = discovery->saddr; ircomm_tty_discovery_indication() 672 self->saddr = info->saddr; ircomm_tty_state_idle() 684 self->saddr, self->daddr, ircomm_tty_state_idle() 730 self->saddr = info->saddr; ircomm_tty_state_search() 742 iriap_getvaluebyclass_request(self->iriap, self->saddr, ircomm_tty_state_search() 747 iriap_getvaluebyclass_request(self->iriap, self->saddr, ircomm_tty_state_search() 811 iriap_getvaluebyclass_request(self->iriap, self->saddr, ircomm_tty_state_query_parameters() 862 self->saddr, self->daddr, ircomm_tty_state_query_lsap_sel()
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | una_asm_32.S | 78 * unsigned long *saddr, int is_signed) 82 * %o2 = saddr
|
/linux-4.1.27/net/bridge/ |
H A D | br_multicast.c | 388 iph->saddr = br->multicast_query_use_ifaddr ? br_ip4_multicast_alloc_query() 451 &ip6h->saddr)) { br_ip6_multicast_alloc_query() 485 mldq->mld_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, br_ip6_multicast_alloc_query() 798 br->ip4_querier.addr.u.ip4 = ip_hdr(skb)->saddr; br_multicast_select_own_querier() 801 br->ip6_querier.addr.u.ip6 = ipv6_hdr(skb)->saddr; br_multicast_select_own_querier() 1085 __be32 saddr) br_ip4_multicast_select_querier() 1094 if (ntohl(saddr) <= ntohl(br->ip4_querier.addr.u.ip4)) br_ip4_multicast_select_querier() 1100 br->ip4_querier.addr.u.ip4 = saddr; br_ip4_multicast_select_querier() 1111 struct in6_addr *saddr) br_ip6_multicast_select_querier() 1117 if (ipv6_addr_cmp(saddr, &br->ip6_querier.addr.u.ip6) <= 0) br_ip6_multicast_select_querier() 1123 br->ip6_querier.addr.u.ip6 = *saddr; br_ip6_multicast_select_querier() 1134 struct br_ip *saddr) br_multicast_select_querier() 1136 switch (saddr->proto) { br_multicast_select_querier() 1138 return br_ip4_multicast_select_querier(br, port, saddr->u.ip4); br_multicast_select_querier() 1141 return br_ip6_multicast_select_querier(br, port, &saddr->u.ip6); br_multicast_select_querier() 1209 struct br_ip *saddr, br_multicast_query_received() 1212 if (!br_multicast_select_querier(br, port, saddr)) br_multicast_query_received() 1230 struct br_ip saddr; br_ip4_multicast_query() local 1273 saddr.proto = htons(ETH_P_IP); br_ip4_multicast_query() 1274 saddr.u.ip4 = iph->saddr; br_ip4_multicast_query() 1277 &saddr, max_delay); br_ip4_multicast_query() 1319 struct br_ip saddr; br_ip6_multicast_query() local 1332 if (!(ipv6_addr_type(&ip6h->saddr) & IPV6_ADDR_LINKLOCAL)) { br_ip6_multicast_query() 1369 saddr.proto = htons(ETH_P_IPV6); br_ip6_multicast_query() 1370 saddr.u.ip6 = ip6h->saddr; br_ip6_multicast_query() 1373 &saddr, max_delay); br_ip6_multicast_query() 1741 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, skb2->len, br_multicast_ipv6_rcv() 1746 skb2->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, br_multicast_ipv6_rcv() 1083 br_ip4_multicast_select_querier(struct net_bridge *br, struct net_bridge_port *port, __be32 saddr) br_ip4_multicast_select_querier() argument 1109 br_ip6_multicast_select_querier(struct net_bridge *br, struct net_bridge_port *port, struct in6_addr *saddr) br_ip6_multicast_select_querier() argument 1132 br_multicast_select_querier(struct net_bridge *br, struct net_bridge_port *port, struct br_ip *saddr) br_multicast_select_querier() argument 1206 br_multicast_query_received(struct net_bridge *br, struct net_bridge_port *port, struct bridge_mcast_other_query *query, struct br_ip *saddr, unsigned long max_delay) br_multicast_query_received() argument
|
/linux-4.1.27/arch/mips/include/asm/ |
H A D | checksum.h | 163 static inline __wsum csum_tcpudp_nofold(__be32 saddr, csum_tcpudp_nofold() argument 194 "r" ((__force unsigned long)saddr), csum_tcpudp_nofold() 216 static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, csum_ipv6_magic() argument 276 : "r" (saddr), "r" (daddr), csum_ipv6_magic()
|
/linux-4.1.27/net/sched/ |
H A D | act_nat.c | 123 addr = iph->saddr; tcf_nat() 139 iph->saddr = new_addr; tcf_nat() 209 addr = iph->saddr; tcf_nat() 230 iph->saddr = new_addr; tcf_nat()
|
/linux-4.1.27/samples/bpf/ |
H A D | tcbpf1_kern.c | 31 #define IP_SRC_OFF (ETH_HLEN + offsetof(struct iphdr, saddr))
|
H A D | sockex2_kern.c | 72 flow->src = load_word(skb, nhoff + offsetof(struct iphdr, saddr)); parse_ip() 91 nhoff + offsetof(struct ipv6hdr, saddr)); parse_ipv6()
|
/linux-4.1.27/drivers/net/ipvlan/ |
H A D | ipvlan_core.c | 170 if (ipv6_addr_any(&ip6h->saddr) && htons() 298 i6addr = use_dest ? &ip6h->daddr : &ip6h->saddr; ipvlan_addr_lookup() 317 i4addr = use_dest ? &ip4h->daddr : &ip4h->saddr; ipvlan_addr_lookup() 349 .saddr = ip4h->saddr, ipvlan_process_v4_outbound() 384 .saddr = ip6h->saddr, ipvlan_process_v6_outbound()
|
/linux-4.1.27/net/8021q/ |
H A D | vlan_dev.c | 11 * - see that changed MAC is saddr for outgoing packets 42 * saddr=NULL means use device source address 50 const void *daddr, const void *saddr, vlan_dev_hard_header() 81 if (saddr == NULL) vlan_dev_hard_header() 82 saddr = dev->dev_addr; vlan_dev_hard_header() 86 rc = dev_hard_header(skb, dev, type, daddr, saddr, len + vhdrlen); vlan_dev_hard_header() 509 const void *daddr, const void *saddr, vlan_passthru_hard_header() 515 if (saddr == NULL) vlan_passthru_hard_header() 516 saddr = dev->dev_addr; vlan_passthru_hard_header() 518 return dev_hard_header(skb, real_dev, type, daddr, saddr, len); vlan_passthru_hard_header() 48 vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) vlan_dev_hard_header() argument 507 vlan_passthru_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) vlan_passthru_hard_header() argument
|
/linux-4.1.27/net/6lowpan/ |
H A D | iphc.c | 234 const u8 *saddr, const u8 saddr_type, lowpan_header_decompress() 323 err = uncompress_context_based_src_addr(skb, &hdr.saddr, tmp); lowpan_header_decompress() 327 err = uncompress_addr(skb, &hdr.saddr, tmp, saddr, lowpan_header_decompress() 449 raw_dump_inline(__func__, "saddr", lowpan_header_compress() 528 addr_type = ipv6_addr_type(&hdr->saddr); lowpan_header_compress() 537 &hdr->saddr, _saddr); lowpan_header_compress() 539 &hdr->saddr, iphc1); lowpan_header_compress() 542 lowpan_push_hc_data(&hc_ptr, hdr->saddr.s6_addr, 16); lowpan_header_compress() 233 lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev, const u8 *saddr, const u8 saddr_type, const u8 saddr_len, const u8 *daddr, const u8 daddr_type, const u8 daddr_len, u8 iphc0, u8 iphc1) lowpan_header_decompress() argument
|
/linux-4.1.27/drivers/net/ |
H A D | vxlan.c | 122 union vxlan_addr saddr; /* source address */ member in struct:vxlan_dev 1261 union vxlan_addr saddr; vxlan_rcv() local 1285 saddr.sin.sin_addr.s_addr = oip->saddr; vxlan_rcv() 1286 saddr.sa.sa_family = AF_INET; vxlan_rcv() 1290 saddr.sin6.sin6_addr = oip6->saddr; vxlan_rcv() 1291 saddr.sa.sa_family = AF_INET6; vxlan_rcv() 1296 vxlan_snoop(skb->dev, &saddr, eth_hdr(skb)->h_source)) vxlan_rcv() 1311 &oip6->saddr); vxlan_rcv() 1314 &oip->saddr, oip->tos); vxlan_rcv() 1476 pip6->daddr = ipv6_hdr(request)->saddr; vxlan_na_create() 1477 pip6->saddr = *(struct in6_addr *)n->primary_key; vxlan_na_create() 1495 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, vxlan_na_create() 1513 const struct in6_addr *saddr, *daddr; neigh_reduce() local 1522 saddr = &iphdr->saddr; neigh_reduce() 1673 struct net_device *dev, struct in6_addr *saddr, vxlan6_xmit_skb() 1748 udp_tunnel6_xmit_skb(dst, sk, skb, dev, saddr, daddr, prio, vxlan6_xmit_skb() 1925 fl4.saddr = vxlan->saddr.sin.sin_addr.s_addr; vxlan_xmit_one() 1962 err = vxlan_xmit_skb(rt, sk, skb, fl4.saddr, vxlan_xmit_one() 1983 fl6.saddr = vxlan->saddr.sin6.sin6_addr; vxlan_xmit_one() 2021 err = vxlan6_xmit_skb(ndst, sk, skb, dev, &fl6.saddr, &fl6.daddr, vxlan_xmit_one() 2394 [IFLA_VXLAN_LOCAL] = { .len = FIELD_SIZEOF(struct iphdr, saddr) }, 2612 vxlan->saddr.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_VXLAN_LOCAL]); vxlan_newlink() 2613 vxlan->saddr.sa.sa_family = AF_INET; vxlan_newlink() 2619 vxlan->saddr.sin6.sin6_addr = nla_get_in6_addr(data[IFLA_VXLAN_LOCAL6]); vxlan_newlink() 2620 vxlan->saddr.sa.sa_family = AF_INET6; vxlan_newlink() 2720 tmp->saddr.sa.sa_family == AF_INET6) == use_ipv6 && vxlan_newlink() 2823 if (!vxlan_addr_any(&vxlan->saddr)) { vxlan_fill_info() 2824 if (vxlan->saddr.sa.sa_family == AF_INET) { vxlan_fill_info() 2826 vxlan->saddr.sin.sin_addr.s_addr)) vxlan_fill_info() 2831 &vxlan->saddr.sin6.sin6_addr)) vxlan_fill_info() 1671 vxlan6_xmit_skb(struct dst_entry *dst, struct sock *sk, struct sk_buff *skb, struct net_device *dev, struct in6_addr *saddr, struct in6_addr *daddr, __u8 prio, __u8 ttl, __be16 src_port, __be16 dst_port, struct vxlan_metadata *md, bool xnet, u32 vxflags) vxlan6_xmit_skb() argument
|
/linux-4.1.27/drivers/infiniband/core/ |
H A D | addr.c | 237 fl4.saddr = src_ip; addr4_resolve() 245 src_in->sin_addr.s_addr = fl4.saddr; addr4_resolve() 278 fl6.saddr = src_in->sin6_addr; addr6_resolve() 285 if (ipv6_addr_any(&fl6.saddr)) { addr6_resolve() 287 &fl6.daddr, 0, &fl6.saddr); addr6_resolve() 292 src_in->sin6_addr = fl6.saddr; addr6_resolve()
|
/linux-4.1.27/drivers/net/arcnet/ |
H A D | rfc1201.c | 141 int saddr = pkt->hard.source, ofs; rx() local 142 struct Incoming *in = &lp->rfc1201.incoming[saddr]; rx() 156 saddr); rx() 212 if (!*cptr) { /* is saddr = 00? */ rx() 215 saddr); rx() 217 *cptr = saddr; rx() 255 BUGMSG(D_EXTRA, "wrong seq number (saddr=%d, expected=%d, seq=%d, splitflag=%d)\n", rx() 256 saddr, in->sequence, soft->sequence, rx()
|
/linux-4.1.27/lib/ |
H A D | checksum.c | 193 __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, csum_tcpudp_nofold() argument 200 s += (__force u32)saddr; csum_tcpudp_nofold()
|
/linux-4.1.27/net/openvswitch/ |
H A D | flow.h | 70 __be32 saddr, __be32 daddr, __ovs_flow_tun_info_init() 80 tun_info->tunnel.ipv4_src = saddr; __ovs_flow_tun_info_init() 111 __ovs_flow_tun_info_init(tun_info, iph->saddr, iph->daddr, ovs_flow_tun_info_init() 69 __ovs_flow_tun_info_init(struct ovs_tunnel_info *tun_info, __be32 saddr, __be32 daddr, u8 tos, u8 ttl, __be16 tp_src, __be16 tp_dst, __be64 tun_id, __be16 tun_flags, const void *opts, u8 opts_len) __ovs_flow_tun_info_init() argument
|