Home
last modified time | relevance | path

Searched refs:daddr (Results 1 – 25 of 258) sorted by relevance

1234567891011

/net/xfrm/
Dxfrm_hash.h18 static inline unsigned int __xfrm4_daddr_saddr_hash(const xfrm_address_t *daddr, in __xfrm4_daddr_saddr_hash() argument
21 u32 sum = (__force u32)daddr->a4 + (__force u32)saddr->a4; in __xfrm4_daddr_saddr_hash()
25 static inline unsigned int __xfrm6_daddr_saddr_hash(const xfrm_address_t *daddr, in __xfrm6_daddr_saddr_hash() argument
28 return ntohl(daddr->a6[2] ^ daddr->a6[3] ^ in __xfrm6_daddr_saddr_hash()
44 static inline unsigned int __xfrm4_dpref_spref_hash(const xfrm_address_t *daddr, in __xfrm4_dpref_spref_hash() argument
49 return jhash_2words(ntohl(daddr->a4) & __bits2mask32(dbits), in __xfrm4_dpref_spref_hash()
75 static inline unsigned int __xfrm6_dpref_spref_hash(const xfrm_address_t *daddr, in __xfrm6_dpref_spref_hash() argument
80 return __xfrm6_pref_hash(daddr, dbits) ^ in __xfrm6_dpref_spref_hash()
84 static inline unsigned int __xfrm_dst_hash(const xfrm_address_t *daddr, in __xfrm_dst_hash() argument
92 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
[all …]
Dxfrm_state.c55 const xfrm_address_t *daddr, in xfrm_dst_hash() argument
60 return __xfrm_dst_hash(daddr, saddr, reqid, family, net->xfrm.state_hmask); in xfrm_dst_hash()
64 const xfrm_address_t *daddr, in xfrm_src_hash() argument
68 return __xfrm_src_hash(daddr, saddr, family, net->xfrm.state_hmask); in xfrm_src_hash()
72 xfrm_spi_hash(struct net *net, const xfrm_address_t *daddr, in xfrm_spi_hash() argument
75 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash()
90 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
95 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
101 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer()
653 const xfrm_address_t *daddr, const xfrm_address_t *saddr, in xfrm_init_tempstate() argument
[all …]
/net/ipv6/
Dip6_checksum.c8 const struct in6_addr *daddr, in csum_ipv6_magic() argument
33 sum += (__force u32)daddr->s6_addr32[0]; in csum_ipv6_magic()
34 carry = (sum < (__force u32)daddr->s6_addr32[0]); in csum_ipv6_magic()
37 sum += (__force u32)daddr->s6_addr32[1]; in csum_ipv6_magic()
38 carry = (sum < (__force u32)daddr->s6_addr32[1]); in csum_ipv6_magic()
41 sum += (__force u32)daddr->s6_addr32[2]; in csum_ipv6_magic()
42 carry = (sum < (__force u32)daddr->s6_addr32[2]); in csum_ipv6_magic()
45 sum += (__force u32)daddr->s6_addr32[3]; in csum_ipv6_magic()
46 carry = (sum < (__force u32)daddr->s6_addr32[3]); in csum_ipv6_magic()
100 const struct in6_addr *daddr, int len) in udp6_set_csum() argument
[all …]
Dudp.c120 const struct in6_addr *daddr, unsigned short hnum, in compute_score() argument
141 if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, daddr)) in compute_score()
167 const struct in6_addr *daddr, unsigned int hnum, int dif, in udp6_lib_lookup2() argument
179 daddr, hnum, dif); in udp6_lib_lookup2()
183 hash = udp6_ehashfn(net, daddr, hnum, in udp6_lib_lookup2()
207 const struct in6_addr *daddr, __be16 dport, in __udp6_lib_lookup() argument
219 hash2 = udp6_portaddr_hash(net, daddr, hnum); in __udp6_lib_lookup()
226 daddr, hnum, dif, in __udp6_lib_lookup()
241 daddr, hnum, dif, in __udp6_lib_lookup()
250 score = compute_score(sk, net, saddr, sport, daddr, hnum, dif); in __udp6_lib_lookup()
[all …]
Dinet6_hashtables.c57 const struct in6_addr *daddr, in __inet6_lookup_established() argument
67 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in __inet6_lookup_established()
76 if (!INET6_MATCH(sk, net, saddr, daddr, ports, dif)) in __inet6_lookup_established()
81 if (unlikely(!INET6_MATCH(sk, net, saddr, daddr, ports, dif))) { in __inet6_lookup_established()
98 const struct in6_addr *daddr, in compute_score() argument
108 if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, daddr)) in compute_score()
128 const __be16 sport, const struct in6_addr *daddr, in inet6_lookup_listener() argument
139 score = compute_score(sk, net, hnum, daddr, dif, exact_dif); in inet6_lookup_listener()
143 phash = inet6_ehashfn(net, daddr, hnum, in inet6_lookup_listener()
167 const struct in6_addr *daddr, const __be16 dport, in inet6_lookup() argument
[all …]
Dnetfilter.c30 .daddr = iph->daddr, in ip6_route_me_harder()
77 struct in6_addr daddr; member
90 rt_info->daddr = iph->daddr; in nf_ip6_saveroute()
103 if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || in nf_ip6_reroute()
143 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
154 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
182 &ip6h->daddr, in nf_ip6_checksum_partial()
Dsyncookies.c46 static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr, in cookie_hash() argument
62 memcpy(tmp + 4, daddr, 16); in cookie_hash()
71 const struct in6_addr *daddr, in secure_tcp_syn_cookie() argument
76 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + in secure_tcp_syn_cookie()
78 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) in secure_tcp_syn_cookie()
83 const struct in6_addr *daddr, __be16 sport, in check_tcp_syn_cookie() argument
88 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; in check_tcp_syn_cookie()
95 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie()
111 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in __cookie_v6_init_sequence()
128 __u32 mssind = check_tcp_syn_cookie(cookie, &iph->saddr, &iph->daddr, in __cookie_v6_check()
[all …]
Dping.c57 struct in6_addr *daddr; in ping_v6_sendmsg() local
81 daddr = &(u->sin6_addr); in ping_v6_sendmsg()
82 if (__ipv6_addr_needs_scope_id(ipv6_addr_type(daddr))) in ping_v6_sendmsg()
87 daddr = &sk->sk_v6_daddr; in ping_v6_sendmsg()
96 if (!oif && ipv6_addr_is_multicast(daddr)) in ping_v6_sendmsg()
101 addr_type = ipv6_addr_type(daddr); in ping_v6_sendmsg()
113 fl6.daddr = *daddr; in ping_v6_sendmsg()
124 dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr); in ping_v6_sendmsg()
135 if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) in ping_v6_sendmsg()
Dicmp.c212 &fl6->daddr, 1); in icmpv6_xrlim_allow()
259 &fl6->daddr, in icmpv6_push_pending_frames()
272 &fl6->daddr, in icmpv6_push_pending_frames()
342 if (ipv6_anycast_destination(dst, &fl6->daddr)) { in icmpv6_route_lookup()
423 addr_type = ipv6_addr_type(&hdr->daddr); in icmp6_send()
425 if (ipv6_chk_addr(net, &hdr->daddr, skb->dev, 0) || in icmp6_send()
426 ipv6_chk_acast_addr_src(net, skb->dev, &hdr->daddr)) in icmp6_send()
427 saddr = &hdr->daddr; in icmp6_send()
464 &hdr->saddr, &hdr->daddr); in icmp6_send()
473 &hdr->saddr, &hdr->daddr); in icmp6_send()
[all …]
/net/phonet/
Dpn_dev.c189 u8 phonet_address_get(struct net_device *dev, u8 daddr) in phonet_address_get() argument
200 if (test_bit(daddr >> 2, pnd->addrs)) in phonet_address_get()
201 saddr = daddr; in phonet_address_get()
215 saddr = phonet_address_get(def_dev, daddr); in phonet_address_get()
367 int phonet_route_add(struct net_device *dev, u8 daddr) in phonet_route_add() argument
373 daddr = daddr >> 2; in phonet_route_add()
375 if (routes->table[daddr] == NULL) { in phonet_route_add()
376 rcu_assign_pointer(routes->table[daddr], dev); in phonet_route_add()
384 int phonet_route_del(struct net_device *dev, u8 daddr) in phonet_route_del() argument
389 daddr = daddr >> 2; in phonet_route_del()
[all …]
/net/netfilter/
Dxt_TPROXY.c64 tproxy_laddr4(struct sk_buff *skb, __be32 user_laddr, __be32 daddr) in tproxy_laddr4() argument
81 return laddr ? laddr : daddr; in tproxy_laddr4()
110 const __be32 saddr, const __be32 daddr, in nf_tproxy_get_sock_v4() argument
127 daddr, dport, in nf_tproxy_get_sock_v4()
140 saddr, sport, daddr, dport, in nf_tproxy_get_sock_v4()
148 sk = udp4_lib_lookup(net, saddr, sport, daddr, dport, in nf_tproxy_get_sock_v4()
172 protocol, ntohl(saddr), ntohs(sport), ntohl(daddr), ntohs(dport), lookup_type, sk); in nf_tproxy_get_sock_v4()
181 const struct in6_addr *saddr, const struct in6_addr *daddr, in nf_tproxy_get_sock_v6() argument
197 daddr, ntohs(dport), in nf_tproxy_get_sock_v6()
210 saddr, sport, daddr, ntohs(dport), in nf_tproxy_get_sock_v6()
[all …]
Dxt_socket.c89 *raddr = inside_iph->daddr; in extract_icmp4_fields()
117 const __be32 saddr, const __be32 daddr, in xt_socket_get_sock_v4() argument
124 saddr, sport, daddr, dport, in xt_socket_get_sock_v4()
127 return udp4_lib_lookup(net, saddr, sport, daddr, dport, in xt_socket_get_sock_v4()
155 __be32 uninitialized_var(daddr), uninitialized_var(saddr); in xt_socket_lookup_slow_v4()
174 daddr = iph->daddr; in xt_socket_lookup_slow_v4()
182 if (extract_icmp4_fields(skb, &protocol, &saddr, &daddr, in xt_socket_lookup_slow_v4()
202 daddr = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; in xt_socket_lookup_slow_v4()
213 protocol, saddr, daddr, sport, in xt_socket_lookup_slow_v4()
328 *raddr = &inside_iph->daddr; in extract_icmp6_fields()
[all …]
/net/core/
Dsecure_seq.c43 __u32 secure_tcpv6_sequence_number(const __be32 *saddr, const __be32 *daddr, in secure_tcpv6_sequence_number() argument
53 secret[i] = net_secret[i] + (__force u32)daddr[i]; in secure_tcpv6_sequence_number()
65 u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, in secure_ipv6_port_ephemeral() argument
75 secret[i] = net_secret[i] + (__force u32) daddr[i]; in secure_ipv6_port_ephemeral()
89 __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, in secure_tcp_sequence_number() argument
96 hash[1] = (__force u32)daddr; in secure_tcp_sequence_number()
105 u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) in secure_ipv4_port_ephemeral() argument
111 hash[1] = (__force u32)daddr; in secure_ipv4_port_ephemeral()
123 u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, in secure_dccp_sequence_number() argument
131 hash[1] = (__force u32)daddr; in secure_dccp_sequence_number()
[all …]
/net/irda/irnet/
Dirnet_irda.c55 __u32 daddr, in irnet_post_event() argument
62 ap, event, daddr, name); in irnet_post_event()
73 irnet_events.log[index].daddr = daddr; in irnet_post_event()
272 iriap_getvaluebyclass_request(self->iriap, self->rsaddr, self->daddr, in irnet_find_lsap_sel()
309 self->rsaddr, self->daddr, NULL, in irnet_connect_tsap()
360 self->discoveries[self->disco_index].daddr, in irnet_discover_next_daddr()
417 self->daddr = DEV_ADDR_ANY; in irnet_discover_daddr_and_lsap_sel()
477 self->daddr = discoveries[i].daddr; in irnet_dname_to_daddr()
479 self->rname, self->daddr); in irnet_dname_to_daddr()
514 self->daddr = DEV_ADDR_ANY; /* Until we get connected */ in irda_irnet_create()
[all …]
/net/ieee802154/6lowpan/
Dtx.c22 struct ieee802154_addr daddr; member
42 unsigned short type, const void *daddr, in lowpan_header_create() argument
59 info->daddr.pan_id = info->saddr.pan_id; in lowpan_header_create()
61 if (!memcmp(daddr, ldev->broadcast, EUI64_ADDR_LEN)) { in lowpan_header_create()
62 info->daddr.short_addr = cpu_to_le16(IEEE802154_ADDR_BROADCAST); in lowpan_header_create()
63 info->daddr.mode = IEEE802154_ADDR_SHORT; in lowpan_header_create()
67 n = neigh_lookup(&nd_tbl, &hdr->daddr, ldev); in lowpan_header_create()
77 info->daddr.short_addr = short_addr; in lowpan_header_create()
78 info->daddr.mode = IEEE802154_ADDR_SHORT; in lowpan_header_create()
80 info->daddr.mode = IEEE802154_ADDR_LONG; in lowpan_header_create()
[all …]
/net/ipv4/
Droute.c159 const void *daddr);
448 const void *daddr) in ipv4_neigh_lookup() argument
451 const __be32 *pkey = daddr; in ipv4_neigh_lookup()
459 pkey = &ip_hdr(skb)->daddr; in ipv4_neigh_lookup()
504 hash = jhash_3words((__force u32)iph->daddr, in __ip_select_ident()
530 iph->daddr, iph->saddr, 0, 0, in __build_flow_key()
551 __be32 daddr = inet->inet_daddr; in build_sk_flow_key() local
556 daddr = inet_opt->opt.faddr; in build_sk_flow_key()
561 daddr, inet->inet_saddr, 0, 0, sk->sk_uid); in build_sk_flow_key()
611 static inline u32 fnhe_hashfun(__be32 daddr) in fnhe_hashfun() argument
[all …]
Dnetfilter.c41 fl4.daddr = iph->daddr; in ip_route_me_harder()
89 __be32 daddr; member
104 rt_info->daddr = iph->daddr; in nf_ip_saveroute()
120 iph->daddr == rt_info->daddr && in nf_ip_reroute()
138 !csum_tcpudp_magic(iph->saddr, iph->daddr, in nf_ip_checksum()
149 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum()
171 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
Dip_tunnel.c110 remote != t->parms.iph.daddr || in ip_tunnel_lookup()
124 if (remote != t->parms.iph.daddr || in ip_tunnel_lookup()
142 if ((local != t->parms.iph.saddr || t->parms.iph.daddr != 0) && in ip_tunnel_lookup()
143 (local != t->parms.iph.daddr || !ipv4_is_multicast(local))) in ip_tunnel_lookup()
164 t->parms.iph.daddr != 0 || in ip_tunnel_lookup()
196 if (parms->iph.daddr && !ipv4_is_multicast(parms->iph.daddr)) in ip_bucket()
197 remote = parms->iph.daddr; in ip_bucket()
228 __be32 remote = parms->iph.daddr; in ip_tunnel_find()
238 remote == t->parms.iph.daddr && in ip_tunnel_find()
296 __be32 daddr, __be32 saddr, in init_tunnel_flow() argument
[all …]
Dtcp_metrics.c26 const struct inetpeer_addr *daddr,
153 struct inetpeer_addr *daddr, in tcpm_new() argument
166 tm = __tcp_get_metrics(saddr, daddr, net, hash); in tcpm_new()
193 tm->tcpm_daddr = *daddr; in tcpm_new()
217 const struct inetpeer_addr *daddr, in __tcp_get_metrics() argument
226 addr_same(&tm->tcpm_daddr, daddr) && in __tcp_get_metrics()
238 struct inetpeer_addr saddr, daddr; in __tcp_get_metrics_req() local
243 daddr.family = req->rsk_ops->family; in __tcp_get_metrics_req()
244 switch (daddr.family) { in __tcp_get_metrics_req()
247 inetpeer_set_addr_v4(&daddr, inet_rsk(req)->ir_rmt_addr); in __tcp_get_metrics_req()
[all …]
/net/netfilter/ipvs/
Dip_vs_xmit.c124 static struct rtable *do_output_route4(struct net *net, __be32 daddr, in do_output_route4() argument
132 fl4.daddr = daddr; in do_output_route4()
143 flowi4_update_output(&fl4, 0, 0, daddr, 0); in do_output_route4()
146 IP_VS_DBG_RL("ip_route_output error, dest: %pI4\n", &daddr); in do_output_route4()
151 flowi4_update_output(&fl4, 0, 0, daddr, fl4.saddr); in do_output_route4()
261 __be32 daddr, int rt_mode, __be32 *ret_saddr, in __ip_vs_get_out_rt() argument
307 rt = do_output_route4(net, daddr, rt_mode, &saddr); in __ip_vs_get_out_rt()
318 " daddr=%pI4\n", &daddr); in __ip_vs_get_out_rt()
366 __ip_vs_route_output_v6(struct net *net, struct in6_addr *daddr, in __ip_vs_route_output_v6() argument
371 .daddr = *daddr, in __ip_vs_route_output_v6()
[all …]
/net/llc/
Dllc_c_ac.c208 llc->daddr.lsap, LLC_PDU_CMD); in llc_conn_ac_send_disc_cmd_p_set_x()
210 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_disc_cmd_p_set_x()
235 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_send_dm_rsp_f_set_p()
237 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_dm_rsp_f_set_p()
259 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_send_dm_rsp_f_set_1()
261 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_dm_rsp_f_set_1()
292 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_send_frmr_rsp_f_set_x()
295 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_frmr_rsp_f_set_x()
319 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_resend_frmr_rsp_f_set_0()
322 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_resend_frmr_rsp_f_set_0()
[all …]
/net/ipv6/netfilter/
Dnft_chain_route_ipv6.c31 struct in6_addr saddr, daddr; in nf_route_table_hook() local
40 memcpy(&daddr, &ipv6_hdr(skb)->daddr, sizeof(daddr)); in nf_route_table_hook()
50 memcmp(&ipv6_hdr(skb)->daddr, &daddr, sizeof(daddr)) || in nf_route_table_hook()
/net/decnet/
Ddn_route.c126 const void *daddr);
318 return ((fl1->daddr ^ fl2->daddr) | in compare_keys()
865 const void *daddr) in dn_dst_neigh_lookup() argument
867 return __neigh_lookup_errno(&dn_neigh_table, daddr, dst->dev); in dn_dst_neigh_lookup()
914 static __le16 dnet_select_source(const struct net_device *dev, __le16 daddr, int scope) in dnet_select_source() argument
929 if (!daddr) { in dnet_select_source()
933 ret = dn_match_addr(daddr, ifa->ifa_local); in dnet_select_source()
949 static inline __le16 dn_fib_rules_map_destination(__le16 daddr, struct dn_fib_res *res) in dn_fib_rules_map_destination() argument
952 return (daddr&~mask)|res->fi->fib_nh->nh_gw; in dn_fib_rules_map_destination()
958 .daddr = oldflp->daddr, in dn_route_output_slow()
[all …]
/net/802/
Dfddi.c54 const void *daddr, const void *saddr, unsigned int len) in fddi_header() argument
81 if (daddr != NULL) in fddi_header()
83 memcpy(fddi->daddr, daddr, dev->addr_len); in fddi_header()
123 if (*fddi->daddr & 0x01) in fddi_type_trans()
125 if (memcmp(fddi->daddr, dev->broadcast, FDDI_K_ALEN) == 0) in fddi_type_trans()
133 if (memcmp(fddi->daddr, dev->dev_addr, FDDI_K_ALEN)) in fddi_type_trans()
/net/6lowpan/
Diphc.c596 const void *daddr, const void *saddr) in lowpan_header_decompress() argument
679 &hdr.daddr, in lowpan_header_decompress()
685 err = lowpan_uncompress_multicast_daddr(skb, &hdr.daddr, in lowpan_header_decompress()
698 err = lowpan_iphc_uncompress_ctx_addr(skb, dev, ci, &hdr.daddr, in lowpan_header_decompress()
700 daddr); in lowpan_header_decompress()
704 err = lowpan_iphc_uncompress_addr(skb, dev, &hdr.daddr, in lowpan_header_decompress()
706 daddr); in lowpan_header_decompress()
708 iphc1 & LOWPAN_IPHC_DAM_MASK, &hdr.daddr); in lowpan_header_decompress()
745 hdr.hop_limit, &hdr.daddr); in lowpan_header_decompress()
1096 const void *daddr, const void *saddr) in lowpan_header_compress() argument
[all …]

1234567891011