Home
last modified time | relevance | path

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

12345678

/net/xfrm/
Dxfrm_hash.h17 static inline unsigned int __xfrm4_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr) in __xfrm4_daddr_saddr_hash() argument
19 return ntohl(daddr->a4 ^ saddr->a4); in __xfrm4_daddr_saddr_hash()
22 static inline unsigned int __xfrm6_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr) in __xfrm6_daddr_saddr_hash() argument
24 return ntohl(daddr->a6[2] ^ daddr->a6[3] ^ in __xfrm6_daddr_saddr_hash()
28 static inline unsigned int __xfrm_dst_hash(xfrm_address_t *daddr, xfrm_address_t *saddr, in __xfrm_dst_hash() argument
35 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
38 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash()
44 static inline unsigned __xfrm_src_hash(xfrm_address_t *daddr, in __xfrm_src_hash() argument
52 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
55 h ^= __xfrm6_daddr_saddr_hash(daddr, saddr); in __xfrm_src_hash()
[all …]
Dxfrm_state.c50 xfrm_address_t *daddr, in xfrm_dst_hash() argument
55 return __xfrm_dst_hash(daddr, saddr, reqid, family, net->xfrm.state_hmask); in xfrm_dst_hash()
59 xfrm_address_t *daddr, in xfrm_src_hash() argument
63 return __xfrm_src_hash(daddr, saddr, family, net->xfrm.state_hmask); in xfrm_src_hash()
67 xfrm_spi_hash(struct net *net, xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family) in xfrm_spi_hash() argument
69 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash()
84 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
89 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
95 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer()
651 xfrm_address_t *daddr, xfrm_address_t *saddr, in xfrm_init_tempsel() argument
[all …]
/net/ipv6/
Dinet6_hashtables.c65 const struct in6_addr *daddr, in __inet6_lookup_established() argument
75 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in __inet6_lookup_established()
84 if (INET6_MATCH(sk, net, hash, saddr, daddr, ports, dif)) { in __inet6_lookup_established()
87 if (!INET6_MATCH(sk, net, hash, saddr, daddr, ports, dif)) { in __inet6_lookup_established()
100 if (INET6_TW_MATCH(sk, net, hash, saddr, daddr, ports, dif)) { in __inet6_lookup_established()
105 if (!INET6_TW_MATCH(sk, net, hash, saddr, daddr, ports, dif)) { in __inet6_lookup_established()
123 const struct in6_addr *daddr, in compute_score() argument
134 if (!ipv6_addr_equal(&np->rcv_saddr, daddr)) in compute_score()
148 struct inet_hashinfo *hashinfo, const struct in6_addr *daddr, in inet6_lookup_listener() argument
163 score = compute_score(sk, net, hnum, daddr, dif); in inet6_lookup_listener()
[all …]
Dudp.c60 struct in6_addr *daddr, __be16 dport, in compute_score() argument
77 if (!ipv6_addr_equal(&np->rcv_saddr, daddr)) in compute_score()
81 if (!ipv6_addr_any(&np->daddr)) { in compute_score()
82 if (!ipv6_addr_equal(&np->daddr, saddr)) in compute_score()
97 struct in6_addr *daddr, __be16 dport, in __udp6_lib_lookup() argument
112 score = compute_score(sk, net, hnum, saddr, sport, daddr, dport, dif); in __udp6_lib_lookup()
130 daddr, dport, dif) < badness)) { in __udp6_lib_lookup()
150 &iph->daddr, dport, inet6_iif(skb), in __udp6_lib_lookup_skb()
290 struct in6_addr *daddr = &hdr->daddr; in __udp6_lib_err() local
295 sk = __udp6_lib_lookup(dev_net(skb->dev), daddr, uh->dest, in __udp6_lib_err()
[all …]
Dnetfilter.c23 { .daddr = iph->daddr, in ip6_route_me_harder()
57 struct in6_addr daddr; member
70 rt_info->daddr = iph->daddr; in nf_ip6_saveroute()
83 if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || in nf_ip6_reroute()
107 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
118 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
146 &ip6h->daddr, in nf_ip6_checksum_partial()
Dsyncookies.c79 static u32 cookie_hash(struct in6_addr *saddr, struct in6_addr *daddr, in cookie_hash() argument
91 memcpy(tmp + 4, daddr, 16); in cookie_hash()
99 static __u32 secure_tcp_syn_cookie(struct in6_addr *saddr, struct in6_addr *daddr, in secure_tcp_syn_cookie() argument
103 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + in secure_tcp_syn_cookie()
105 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) in secure_tcp_syn_cookie()
110 struct in6_addr *daddr, __be16 sport, in check_tcp_syn_cookie() argument
116 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; in check_tcp_syn_cookie()
123 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie()
142 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in cookie_v6_init_sequence()
152 __u32 mssind = check_tcp_syn_cookie(cookie, &iph->saddr, &iph->daddr, in cookie_check()
[all …]
/net/irda/irnet/
Dirnet_irda.c53 __u32 daddr, in irnet_post_event() argument
60 ap, event, daddr, name); in irnet_post_event()
71 irnet_events.log[index].daddr = daddr; in irnet_post_event()
270 iriap_getvaluebyclass_request(self->iriap, self->rsaddr, self->daddr, in irnet_find_lsap_sel()
307 self->rsaddr, self->daddr, NULL, in irnet_connect_tsap()
358 self->discoveries[self->disco_index].daddr, in irnet_discover_next_daddr()
415 self->daddr = DEV_ADDR_ANY; in irnet_discover_daddr_and_lsap_sel()
475 self->daddr = discoveries[i].daddr; in irnet_dname_to_daddr()
477 self->rname, self->daddr); in irnet_dname_to_daddr()
512 self->daddr = DEV_ADDR_ANY; /* Until we get connected */ in irda_irnet_create()
[all …]
/net/llc/
Dllc_c_ac.c207 llc->daddr.lsap, LLC_PDU_CMD); in llc_conn_ac_send_disc_cmd_p_set_x()
209 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_disc_cmd_p_set_x()
234 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_send_dm_rsp_f_set_p()
236 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_dm_rsp_f_set_p()
258 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_send_dm_rsp_f_set_1()
260 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_dm_rsp_f_set_1()
291 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_send_frmr_rsp_f_set_x()
294 rc = llc_mac_hdr_init(nskb, llc->dev->dev_addr, llc->daddr.mac); in llc_conn_ac_send_frmr_rsp_f_set_x()
318 llc->daddr.lsap, LLC_PDU_RSP); in llc_conn_ac_resend_frmr_rsp_f_set_0()
321 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.c488 struct llc_addr *daddr, in __llc_lookup_established() argument
499 llc->daddr.lsap == daddr->lsap && in __llc_lookup_established()
501 llc_mac_match(llc->daddr.mac, daddr->mac)) { in __llc_lookup_established()
513 struct llc_addr *daddr, in llc_lookup_established() argument
519 sk = __llc_lookup_established(sap, daddr, laddr); in llc_lookup_established()
559 struct llc_addr *daddr, in __llc_lookup() argument
562 struct sock *sk = __llc_lookup_established(sap, daddr, laddr); in __llc_lookup()
701 struct llc_addr *daddr) in llc_create_incoming_sock() argument
710 memcpy(&newllc->laddr, daddr, sizeof(newllc->laddr)); in llc_create_incoming_sock()
711 memcpy(&newllc->daddr, saddr, sizeof(newllc->daddr)); in llc_create_incoming_sock()
[all …]
/net/netfilter/
Dxt_socket.c81 *raddr = inside_iph->daddr; in extract_icmp_fields()
94 __be32 daddr, saddr; in socket_mt() local
111 daddr = iph->daddr; in socket_mt()
115 if (extract_icmp_fields(skb, &protocol, &saddr, &daddr, in socket_mt()
134 daddr = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; in socket_mt()
142 saddr, daddr, sport, dport, par->in, false); in socket_mt()
154 ntohl(daddr), ntohs(dport), in socket_mt()
155 ntohl(iph->daddr), hp ? ntohs(hp->dest) : 0, sk); in socket_mt()
Dxt_iprange.c38 if ((ntohl(iph->daddr) < ntohl(info->dst.min_ip) in iprange_mt_v0()
39 || ntohl(iph->daddr) > ntohl(info->dst.max_ip)) in iprange_mt_v0()
42 &iph->daddr, in iprange_mt_v0()
73 m = ntohl(iph->daddr) < ntohl(info->dst_min.ip); in iprange_mt4()
74 m |= ntohl(iph->daddr) > ntohl(info->dst_max.ip); in iprange_mt4()
78 &iph->daddr, in iprange_mt4()
118 m = iprange_ipv6_sub(&iph->daddr, &info->dst_min.in6) < 0; in iprange_mt6()
119 m |= iprange_ipv6_sub(&iph->daddr, &info->dst_max.in6) > 0; in iprange_mt6()
Dnf_tproxy_core.c23 const __be32 saddr, const __be32 daddr, in nf_tproxy_get_sock_v4() argument
34 daddr, ntohs(dport), in nf_tproxy_get_sock_v4()
38 saddr, sport, daddr, dport, in nf_tproxy_get_sock_v4()
42 sk = udp4_lib_lookup(net, saddr, sport, daddr, dport, in nf_tproxy_get_sock_v4()
51 protocol, ntohl(saddr), ntohs(sport), ntohl(daddr), ntohs(dport), listening_only, sk); in nf_tproxy_get_sock_v4()
/net/ipv4/
Dnetfilter.c33 fl.nl_u.ip4_u.daddr = iph->daddr; in ip_route_me_harder()
49 fl.nl_u.ip4_u.daddr = iph->saddr; in ip_route_me_harder()
54 if (ip_route_input(skb, iph->daddr, iph->saddr, in ip_route_me_harder()
125 __be32 daddr; member
140 rt_info->daddr = iph->daddr; in nf_ip_saveroute()
156 && iph->daddr == rt_info->daddr in nf_ip_reroute()
174 !csum_tcpudp_magic(iph->saddr, iph->daddr, in nf_ip_checksum()
185 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum()
207 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
Dip_gre.c180 if (local == t->parms.iph.saddr && remote == t->parms.iph.daddr) { in ipgre_tunnel_lookup()
191 if (remote == t->parms.iph.daddr) { in ipgre_tunnel_lookup()
203 (local == t->parms.iph.daddr && in ipgre_tunnel_lookup()
234 __be32 remote = parms->iph.daddr; in __ipgre_bucket()
284 __be32 remote = parms->iph.daddr; in ipgre_tunnel_find()
292 remote == t->parms.iph.daddr && in ipgre_tunnel_find()
424 t = ipgre_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr, in ipgre_err()
428 if (t == NULL || t->parms.iph.daddr == 0 || in ipgre_err()
429 ipv4_is_multicast(t->parms.iph.daddr)) in ipgre_err()
522 iph->saddr, iph->daddr, key, in ipgre_rcv()
[all …]
Dinet_hashtables.c114 const unsigned short hnum, const __be32 daddr, in compute_score() argument
125 if (rcv_saddr != daddr) in compute_score()
148 const __be32 daddr, const unsigned short hnum, in __inet_lookup_listener() argument
162 score = compute_score(sk, net, hnum, daddr, dif); in __inet_lookup_listener()
178 else if (unlikely(compute_score(result, net, hnum, daddr, in __inet_lookup_listener()
192 const __be32 daddr, const u16 hnum, in __inet_lookup_established() argument
195 INET_ADDR_COOKIE(acookie, saddr, daddr) in __inet_lookup_established()
202 unsigned int hash = inet_ehashfn(net, daddr, hnum, saddr, sport); in __inet_lookup_established()
210 saddr, daddr, ports, dif)) { in __inet_lookup_established()
214 saddr, daddr, ports, dif))) { in __inet_lookup_established()
[all …]
Dsyncookies.c42 static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, in cookie_hash() argument
49 tmp[1] = (__force u32)daddr; in cookie_hash()
90 static __u32 secure_tcp_syn_cookie(__be32 saddr, __be32 daddr, __be16 sport, in secure_tcp_syn_cookie() argument
105 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + in secure_tcp_syn_cookie()
107 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) in secure_tcp_syn_cookie()
120 static __u32 check_tcp_syn_cookie(__u32 cookie, __be32 saddr, __be32 daddr, in check_tcp_syn_cookie() argument
127 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; in check_tcp_syn_cookie()
135 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie()
179 return secure_tcp_syn_cookie(iph->saddr, iph->daddr, in cookie_v4_init_sequence()
200 __u32 mssind = check_tcp_syn_cookie(cookie, iph->saddr, iph->daddr, in cookie_check()
[all …]
Dipip.c149 remote == t->parms.iph.daddr && (t->dev->flags&IFF_UP)) in ipip_tunnel_lookup()
153 if (remote == t->parms.iph.daddr && (t->dev->flags&IFF_UP)) in ipip_tunnel_lookup()
168 __be32 remote = parms->iph.daddr; in __ipip_bucket()
217 __be32 remote = parms->iph.daddr; in ipip_tunnel_locate()
225 if (local == t->parms.iph.saddr && remote == t->parms.iph.daddr) in ipip_tunnel_locate()
322 t = ipip_tunnel_lookup(dev_net(skb->dev), iph->daddr, iph->saddr); in ipip_err()
323 if (t == NULL || t->parms.iph.daddr == 0) in ipip_err()
356 iph->saddr, iph->daddr)) != NULL) { in ipip_rcv()
403 __be32 dst = tiph->daddr; in ipip_tunnel_xmit()
430 { .daddr = dst, in ipip_tunnel_xmit()
[all …]
Dudp.c241 __be16 sport, __be32 daddr, __be16 dport, int dif) in compute_score() argument
251 if (inet->rcv_saddr != daddr) in compute_score()
255 if (inet->daddr) { in compute_score()
256 if (inet->daddr != saddr) in compute_score()
278 __be16 sport, __be32 daddr, __be16 dport, in __udp4_lib_lookup() argument
294 daddr, dport, dif); in __udp4_lib_lookup()
312 daddr, dport, dif) < badness)) { in __udp4_lib_lookup()
332 iph->daddr, dport, inet_iif(skb), in __udp4_lib_lookup_skb()
337 __be32 daddr, __be16 dport, int dif) in udp4_lib_lookup() argument
339 return __udp4_lib_lookup(net, saddr, sport, daddr, dport, dif, &udp_table); in udp4_lib_lookup()
[all …]
Dtcp_ipv4.c92 __be32 daddr, __be32 saddr, struct tcphdr *th);
105 return secure_tcp_sequence_number(ip_hdr(skb)->daddr, in tcp_v4_init_sequence()
151 __be32 daddr, nexthop; in tcp_v4_connect() local
161 nexthop = daddr = usin->sin_addr.s_addr; in tcp_v4_connect()
163 if (!daddr) in tcp_v4_connect()
184 daddr = rt->rt_dst; in tcp_v4_connect()
190 if (tp->rx_opt.ts_recent_stamp && inet->daddr != daddr) { in tcp_v4_connect()
198 !tp->rx_opt.ts_recent_stamp && rt->rt_dst == daddr) { in tcp_v4_connect()
214 inet->daddr = daddr; in tcp_v4_connect()
243 inet->daddr, in tcp_v4_connect()
[all …]
/net/802/
Dfddi.c55 const void *daddr, const void *saddr, unsigned len) in fddi_header() argument
82 if (daddr != NULL) in fddi_header()
84 memcpy(fddi->daddr, daddr, dev->addr_len); in fddi_header()
105 return arp_find(fddi->daddr, skb); in fddi_rebuild_header()
149 if (*fddi->daddr & 0x01) in fddi_type_trans()
151 if (memcmp(fddi->daddr, dev->broadcast, FDDI_K_ALEN) == 0) in fddi_type_trans()
159 if (memcmp(fddi->daddr, dev->dev_addr, FDDI_K_ALEN)) in fddi_type_trans()
Dtr.c104 const void *daddr, const void *saddr, unsigned len) in tr_header() argument
143 if(daddr) in tr_header()
145 memcpy(trh->daddr,daddr,dev->addr_len); in tr_header()
174 if(arp_find(trh->daddr, skb)) { in tr_rebuild_header()
209 if(*trh->daddr & 0x80) in tr_type_trans()
211 if(!memcmp(trh->daddr,dev->broadcast,TR_ALEN)) in tr_type_trans()
216 else if ( (trh->daddr[0] & 0x01) && (trh->daddr[1] & 0x00) && (trh->daddr[2] & 0x5E)) in tr_type_trans()
222 if(memcmp(trh->daddr, dev->dev_addr, TR_ALEN)) in tr_type_trans()
267 if( (!memcmp(&(trh->daddr[0]),&(dev->broadcast[0]),TR_ALEN)) || in tr_source_route()
268 (!memcmp(&(trh->daddr[0]),&(mcast_func_addr[0]), TR_ALEN)) ) in tr_source_route()
[all …]
Dfc.c38 const void *daddr, const void *saddr, unsigned len) in fc_header() argument
70 if(daddr) in fc_header()
72 memcpy(fch->daddr,daddr,dev->addr_len); in fc_header()
92 return arp_find(fch->daddr, skb); in fc_rebuild_header()
/net/netfilter/ipvs/
Dip_vs_proto_ah_esp.c52 &iph->daddr, in ah_esp_conn_in_get()
56 &iph->daddr, in ah_esp_conn_in_get()
72 IP_VS_DBG_ADDR(af, &iph->daddr)); in ah_esp_conn_in_get()
92 &iph->daddr, in ah_esp_conn_out_get()
96 &iph->daddr, in ah_esp_conn_out_get()
108 IP_VS_DBG_ADDR(af, &iph->daddr)); in ah_esp_conn_out_get()
139 pp->name, &ih->saddr, &ih->daddr); in ah_esp_debug_packet_v4()
157 pp->name, &ih->saddr, &ih->daddr); in ah_esp_debug_packet_v6()
/net/dccp/
Dipv4.c46 __be32 daddr, nexthop; in dccp_v4_connect() local
58 nexthop = daddr = usin->sin_addr.s_addr; in dccp_v4_connect()
60 if (daddr == 0) in dccp_v4_connect()
78 daddr = rt->rt_dst; in dccp_v4_connect()
85 inet->daddr = daddr; in dccp_v4_connect()
109 dp->dccps_iss = secure_dccp_sequence_number(inet->saddr, inet->daddr, in dccp_v4_connect()
217 iph->daddr, dh->dccph_dport, in dccp_v4_err()
279 iph->daddr, iph->saddr); in dccp_v4_err()
355 dh->dccph_checksum = dccp_v4_csum_finish(skb, inet->saddr, inet->daddr); in dccp_v4_send_check()
362 return secure_dccp_sequence_number(ip_hdr(skb)->daddr, in dccp_v4_init_sequence()
[all …]
/net/ipv6/netfilter/
Dip6table_mangle.c100 struct in6_addr saddr, daddr; in ip6t_local_out_hook() local
116 memcpy(&daddr, &ipv6_hdr(skb)->daddr, sizeof(daddr)); in ip6t_local_out_hook()
128 || memcmp(&ipv6_hdr(skb)->daddr, &daddr, sizeof(daddr)) in ip6t_local_out_hook()

12345678