Home
last modified time | relevance | path

Searched refs:spi (Results 1 – 25 of 35) sorted by relevance

12

/net/ipv6/
Dxfrm6_tunnel.c31 u32 spi; member
48 u32 spi; member
69 static inline unsigned int xfrm6_tunnel_spi_hash_byspi(u32 spi) in xfrm6_tunnel_spi_hash_byspi() argument
71 return spi % XFRM6_TUNNEL_SPI_BYSPI_HSIZE; in xfrm6_tunnel_spi_hash_byspi()
92 u32 spi; in xfrm6_tunnel_spi_lookup() local
96 spi = x6spi ? x6spi->spi : 0; in xfrm6_tunnel_spi_lookup()
98 return htonl(spi); in xfrm6_tunnel_spi_lookup()
102 static int __xfrm6_tunnel_spi_check(struct net *net, u32 spi) in __xfrm6_tunnel_spi_check() argument
106 int index = xfrm6_tunnel_spi_hash_byspi(spi); in __xfrm6_tunnel_spi_check()
111 if (x6spi->spi == spi) in __xfrm6_tunnel_spi_check()
[all …]
Dipcomp6.c48 __be32 spi; in ipcomp6_err() local
58 spi = htonl(ntohs(ipcomph->cpi)); in ipcomp6_err()
60 spi, IPPROTO_COMP, AF_INET6); in ipcomp6_err()
84 t->id.spi = xfrm6_tunnel_alloc_spi(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_create()
85 if (!t->id.spi) in ipcomp6_tunnel_create()
116 __be32 spi; in ipcomp6_tunnel_attach() local
119 spi = xfrm6_tunnel_spi_lookup(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_attach()
120 if (spi) in ipcomp6_tunnel_attach()
122 spi, IPPROTO_IPV6, AF_INET6); in ipcomp6_tunnel_attach()
Desp6_offload.c56 __be32 spi; in esp6_gro_receive() local
63 if ((err = xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq)) != 0) in esp6_gro_receive()
78 spi, IPPROTO_ESP, AF_INET6); in esp6_gro_receive()
106 xfrm_input(skb, IPPROTO_ESP, spi, -2); in esp6_gro_receive()
137 esph->spi = x->id.spi; in esp6_gso_encap()
249 if (esph->spi != x->id.spi) in esp6_gso_segment()
333 esp.esph->spi = x->id.spi; in esp6_xmit()
Dip6_vti.c298 static int vti6_input_proto(struct sk_buff *skb, int nexthdr, __be32 spi, in vti6_input_proto() argument
329 return xfrm_input(skb, nexthdr, spi, encap_type); in vti6_input_proto()
600 __be32 spi; in vti6_err() local
620 spi = esph->spi; in vti6_err()
624 spi = ah->spi; in vti6_err()
628 spi = htonl(ntohs(ipch->cpi)); in vti6_err()
639 spi, protocol, AF_INET6); in vti6_err()
1225 __be32 spi; in vti6_rcv_tunnel() local
1228 spi = xfrm6_tunnel_spi_lookup(dev_net(skb->dev), saddr); in vti6_rcv_tunnel()
1230 return vti6_input_proto(skb, IPPROTO_IPV6, spi, 0); in vti6_rcv_tunnel()
Desp6.c328 esph->seq_no = esph->spi; in esp_restore_header()
329 esph->spi = *seqhi; in esp_restore_header()
362 extra->seqhi = esph->spi; in esp_output_set_esn()
366 esph->spi = x->id.spi; in esp_output_set_esn()
731 esph->spi = x->id.spi; in esp6_output()
914 *seqhi = esph->spi; in esp_input_set_header()
915 esph->spi = esph->seq_no; in esp_input_set_header()
1038 esph->spi, IPPROTO_ESP, AF_INET6); in esp6_err()
Dmip6.c300 if (x->id.spi) { in mip6_destopt_init_state()
301 pr_info("%s: spi is not 0: %u\n", __func__, x->id.spi); in mip6_destopt_init_state()
435 if (x->id.spi) { in mip6_rthdr_init_state()
436 pr_info("%s: spi is not 0: %u\n", __func__, x->id.spi); in mip6_rthdr_init_state()
Dxfrm6_input.c20 int xfrm6_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi, in xfrm6_rcv_spi() argument
26 return xfrm_input(skb, nexthdr, spi, 0); in xfrm6_rcv_spi()
Dxfrm6_protocol.c62 int xfrm6_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi, in xfrm6_rcv_encap() argument
97 if ((ret = handler->input_handler(skb, nexthdr, spi, encap_type)) != -EINVAL) in xfrm6_rcv_encap()
/net/ipv6/netfilter/
Dip6t_ah.c25 spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert) in spi_match() argument
30 invert ? '!' : ' ', min, spi, max); in spi_match()
31 r = (spi >= min && spi <= max) ^ invert; in spi_match()
62 pr_debug("SPI %u %08X\n", ntohl(ah->spi), ntohl(ah->spi)); in ah_mt6()
66 ntohl(ah->spi), in ah_mt6()
78 ntohl(ah->spi), in ah_mt6()
Dnf_log_ipv6.c154 nf_log_buf_add(m, "SPI=0x%x ", ntohl(ah->spi)); in dump_ipv6_packet()
186 ntohl(eh->spi)); in dump_ipv6_packet()
/net/ipv4/netfilter/
Dipt_ah.c20 spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert) in spi_match() argument
24 invert ? '!' : ' ', min, spi, max); in spi_match()
25 r = (spi >= min && spi <= max) ^ invert; in spi_match()
51 ntohl(ah->spi), in ah_mt()
/net/xfrm/
Dxfrm_interface_core.c210 static int xfrmi_input(struct sk_buff *skb, int nexthdr, __be32 spi, in xfrmi_input() argument
229 return xfrm_input(skb, nexthdr, spi, encap_type); in xfrmi_input()
246 static int xfrmi4_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) in xfrmi4_input() argument
248 return xfrmi_input(skb, nexthdr, spi, encap_type, AF_INET); in xfrmi4_input()
251 static int xfrmi6_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) in xfrmi6_input() argument
253 return xfrmi_input(skb, nexthdr, spi, encap_type, AF_INET6); in xfrmi6_input()
465 __be32 spi; in xfrmi4_err() local
470 spi = esph->spi; in xfrmi4_err()
474 spi = ah->spi; in xfrmi4_err()
478 spi = htonl(ntohs(ipch->cpi)); in xfrmi4_err()
[all …]
Dxfrm_state.c76 __be32 spi, u8 proto, unsigned short family) in xfrm_spi_hash() argument
78 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash()
103 if (x->id.spi) { in xfrm_hash_transfer()
104 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer()
594 if (x->km.state == XFRM_STATE_ACQ && x->id.spi == 0) in xfrm_timer_handler()
667 if (x->id.spi) in __xfrm_state_delete()
931 __be32 spi, u8 proto, in __xfrm_state_lookup() argument
934 unsigned int h = xfrm_spi_hash(net, daddr, spi, proto, family); in __xfrm_state_lookup()
939 x->id.spi != spi || in __xfrm_state_lookup()
987 x->id.spi, x->id.proto, family); in __xfrm_state_locate()
[all …]
Dxfrm_input.c140 int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq) in xfrm_parse_spi() argument
148 offset = offsetof(struct ip_auth_hdr, spi); in xfrm_parse_spi()
153 offset = offsetof(struct ip_esp_hdr, spi); in xfrm_parse_spi()
159 *spi = htonl(ntohs(*(__be16 *)(skb_transport_header(skb) + 2))); in xfrm_parse_spi()
169 *spi = *(__be32 *)(skb_transport_header(skb) + offset); in xfrm_parse_spi()
459 int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) in xfrm_input() argument
533 if ((err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) { in xfrm_input()
563 if (!spi && (err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) { in xfrm_input()
580 x = xfrm_state_lookup(net, mark, daddr, spi, nexthdr, family); in xfrm_input()
584 xfrm_audit_state_notfound(skb, family, spi, seq); in xfrm_input()
[all …]
Dxfrm_hash.h119 __xfrm_spi_hash(const xfrm_address_t *daddr, __be32 spi, u8 proto, in __xfrm_spi_hash() argument
122 unsigned int h = (__force u32)spi ^ proto; in __xfrm_spi_hash()
/net/netfilter/
Dxt_esp.c26 spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert) in spi_match() argument
30 invert ? '!' : ' ', min, spi, max); in spi_match()
31 r = (spi >= min && spi <= max) ^ invert; in spi_match()
56 return spi_match(espinfo->spis[0], espinfo->spis[1], ntohl(eh->spi), in esp_mt()
Dxt_ipcomp.c30 spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert) in spi_match() argument
34 invert ? '!' : ' ', min, spi, max); in spi_match()
35 r = (spi >= min && spi <= max) ^ invert; in spi_match()
Dxt_policy.c47 MATCH(spi, x->id.spi) && in match_xfrm_state()
/net/ipv4/
Desp4_offload.c35 __be32 spi; in esp4_gro_receive() local
41 if ((err = xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq)) != 0) in esp4_gro_receive()
56 spi, IPPROTO_ESP, AF_INET); in esp4_gro_receive()
79 xfrm_input(skb, IPPROTO_ESP, spi, -2); in esp4_gro_receive()
103 esph->spi = x->id.spi; in esp4_gso_encap()
211 if (esph->spi != x->id.spi) in esp4_gso_segment()
302 esph->spi = x->id.spi; in esp_xmit()
Dip_vti.c47 static int vti_input(struct sk_buff *skb, int nexthdr, __be32 spi, in vti_input() argument
66 return xfrm_input(skb, nexthdr, spi, encap_type); in vti_input()
75 static int vti_input_proto(struct sk_buff *skb, int nexthdr, __be32 spi, in vti_input_proto() argument
78 return vti_input(skb, nexthdr, spi, encap_type, false); in vti_input_proto()
81 static int vti_rcv(struct sk_buff *skb, __be32 spi, bool update_skb_dev) in vti_rcv() argument
86 return vti_input(skb, ip_hdr(skb)->protocol, spi, 0, update_skb_dev); in vti_rcv()
312 __be32 spi; in vti4_err() local
334 spi = esph->spi; in vti4_err()
338 spi = ah->spi; in vti4_err()
342 spi = htonl(ntohs(ipch->cpi)); in vti4_err()
[all …]
Dipcomp.c25 __be32 spi; in ipcomp4_err() local
40 spi = htonl(ntohs(ipch->cpi)); in ipcomp4_err()
42 spi, IPPROTO_COMP, AF_INET); in ipcomp4_err()
66 t->id.spi = x->props.saddr.a4; in ipcomp_tunnel_create()
Desp4.c293 esph->seq_no = esph->spi; in esp_restore_header()
294 esph->spi = *seqhi; in esp_restore_header()
327 extra->seqhi = esph->spi; in esp_output_set_extra()
331 esph->spi = x->id.spi; in esp_output_set_extra()
696 esph->spi = x->id.spi; in esp_output()
868 *seqhi = esph->spi; in esp_input_set_header()
869 esph->spi = esph->seq_no; in esp_input_set_header()
998 esph->spi, IPPROTO_ESP, AF_INET); in esp4_err()
Dxfrm4_protocol.c61 int xfrm4_rcv_encap(struct sk_buff *skb, int nexthdr, __be32 spi, in xfrm4_rcv_encap() argument
84 if ((ret = handler->input_handler(skb, nexthdr, spi, encap_type)) != -EINVAL) in xfrm4_rcv_encap()
/net/nfc/nci/
Dspi.c54 return spi_sync(nspi->spi, &m); in __nci_spi_send()
124 struct nci_spi *nci_spi_allocate_spi(struct spi_device *spi, in nci_spi_allocate_spi() argument
130 nspi = devm_kzalloc(&spi->dev, sizeof(struct nci_spi), GFP_KERNEL); in nci_spi_allocate_spi()
138 nspi->spi = spi; in nci_spi_allocate_spi()
202 ret = spi_sync(nspi->spi, &m); in __nci_spi_read()
227 ret = spi_sync(nspi->spi, &m); in __nci_spi_read()
DMakefile10 nci_spi-y += spi.o

12