Home
last modified time | relevance | path

Searched refs:hdr_len (Results 1 – 25 of 225) sorted by relevance

123456789

/Linux-v4.19/net/ipv6/
Dxfrm6_mode_ro.c45 int hdr_len; in xfrm6_ro_output() local
49 hdr_len = x->type->hdr_offset(x, skb, &prevhdr); in xfrm6_ro_output()
50 if (hdr_len < 0) in xfrm6_ro_output()
51 return hdr_len; in xfrm6_ro_output()
54 skb->transport_header = skb->network_header + hdr_len; in xfrm6_ro_output()
55 __skb_pull(skb, hdr_len); in xfrm6_ro_output()
56 memmove(ipv6_hdr(skb), iph, hdr_len); in xfrm6_ro_output()
Dxfrm6_mode_transport.c27 int hdr_len; in xfrm6_transport_output() local
32 hdr_len = x->type->hdr_offset(x, skb, &prevhdr); in xfrm6_transport_output()
33 if (hdr_len < 0) in xfrm6_transport_output()
34 return hdr_len; in xfrm6_transport_output()
37 skb->transport_header = skb->network_header + hdr_len; in xfrm6_transport_output()
38 __skb_pull(skb, hdr_len); in xfrm6_transport_output()
39 memmove(ipv6_hdr(skb), iph, hdr_len); in xfrm6_transport_output()
Dxfrm6_mode_beet.c44 int optlen, hdr_len; in xfrm6_beet_output() local
46 hdr_len = 0; in xfrm6_beet_output()
49 hdr_len += IPV4_BEET_PHMAXLEN - (optlen & 4); in xfrm6_beet_output()
51 skb_set_network_header(skb, -x->props.header_len - hdr_len); in xfrm6_beet_output()
57 ph = __skb_pull(skb, XFRM_MODE_SKB_CB(skb)->ihl - hdr_len); in xfrm6_beet_output()
Dah6.c478 int hdr_len = skb_network_header_len(skb); in ah6_input_done() local
485 auth_data = ah_tmp_auth(work_iph, hdr_len); in ah6_input_done()
495 memcpy(skb_network_header(skb), work_iph, hdr_len); in ah6_input_done()
496 __skb_pull(skb, ah_hlen + hdr_len); in ah6_input_done()
500 skb_set_transport_header(skb, -hdr_len); in ah6_input_done()
535 u16 hdr_len; in ah6_input() local
555 hdr_len = skb_network_header_len(skb); in ah6_input()
578 skb_push(skb, hdr_len); in ah6_input()
585 work_iph = ah_alloc_tmp(ahash, nfrags + sglists, hdr_len + in ah6_input()
592 auth_data = ah_tmp_auth((u8 *)work_iph, hdr_len); in ah6_input()
[all …]
/Linux-v4.19/net/802/
Dfc.c41 int hdr_len; in fc_header() local
51 hdr_len = sizeof(struct fch_hdr) + sizeof(struct fcllc); in fc_header()
52 fch = skb_push(skb, hdr_len); in fc_header()
61 hdr_len = sizeof(struct fch_hdr); in fc_header()
62 fch = skb_push(skb, hdr_len); in fc_header()
73 return hdr_len; in fc_header()
75 return -hdr_len; in fc_header()
/Linux-v4.19/net/wireless/
Dlib80211_crypt_wep.c87 static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len, in lib80211_wep_build_iv() argument
94 if (skb_headroom(skb) < 4 || skb->len < hdr_len) in lib80211_wep_build_iv()
98 memmove(pos, pos + 4, hdr_len); in lib80211_wep_build_iv()
99 pos += hdr_len; in lib80211_wep_build_iv()
129 static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_wep_encrypt() argument
144 if (lib80211_wep_build_iv(skb, hdr_len, NULL, 0, priv)) in lib80211_wep_encrypt()
148 skb_copy_from_linear_data_offset(skb, hdr_len, key, 3); in lib80211_wep_encrypt()
153 len = skb->len - hdr_len - 4; in lib80211_wep_encrypt()
154 pos = skb->data + hdr_len + 4; in lib80211_wep_encrypt()
182 static int lib80211_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_wep_decrypt() argument
[all …]
Dlib80211_crypt_tkip.c300 static int lib80211_tkip_hdr(struct sk_buff *skb, int hdr_len, in lib80211_tkip_hdr() argument
309 if (skb_headroom(skb) < TKIP_HDR_LEN || skb->len < hdr_len) in lib80211_tkip_hdr()
323 memmove(pos, pos + TKIP_HDR_LEN, hdr_len); in lib80211_tkip_hdr()
324 pos += hdr_len; in lib80211_tkip_hdr()
344 static int lib80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_tkip_encrypt() argument
361 if (skb_tailroom(skb) < 4 || skb->len < hdr_len) in lib80211_tkip_encrypt()
364 len = skb->len - hdr_len; in lib80211_tkip_encrypt()
365 pos = skb->data + hdr_len; in lib80211_tkip_encrypt()
367 if ((lib80211_tkip_hdr(skb, hdr_len, rc4key, 16, priv)) < 0) in lib80211_tkip_encrypt()
400 static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_tkip_decrypt() argument
[all …]
Dlib80211_crypt_ccmp.c181 static int lib80211_ccmp_hdr(struct sk_buff *skb, int hdr_len, in lib80211_ccmp_hdr() argument
188 if (skb_headroom(skb) < CCMP_HDR_LEN || skb->len < hdr_len) in lib80211_ccmp_hdr()
195 memmove(pos, pos + CCMP_HDR_LEN, hdr_len); in lib80211_ccmp_hdr()
196 pos += hdr_len; in lib80211_ccmp_hdr()
218 static int lib80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_ccmp_encrypt() argument
229 if (skb_tailroom(skb) < CCMP_MIC_LEN || skb->len < hdr_len) in lib80211_ccmp_encrypt()
232 data_len = skb->len - hdr_len; in lib80211_ccmp_encrypt()
233 len = lib80211_ccmp_hdr(skb, hdr_len, NULL, 0, priv); in lib80211_ccmp_encrypt()
237 pos = skb->data + hdr_len + CCMP_HDR_LEN; in lib80211_ccmp_encrypt()
285 static int lib80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_ccmp_decrypt() argument
[all …]
/Linux-v4.19/drivers/net/wireless/intel/ipw2x00/
Dlibipw_tx.c153 struct sk_buff *frag, int hdr_len) in libipw_encrypt_fragment() argument
167 res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv); in libipw_encrypt_fragment()
265 int bytes, fc, hdr_len; in libipw_xmit() local
333 hdr_len = LIBIPW_3ADDR_LEN; in libipw_xmit()
337 hdr_len += 2; in libipw_xmit()
354 int len = bytes + hdr_len + crypt->ops->extra_msdu_prefix_len + in libipw_xmit()
362 skb_put_data(skb_new, &header, hdr_len); in libipw_xmit()
367 res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv); in libipw_xmit()
377 skb_pull(skb, hdr_len); in libipw_xmit()
393 bytes_per_frag = frag_size - hdr_len; in libipw_xmit()
[all …]
/Linux-v4.19/drivers/staging/rtl8192e/
Drtllib_crypt_wep.c89 static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_encrypt() argument
103 skb->len < hdr_len){ in prism2_wep_encrypt()
105 skb_headroom(skb), skb_tailroom(skb), skb->len, hdr_len); in prism2_wep_encrypt()
108 len = skb->len - hdr_len; in prism2_wep_encrypt()
110 memmove(pos, pos + 4, hdr_len); in prism2_wep_encrypt()
111 pos += hdr_len; in prism2_wep_encrypt()
169 static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_decrypt() argument
182 if (skb->len < hdr_len + 8) in prism2_wep_decrypt()
185 pos = skb->data + hdr_len; in prism2_wep_decrypt()
199 plen = skb->len - hdr_len - 8; in prism2_wep_decrypt()
[all …]
Drtllib_crypt_tkip.c287 static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_tkip_encrypt() argument
301 skb->len < hdr_len) in rtllib_tkip_encrypt()
318 len = skb->len - hdr_len; in rtllib_tkip_encrypt()
320 memmove(pos, pos + 8, hdr_len); in rtllib_tkip_encrypt()
321 pos += hdr_len; in rtllib_tkip_encrypt()
373 static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_tkip_decrypt() argument
389 if (skb->len < hdr_len + 8 + 4) in rtllib_tkip_decrypt()
393 pos = skb->data + hdr_len; in rtllib_tkip_decrypt()
446 plen = skb->len - hdr_len - 12; in rtllib_tkip_decrypt()
497 memmove(skb->data + 8, skb->data, hdr_len); in rtllib_tkip_decrypt()
[all …]
Drtllib_crypt_ccmp.c186 static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_ccmp_encrypt() argument
196 skb->len < hdr_len) in rtllib_ccmp_encrypt()
199 data_len = skb->len - hdr_len; in rtllib_ccmp_encrypt()
201 memmove(pos, pos + CCMP_HDR_LEN, hdr_len); in rtllib_ccmp_encrypt()
202 pos += hdr_len; in rtllib_ccmp_encrypt()
259 static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_ccmp_decrypt() argument
268 if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { in rtllib_ccmp_decrypt()
274 pos = skb->data + hdr_len; in rtllib_ccmp_decrypt()
310 size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN - in rtllib_ccmp_decrypt()
350 memmove(skb->data + CCMP_HDR_LEN, skb->data, hdr_len); in rtllib_ccmp_decrypt()
/Linux-v4.19/drivers/net/wireless/mediatek/mt76/
Dmt76x2u_core.c22 int hdr_len; in mt76x2u_remove_dma_hdr() local
25 hdr_len = ieee80211_get_hdrlen_from_skb(skb); in mt76x2u_remove_dma_hdr()
26 if (hdr_len % 4) { in mt76x2u_remove_dma_hdr()
27 memmove(skb->data + 2, skb->data, hdr_len); in mt76x2u_remove_dma_hdr()
35 int hdr_len = ieee80211_get_hdrlen_from_skb(skb); in mt76x2u_check_skb_rooms() local
39 if (hdr_len % 4) in mt76x2u_check_skb_rooms()
/Linux-v4.19/drivers/staging/rtl8192u/ieee80211/
Dieee80211_crypt_wep.c85 static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_encrypt() argument
98 skb->len < hdr_len) in prism2_wep_encrypt()
101 len = skb->len - hdr_len; in prism2_wep_encrypt()
103 memmove(pos, pos + 4, hdr_len); in prism2_wep_encrypt()
104 pos += hdr_len; in prism2_wep_encrypt()
164 static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_decrypt() argument
176 if (skb->len < hdr_len + 8) in prism2_wep_decrypt()
179 pos = skb->data + hdr_len; in prism2_wep_decrypt()
193 plen = skb->len - hdr_len - 8; in prism2_wep_decrypt()
221 memmove(skb->data + 4, skb->data, hdr_len); in prism2_wep_decrypt()
Dieee80211_crypt_tkip.c292 static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in ieee80211_tkip_encrypt() argument
305 skb->len < hdr_len) in ieee80211_tkip_encrypt()
321 len = skb->len - hdr_len; in ieee80211_tkip_encrypt()
323 memmove(pos, pos + 8, hdr_len); in ieee80211_tkip_encrypt()
324 pos += hdr_len; in ieee80211_tkip_encrypt()
374 static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in ieee80211_tkip_decrypt() argument
389 if (skb->len < hdr_len + 8 + 4) in ieee80211_tkip_decrypt()
393 pos = skb->data + hdr_len; in ieee80211_tkip_decrypt()
441 plen = skb->len - hdr_len - 12; in ieee80211_tkip_decrypt()
494 memmove(skb->data + 8, skb->data, hdr_len); in ieee80211_tkip_decrypt()
[all …]
Dieee80211_crypt.h46 int (*encrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv);
47 int (*decrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv);
52 int (*encrypt_msdu)(struct sk_buff *skb, int hdr_len, void *priv);
53 int (*decrypt_msdu)(struct sk_buff *skb, int keyidx, int hdr_len,
/Linux-v4.19/net/ipv4/
Dgre_demux.c69 int hdr_len; in gre_parse_header() local
79 hdr_len = gre_calc_hlen(tpi->flags); in gre_parse_header()
81 if (!pskb_may_pull(skb, nhs + hdr_len)) in gre_parse_header()
118 hdr_len += 4; in gre_parse_header()
120 tpi->hdr_len = hdr_len; in gre_parse_header()
121 return hdr_len; in gre_parse_header()
/Linux-v4.19/net/core/
Dtso.c20 int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); in tso_build_hdr() local
23 memcpy(hdr, skb->data, hdr_len); in tso_build_hdr()
28 iph->tot_len = htons(size + hdr_len - mac_hdr_len); in tso_build_hdr()
67 int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); in tso_start() local
75 tso->size = skb_headlen(skb) - hdr_len; in tso_start()
76 tso->data = skb->data + hdr_len; in tso_start()
/Linux-v4.19/drivers/net/wireless/intel/iwlwifi/
Diwl-devtrace-data.h38 struct sk_buff *skb, u8 hdr_len),
39 TP_ARGS(dev, skb, hdr_len),
44 iwl_trace_data(skb) ? skb->len - hdr_len : 0)
49 skb_copy_bits(skb, hdr_len,
51 skb->len - hdr_len);
Diwl-devtrace-iwlwifi.h94 int hdr_len),
95 TP_ARGS(dev, skb, tfd, tfdlen, buf0, buf0_len, hdr_len),
108 __dynamic_array(u8, buf1, hdr_len > 0 && iwl_trace_data(skb) ?
109 0 : skb->len - hdr_len)
115 if (hdr_len > 0)
116 __entry->framelen += skb->len - hdr_len;
119 if (hdr_len > 0 && !iwl_trace_data(skb))
120 skb_copy_bits(skb, hdr_len,
122 skb->len - hdr_len);
/Linux-v4.19/drivers/net/usb/
Dnet1080.c57 __le16 hdr_len; // sizeof nc_header (LE, all) member
356 u16 hdr_len, packet_len; in net1080_rx_fixup() local
372 hdr_len = le16_to_cpup(&header->hdr_len); in net1080_rx_fixup()
379 } else if (hdr_len < MIN_HEADER) { in net1080_rx_fixup()
381 netdev_dbg(dev->net, "header too short, %d\n", hdr_len); in net1080_rx_fixup()
384 } else if (hdr_len > MIN_HEADER) { in net1080_rx_fixup()
386 netdev_dbg(dev->net, "header OOB, %d bytes\n", hdr_len - MIN_HEADER); in net1080_rx_fixup()
390 skb_pull(skb, hdr_len); in net1080_rx_fixup()
419 netdev_dbg(dev->net, "frame <rx h %d p %d id %d\n", header->hdr_len, in net1080_rx_fixup()
470 header->hdr_len = cpu_to_le16(sizeof (*header)); in net1080_tx_fixup()
[all …]
/Linux-v4.19/include/net/
Dlib80211.h62 int (*encrypt_mpdu) (struct sk_buff * skb, int hdr_len, void *priv);
63 int (*decrypt_mpdu) (struct sk_buff * skb, int hdr_len, void *priv);
67 int (*encrypt_msdu) (struct sk_buff * skb, int hdr_len, void *priv);
68 int (*decrypt_msdu) (struct sk_buff * skb, int keyidx, int hdr_len,
/Linux-v4.19/drivers/net/ethernet/cisco/enic/
Denic_res.h45 unsigned int mss_or_csum_offset, unsigned int hdr_len, in enic_queue_wq_desc_ex() argument
58 (u16)hdr_len, (u8)offload_mode, in enic_queue_wq_desc_ex()
102 unsigned int csum_offset, unsigned int hdr_len, in enic_queue_wq_desc_csum_l4() argument
106 csum_offset, hdr_len, vlan_tag_insert, vlan_tag, in enic_queue_wq_desc_csum_l4()
113 unsigned int mss, unsigned int hdr_len, int vlan_tag_insert, in enic_queue_wq_desc_tso() argument
117 mss, hdr_len, vlan_tag_insert, vlan_tag, in enic_queue_wq_desc_tso()
/Linux-v4.19/include/linux/soc/qcom/
Dapr.h13 #define APR_HDR_LEN(hdr_len) ((hdr_len)/4) argument
22 #define APR_HDR_FIELD(msg_type, hdr_len, ver)\ argument
23 (((msg_type & 0x3) << 8) | ((hdr_len & 0xF) << 4) | (ver & 0xF))
/Linux-v4.19/net/sched/
Dsch_atm.c59 int hdr_len; member
204 int fd, error, hdr_len; in atm_tc_change() local
235 hdr_len = nla_len(tb[TCA_ATM_HDR]); in atm_tc_change()
238 hdr_len = RFC1483LLC_LEN; in atm_tc_change()
250 opt->nla_type, nla_len(opt), hdr_len); in atm_tc_change()
279 flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL); in atm_tc_change()
309 flow->hdr_len = hdr_len; in atm_tc_change()
311 memcpy(flow->hdr, hdr, hdr_len); in atm_tc_change()
495 if (skb_headroom(skb) < flow->hdr_len) { in sch_atm_dequeue()
498 new = skb_realloc_headroom(skb, flow->hdr_len); in sch_atm_dequeue()
[all …]

123456789