Home
last modified time | relevance | path

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

12345678910

/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.c41 const xfrm_address_t *daddr, in xfrm_dst_hash() argument
46 return __xfrm_dst_hash(daddr, saddr, reqid, family, net->xfrm.state_hmask); in xfrm_dst_hash()
50 const xfrm_address_t *daddr, in xfrm_src_hash() argument
54 return __xfrm_src_hash(daddr, saddr, family, net->xfrm.state_hmask); in xfrm_src_hash()
58 xfrm_spi_hash(struct net *net, const xfrm_address_t *daddr, in xfrm_spi_hash() argument
61 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash()
76 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
81 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
87 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer()
635 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
34 sum += (__force u32)daddr->s6_addr32[0]; in csum_ipv6_magic()
35 carry = (sum < (__force u32)daddr->s6_addr32[0]); in csum_ipv6_magic()
38 sum += (__force u32)daddr->s6_addr32[1]; in csum_ipv6_magic()
39 carry = (sum < (__force u32)daddr->s6_addr32[1]); in csum_ipv6_magic()
42 sum += (__force u32)daddr->s6_addr32[2]; in csum_ipv6_magic()
43 carry = (sum < (__force u32)daddr->s6_addr32[2]); in csum_ipv6_magic()
46 sum += (__force u32)daddr->s6_addr32[3]; in csum_ipv6_magic()
47 carry = (sum < (__force u32)daddr->s6_addr32[3]); in csum_ipv6_magic()
93 const struct in6_addr *daddr, int len) in udp6_set_csum() argument
[all …]
Dudp.c148 const struct in6_addr *daddr, __be16 dport, in compute_score() argument
164 if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, daddr)) in compute_score()
185 const struct in6_addr *daddr, unsigned short hnum, in compute_score2() argument
194 if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, daddr)) in compute_score2()
220 const struct in6_addr *daddr, unsigned int hnum, int dif, in udp6_lib_lookup2() argument
233 daddr, hnum, dif); in udp6_lib_lookup2()
239 hash = udp6_ehashfn(net, daddr, hnum, in udp6_lib_lookup2()
264 daddr, hnum, dif) < badness)) { in udp6_lib_lookup2()
274 const struct in6_addr *daddr, __be16 dport, in __udp6_lib_lookup() argument
287 hash2 = udp6_portaddr_hash(net, daddr, hnum); in __udp6_lib_lookup()
[all …]
Dinet6_hashtables.c105 const struct in6_addr *daddr, in __inet6_lookup_established() argument
115 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in __inet6_lookup_established()
125 if (!INET6_MATCH(sk, net, saddr, daddr, ports, dif)) in __inet6_lookup_established()
130 if (unlikely(!INET6_MATCH(sk, net, saddr, daddr, ports, dif))) { in __inet6_lookup_established()
148 const struct in6_addr *daddr, in compute_score() argument
158 if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, daddr)) in compute_score()
173 const __be16 sport, const struct in6_addr *daddr, in inet6_lookup_listener() argument
189 score = compute_score(sk, net, hnum, daddr, dif); in inet6_lookup_listener()
195 phash = inet6_ehashfn(net, daddr, hnum, in inet6_lookup_listener()
216 else if (unlikely(compute_score(result, net, hnum, daddr, in inet6_lookup_listener()
[all …]
Dnetfilter.c31 .daddr = iph->daddr, in ip6_route_me_harder()
78 struct in6_addr daddr; member
91 rt_info->daddr = iph->daddr; in nf_ip6_saveroute()
104 if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || in nf_ip6_reroute()
144 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
155 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
183 &ip6h->daddr, in nf_ip6_checksum_partial()
Dsyncookies.c63 static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr, in cookie_hash() argument
79 memcpy(tmp + 4, daddr, 16); in cookie_hash()
88 const struct in6_addr *daddr, in secure_tcp_syn_cookie() argument
93 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + in secure_tcp_syn_cookie()
95 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) in secure_tcp_syn_cookie()
100 const struct in6_addr *daddr, __be16 sport, in check_tcp_syn_cookie() argument
105 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; in check_tcp_syn_cookie()
112 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie()
128 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in __cookie_v6_init_sequence()
148 __u32 mssind = check_tcp_syn_cookie(cookie, &iph->saddr, &iph->daddr, in __cookie_v6_check()
[all …]
/net/netfilter/
Dxt_socket.c89 *raddr = inside_iph->daddr; in extract_icmp4_fields()
116 const __be32 saddr, const __be32 daddr, in xt_socket_get_sock_v4() argument
123 saddr, sport, daddr, dport, in xt_socket_get_sock_v4()
126 return udp4_lib_lookup(net, saddr, sport, daddr, dport, in xt_socket_get_sock_v4()
140 __be32 uninitialized_var(daddr), uninitialized_var(saddr); in xt_socket_get4_sk()
157 daddr = iph->daddr; in xt_socket_get4_sk()
161 if (extract_icmp4_fields(skb, &protocol, &saddr, &daddr, in xt_socket_get4_sk()
180 daddr = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; in xt_socket_get4_sk()
191 saddr, daddr, sport, dport, in xt_socket_get4_sk()
196 &daddr, ntohs(dport), in xt_socket_get4_sk()
[all …]
Dxt_TPROXY.c58 tproxy_laddr4(struct sk_buff *skb, __be32 user_laddr, __be32 daddr) in tproxy_laddr4() argument
75 return laddr ? laddr : daddr; in tproxy_laddr4()
103 const __be32 saddr, const __be32 daddr, in nf_tproxy_get_sock_v4() argument
116 daddr, dport, in nf_tproxy_get_sock_v4()
127 saddr, sport, daddr, dport, in nf_tproxy_get_sock_v4()
135 sk = udp4_lib_lookup(net, saddr, sport, daddr, dport, in nf_tproxy_get_sock_v4()
159 protocol, ntohl(saddr), ntohs(sport), ntohl(daddr), ntohs(dport), lookup_type, sk); in nf_tproxy_get_sock_v4()
167 const struct in6_addr *saddr, const struct in6_addr *daddr, in nf_tproxy_get_sock_v6() argument
180 daddr, ntohs(dport), in nf_tproxy_get_sock_v6()
191 saddr, sport, daddr, ntohs(dport), in nf_tproxy_get_sock_v6()
[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/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/ipv4/
Droute.c151 const void *daddr);
441 const void *daddr) in ipv4_neigh_lookup() argument
444 const __be32 *pkey = daddr; in ipv4_neigh_lookup()
452 pkey = &ip_hdr(skb)->daddr; in ipv4_neigh_lookup()
493 hash = jhash_3words((__force u32)iph->daddr, in __ip_select_ident()
519 iph->daddr, iph->saddr, 0, 0, in __build_flow_key()
540 __be32 daddr = inet->inet_daddr; in build_sk_flow_key() local
545 daddr = inet_opt->opt.faddr; in build_sk_flow_key()
550 daddr, inet->inet_saddr, 0, 0, sk->sk_uid); in build_sk_flow_key()
600 static inline u32 fnhe_hashfun(__be32 daddr) in fnhe_hashfun() argument
[all …]
Dtcp_metrics.c26 const struct inetpeer_addr *daddr,
148 struct inetpeer_addr *daddr, in tcpm_new() argument
161 tm = __tcp_get_metrics(saddr, daddr, net, hash); in tcpm_new()
187 tm->tcpm_daddr = *daddr; in tcpm_new()
211 const struct inetpeer_addr *daddr, in __tcp_get_metrics() argument
220 addr_same(&tm->tcpm_daddr, daddr)) in __tcp_get_metrics()
231 struct inetpeer_addr saddr, daddr; in __tcp_get_metrics_req() local
236 daddr.family = req->rsk_ops->family; in __tcp_get_metrics_req()
237 switch (daddr.family) { in __tcp_get_metrics_req()
240 daddr.addr.a4 = inet_rsk(req)->ir_rmt_addr; in __tcp_get_metrics_req()
[all …]
Dnetfilter.c40 fl4.daddr = iph->daddr; in ip_route_me_harder()
86 __be32 daddr; member
101 rt_info->daddr = iph->daddr; in nf_ip_saveroute()
117 iph->daddr == rt_info->daddr && in nf_ip_reroute()
135 !csum_tcpudp_magic(iph->saddr, iph->daddr, in nf_ip_checksum()
146 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum()
168 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
Dip_gre.c183 iph->daddr, iph->saddr, tpi->key); in ipgre_err()
188 if (t->parms.iph.daddr == 0 || in ipgre_err()
189 ipv4_is_multicast(t->parms.iph.daddr)) in ipgre_err()
217 iph->saddr, iph->daddr, tpi->key); in ipgre_rcv()
371 const void *daddr, const void *saddr, unsigned int len) in ipgre_header() argument
387 if (daddr) in ipgre_header()
388 memcpy(&iph->daddr, daddr, 4); in ipgre_header()
389 if (iph->daddr) in ipgre_header()
412 if (ipv4_is_multicast(t->parms.iph.daddr)) { in ipgre_open()
417 t->parms.iph.daddr, in ipgre_open()
[all …]
Dip_tunnel.c166 remote != t->parms.iph.daddr || in ip_tunnel_lookup()
180 if (remote != t->parms.iph.daddr || in ip_tunnel_lookup()
198 if ((local != t->parms.iph.saddr || t->parms.iph.daddr != 0) && in ip_tunnel_lookup()
199 (local != t->parms.iph.daddr || !ipv4_is_multicast(local))) in ip_tunnel_lookup()
220 t->parms.iph.daddr != 0 || in ip_tunnel_lookup()
249 if (parms->iph.daddr && !ipv4_is_multicast(parms->iph.daddr)) in ip_bucket()
250 remote = parms->iph.daddr; in ip_bucket()
277 __be32 remote = parms->iph.daddr; in ip_tunnel_find()
287 remote == t->parms.iph.daddr && in ip_tunnel_find()
344 __be32 daddr, __be32 saddr, in init_tunnel_flow() argument
[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()
260 __be32 daddr, int rt_mode, __be32 *ret_saddr, in __ip_vs_get_out_rt() argument
295 daddr = dest->addr.ip; in __ip_vs_get_out_rt()
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
[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 …]
Dllc_conn.c473 const struct llc_addr *daddr, in llc_estab_match() argument
480 llc->daddr.lsap == daddr->lsap && in llc_estab_match()
482 ether_addr_equal(llc->daddr.mac, daddr->mac); in llc_estab_match()
497 struct llc_addr *daddr, in __llc_lookup_established() argument
508 if (llc_estab_match(sap, daddr, laddr, rc)) { in __llc_lookup_established()
513 !llc_estab_match(sap, daddr, laddr, rc))) { in __llc_lookup_established()
534 struct llc_addr *daddr, in llc_lookup_established() argument
540 sk = __llc_lookup_established(sap, daddr, laddr); in llc_lookup_established()
615 struct llc_addr *daddr, in __llc_lookup() argument
618 struct sock *sk = __llc_lookup_established(sap, daddr, laddr); in __llc_lookup()
[all …]
/net/ipv6/netfilter/
Dnft_chain_route_ipv6.c33 struct in6_addr saddr, daddr; in nf_route_table_hook() local
43 memcpy(&daddr, &ipv6_hdr(skb)->daddr, sizeof(daddr)); in nf_route_table_hook()
53 memcmp(&ipv6_hdr(skb)->daddr, &daddr, sizeof(daddr)) || in nf_route_table_hook()
/net/6lowpan/
Diphc.c337 const u8 *daddr, const u8 daddr_type, const u8 daddr_len, in lowpan_process_data() argument
445 err = lowpan_uncompress_multicast_daddr(skb, &hdr.daddr, in lowpan_process_data()
452 err = uncompress_addr(skb, &hdr.daddr, tmp, daddr, in lowpan_process_data()
455 tmp, &hdr.daddr); in lowpan_process_data()
498 hdr.hop_limit, &hdr.daddr); in lowpan_process_data()
611 hdr->hop_limit, &hdr->daddr); in lowpan_header_compress()
724 addr_type = ipv6_addr_type(&hdr->daddr); in lowpan_header_compress()
729 if (lowpan_is_mcast_addr_compressable8(&hdr->daddr)) { in lowpan_header_compress()
734 &hdr->daddr.s6_addr[15], 1); in lowpan_header_compress()
735 } else if (lowpan_is_mcast_addr_compressable32(&hdr->daddr)) { in lowpan_header_compress()
[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()
104 return arp_find(fddi->daddr, skb); in fddi_rebuild_header()
148 if (*fddi->daddr & 0x01) in fddi_type_trans()
150 if (memcmp(fddi->daddr, dev->broadcast, FDDI_K_ALEN) == 0) in fddi_type_trans()
158 if (memcmp(fddi->daddr, dev->dev_addr, FDDI_K_ALEN)) in fddi_type_trans()
/net/decnet/
Ddn_route.c126 const void *daddr);
319 return ((fl1->daddr ^ fl2->daddr) | in compare_keys()
873 const void *daddr) in dn_dst_neigh_lookup() argument
875 return __neigh_lookup_errno(&dn_neigh_table, daddr, dst->dev); in dn_dst_neigh_lookup()
922 static __le16 dnet_select_source(const struct net_device *dev, __le16 daddr, int scope) in dnet_select_source() argument
937 if (!daddr) { in dnet_select_source()
941 ret = dn_match_addr(daddr, ifa->ifa_local); in dnet_select_source()
957 static inline __le16 dn_fib_rules_map_destination(__le16 daddr, struct dn_fib_res *res) in dn_fib_rules_map_destination() argument
960 return (daddr&~mask)|res->fi->fib_nh->nh_gw; in dn_fib_rules_map_destination()
966 .daddr = oldflp->daddr, in dn_route_output_slow()
[all …]
/net/ipv4/netfilter/
Dnft_chain_route_ipv4.c33 __be32 saddr, daddr; in nf_route_table_hook() local
47 daddr = iph->daddr; in nf_route_table_hook()
55 iph->daddr != daddr || in nf_route_table_hook()

12345678910