/Linux-v5.15/net/wireless/ |
D | lib80211_crypt_wep.c | 63 static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len, in lib80211_wep_build_iv() argument 70 if (skb_headroom(skb) < 4 || skb->len < hdr_len) in lib80211_wep_build_iv() 74 memmove(pos, pos + 4, hdr_len); in lib80211_wep_build_iv() 75 pos += hdr_len; in lib80211_wep_build_iv() 105 static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_wep_encrypt() argument 117 if (lib80211_wep_build_iv(skb, hdr_len, NULL, 0, priv)) in lib80211_wep_encrypt() 121 skb_copy_from_linear_data_offset(skb, hdr_len, key, 3); in lib80211_wep_encrypt() 126 len = skb->len - hdr_len - 4; in lib80211_wep_encrypt() 127 pos = skb->data + hdr_len + 4; in lib80211_wep_encrypt() 151 static int lib80211_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_wep_decrypt() argument [all …]
|
D | lib80211_crypt_tkip.c | 283 static int lib80211_tkip_hdr(struct sk_buff *skb, int hdr_len, in lib80211_tkip_hdr() argument 292 if (skb_headroom(skb) < TKIP_HDR_LEN || skb->len < hdr_len) in lib80211_tkip_hdr() 306 memmove(pos, pos + TKIP_HDR_LEN, hdr_len); in lib80211_tkip_hdr() 307 pos += hdr_len; in lib80211_tkip_hdr() 327 static int lib80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_tkip_encrypt() argument 341 if (skb_tailroom(skb) < 4 || skb->len < hdr_len) in lib80211_tkip_encrypt() 344 len = skb->len - hdr_len; in lib80211_tkip_encrypt() 345 pos = skb->data + hdr_len; in lib80211_tkip_encrypt() 347 if ((lib80211_tkip_hdr(skb, hdr_len, rc4key, 16, priv)) < 0) in lib80211_tkip_encrypt() 376 static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_tkip_decrypt() argument [all …]
|
D | lib80211_crypt_ccmp.c | 153 static int lib80211_ccmp_hdr(struct sk_buff *skb, int hdr_len, in lib80211_ccmp_hdr() argument 160 if (skb_headroom(skb) < CCMP_HDR_LEN || skb->len < hdr_len) in lib80211_ccmp_hdr() 167 memmove(pos, pos + CCMP_HDR_LEN, hdr_len); in lib80211_ccmp_hdr() 168 pos += hdr_len; in lib80211_ccmp_hdr() 190 static int lib80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_ccmp_encrypt() argument 201 if (skb_tailroom(skb) < CCMP_MIC_LEN || skb->len < hdr_len) in lib80211_ccmp_encrypt() 204 data_len = skb->len - hdr_len; in lib80211_ccmp_encrypt() 205 len = lib80211_ccmp_hdr(skb, hdr_len, NULL, 0, priv); in lib80211_ccmp_encrypt() 220 sg_set_buf(&sg[1], skb->data + hdr_len + CCMP_HDR_LEN, in lib80211_ccmp_encrypt() 254 static int lib80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in lib80211_ccmp_decrypt() argument [all …]
|
/Linux-v5.15/net/ipv4/ |
D | gre_demux.c | 67 int hdr_len; in gre_parse_header() local 77 hdr_len = gre_calc_hlen(tpi->flags); in gre_parse_header() 79 if (!pskb_may_pull(skb, nhs + hdr_len)) in gre_parse_header() 117 val = skb_header_pointer(skb, nhs + hdr_len, in gre_parse_header() 123 hdr_len += 4; in gre_parse_header() 125 tpi->hdr_len = hdr_len; in gre_parse_header() 131 if ((greh->protocol == htons(ETH_P_ERSPAN) && hdr_len != 4) || in gre_parse_header() 135 if (!pskb_may_pull(skb, nhs + hdr_len + sizeof(*ershdr))) in gre_parse_header() 138 ershdr = (struct erspan_base_hdr *)(skb->data + nhs + hdr_len); in gre_parse_header() 142 return hdr_len; in gre_parse_header()
|
/Linux-v5.15/net/802/ |
D | fc.c | 37 int hdr_len; in fc_header() local 47 hdr_len = sizeof(struct fch_hdr) + sizeof(struct fcllc); in fc_header() 48 fch = skb_push(skb, hdr_len); in fc_header() 57 hdr_len = sizeof(struct fch_hdr); in fc_header() 58 fch = skb_push(skb, hdr_len); in fc_header() 69 return hdr_len; in fc_header() 71 return -hdr_len; in fc_header()
|
/Linux-v5.15/drivers/staging/rtl8192e/ |
D | rtllib_crypt_wep.c | 61 static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_encrypt() argument 73 skb->len < hdr_len){ in prism2_wep_encrypt() 75 skb_headroom(skb), skb_tailroom(skb), skb->len, hdr_len); in prism2_wep_encrypt() 78 len = skb->len - hdr_len; in prism2_wep_encrypt() 80 memmove(pos, pos + 4, hdr_len); in prism2_wep_encrypt() 81 pos += hdr_len; in prism2_wep_encrypt() 131 static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_decrypt() argument 142 if (skb->len < hdr_len + 8) in prism2_wep_decrypt() 145 pos = skb->data + hdr_len; in prism2_wep_decrypt() 159 plen = skb->len - hdr_len - 8; in prism2_wep_decrypt() [all …]
|
D | rtllib_crypt_tkip.c | 267 static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_tkip_encrypt() argument 280 skb->len < hdr_len) in rtllib_tkip_encrypt() 297 len = skb->len - hdr_len; in rtllib_tkip_encrypt() 299 memmove(pos, pos + 8, hdr_len); in rtllib_tkip_encrypt() 300 pos += hdr_len; in rtllib_tkip_encrypt() 343 static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_tkip_decrypt() argument 357 if (skb->len < hdr_len + 8 + 4) in rtllib_tkip_decrypt() 361 pos = skb->data + hdr_len; in rtllib_tkip_decrypt() 412 plen = skb->len - hdr_len - 12; in rtllib_tkip_decrypt() 449 memmove(skb->data + 8, skb->data, hdr_len); in rtllib_tkip_decrypt() [all …]
|
D | rtllib_crypt_ccmp.c | 155 static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_ccmp_encrypt() argument 165 skb->len < hdr_len) in rtllib_ccmp_encrypt() 169 memmove(pos, pos + CCMP_HDR_LEN, hdr_len); in rtllib_ccmp_encrypt() 170 pos += hdr_len; in rtllib_ccmp_encrypt() 196 int data_len = skb->len - hdr_len - CCMP_HDR_LEN; in rtllib_ccmp_encrypt() 207 sg_set_buf(&sg[1], skb->data + hdr_len + CCMP_HDR_LEN, in rtllib_ccmp_encrypt() 224 static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_ccmp_decrypt() argument 233 if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { in rtllib_ccmp_decrypt() 239 pos = skb->data + hdr_len; in rtllib_ccmp_decrypt() 275 size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN; in rtllib_ccmp_decrypt() [all …]
|
/Linux-v5.15/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_crypt_wep.c | 66 static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_encrypt() argument 77 skb->len < hdr_len) in prism2_wep_encrypt() 80 len = skb->len - hdr_len; in prism2_wep_encrypt() 82 memmove(pos, pos + 4, hdr_len); in prism2_wep_encrypt() 83 pos += hdr_len; in prism2_wep_encrypt() 133 static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_decrypt() argument 143 if (skb->len < hdr_len + 8) in prism2_wep_decrypt() 146 pos = skb->data + hdr_len; in prism2_wep_decrypt() 160 plen = skb->len - hdr_len - 8; in prism2_wep_decrypt() 177 memmove(skb->data + 4, skb->data, hdr_len); in prism2_wep_decrypt()
|
D | ieee80211_crypt_tkip.c | 269 static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in ieee80211_tkip_encrypt() argument 280 skb->len < hdr_len) in ieee80211_tkip_encrypt() 296 len = skb->len - hdr_len; in ieee80211_tkip_encrypt() 298 memmove(pos, pos + 8, hdr_len); in ieee80211_tkip_encrypt() 299 pos += hdr_len; in ieee80211_tkip_encrypt() 338 static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in ieee80211_tkip_decrypt() argument 351 if (skb->len < hdr_len + 8 + 4) in ieee80211_tkip_decrypt() 355 pos = skb->data + hdr_len; in ieee80211_tkip_decrypt() 401 plen = skb->len - hdr_len - 12; in ieee80211_tkip_decrypt() 439 memmove(skb->data + 8, skb->data, hdr_len); in ieee80211_tkip_decrypt() [all …]
|
D | ieee80211_crypt.h | 42 int (*encrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv); 43 int (*decrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv); 48 int (*encrypt_msdu)(struct sk_buff *skb, int hdr_len, void *priv); 49 int (*decrypt_msdu)(struct sk_buff *skb, int keyidx, int hdr_len,
|
D | ieee80211_crypt_ccmp.c | 161 static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in ieee80211_ccmp_encrypt() argument 171 skb->len < hdr_len) in ieee80211_ccmp_encrypt() 175 memmove(pos, pos + CCMP_HDR_LEN, hdr_len); in ieee80211_ccmp_encrypt() 176 pos += hdr_len; in ieee80211_ccmp_encrypt() 203 size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN; in ieee80211_ccmp_encrypt() 215 sg_set_buf(&sg[1], skb->data + hdr_len + CCMP_HDR_LEN, in ieee80211_ccmp_encrypt() 230 static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in ieee80211_ccmp_decrypt() argument 238 if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { in ieee80211_ccmp_decrypt() 244 pos = skb->data + hdr_len; in ieee80211_ccmp_decrypt() 290 size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN; in ieee80211_ccmp_decrypt() [all …]
|
/Linux-v5.15/drivers/net/wireless/intel/iwlwifi/ |
D | iwl-devtrace-iwlwifi.h | 85 int hdr_len), 86 TP_ARGS(dev, skb, tfd, tfdlen, buf0, buf0_len, hdr_len), 99 __dynamic_array(u8, buf1, hdr_len > 0 && iwl_trace_data(skb) ? 100 0 : skb->len - hdr_len) 106 if (hdr_len > 0) 107 __entry->framelen += skb->len - hdr_len; 110 if (hdr_len > 0 && !iwl_trace_data(skb)) 111 skb_copy_bits(skb, hdr_len, 113 skb->len - hdr_len);
|
/Linux-v5.15/drivers/net/wireless/intel/ipw2x00/ |
D | libipw_tx.c | 139 struct sk_buff *frag, int hdr_len) in libipw_encrypt_fragment() argument 153 res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv); in libipw_encrypt_fragment() 251 int bytes, fc, hdr_len; in libipw_xmit() local 319 hdr_len = LIBIPW_3ADDR_LEN; in libipw_xmit() 323 hdr_len += 2; in libipw_xmit() 340 int len = bytes + hdr_len + crypt->ops->extra_msdu_prefix_len + in libipw_xmit() 348 skb_put_data(skb_new, &header, hdr_len); in libipw_xmit() 353 res = crypt->ops->encrypt_msdu(skb_new, hdr_len, crypt->priv); in libipw_xmit() 363 skb_pull(skb, hdr_len); in libipw_xmit() 379 bytes_per_frag = frag_size - hdr_len; in libipw_xmit() [all …]
|
/Linux-v5.15/net/core/ |
D | tso.c | 19 int hdr_len = skb_transport_offset(skb) + tso->tlen; in tso_build_hdr() local 22 memcpy(hdr, skb->data, hdr_len); in tso_build_hdr() 27 iph->tot_len = htons(size + hdr_len - mac_hdr_len); in tso_build_hdr() 75 int hdr_len = skb_transport_offset(skb) + tlen; in tso_start() local 84 tso->size = skb_headlen(skb) - hdr_len; in tso_start() 85 tso->data = skb->data + hdr_len; in tso_start() 95 return hdr_len; in tso_start()
|
/Linux-v5.15/drivers/net/usb/ |
D | net1080.c | 45 __le16 hdr_len; // sizeof nc_header (LE, all) member 343 u16 hdr_len, packet_len; in net1080_rx_fixup() local 359 hdr_len = le16_to_cpup(&header->hdr_len); in net1080_rx_fixup() 366 } else if (hdr_len < MIN_HEADER) { in net1080_rx_fixup() 368 netdev_dbg(dev->net, "header too short, %d\n", hdr_len); in net1080_rx_fixup() 371 } else if (hdr_len > MIN_HEADER) { in net1080_rx_fixup() 373 netdev_dbg(dev->net, "header OOB, %d bytes\n", hdr_len - MIN_HEADER); in net1080_rx_fixup() 377 skb_pull(skb, hdr_len); in net1080_rx_fixup() 406 netdev_dbg(dev->net, "frame <rx h %d p %d id %d\n", header->hdr_len, in net1080_rx_fixup() 457 header->hdr_len = cpu_to_le16(sizeof (*header)); in net1080_tx_fixup() [all …]
|
/Linux-v5.15/include/net/ |
D | lib80211.h | 62 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-v5.15/drivers/net/ethernet/sfc/ |
D | rx.c | 70 u8 *eh, int hdr_len) in efx_rx_mk_skb() argument 78 hdr_len); in efx_rx_mk_skb() 84 EFX_WARN_ON_ONCE_PARANOID(rx_buf->len < hdr_len); in efx_rx_mk_skb() 87 efx->rx_prefix_size + hdr_len); in efx_rx_mk_skb() 89 __skb_put(skb, hdr_len); in efx_rx_mk_skb() 92 if (rx_buf->len > hdr_len) { in efx_rx_mk_skb() 93 rx_buf->page_offset += hdr_len; in efx_rx_mk_skb() 94 rx_buf->len -= hdr_len; in efx_rx_mk_skb() 213 u16 hdr_len = min_t(u16, rx_buf->len, EFX_SKB_HEADERS); in efx_rx_deliver() local 215 skb = efx_rx_mk_skb(channel, rx_buf, n_frags, eh, hdr_len); in efx_rx_deliver()
|
/Linux-v5.15/fs/ksmbd/ |
D | asn1.c | 154 char hdr_len = compute_asn_hdr_len_bytes(length); in encode_asn_tag() local 155 int len = length + 2 + hdr_len; in encode_asn_tag() 160 if (!hdr_len) { in encode_asn_tag() 163 buf[index++] = 0x80 | hdr_len; in encode_asn_tag() 164 for (i = hdr_len - 1; i >= 0; i--) in encode_asn_tag() 172 if (!hdr_len) { in encode_asn_tag() 175 buf[index++] = 0x80 | hdr_len; in encode_asn_tag() 176 for (i = hdr_len - 1; i >= 0; i--) in encode_asn_tag()
|
/Linux-v5.15/drivers/net/ethernet/cisco/enic/ |
D | enic_res.h | 45 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-v5.15/net/xfrm/ |
D | xfrm_output.c | 167 int hdr_len; in xfrm6_transport_output() local 172 hdr_len = xfrm6_hdr_offset(x, skb, &prevhdr); in xfrm6_transport_output() 173 if (hdr_len < 0) in xfrm6_transport_output() 174 return hdr_len; in xfrm6_transport_output() 178 skb->transport_header = skb->network_header + hdr_len; in xfrm6_transport_output() 179 __skb_pull(skb, hdr_len); in xfrm6_transport_output() 180 memmove(ipv6_hdr(skb), iph, hdr_len); in xfrm6_transport_output() 198 int hdr_len; in xfrm6_ro_output() local 202 hdr_len = xfrm6_hdr_offset(x, skb, &prevhdr); in xfrm6_ro_output() 203 if (hdr_len < 0) in xfrm6_ro_output() [all …]
|
/Linux-v5.15/net/ipv6/ |
D | ah6.c | 466 int hdr_len = skb_network_header_len(skb); in ah6_input_done() local 473 auth_data = ah_tmp_auth(work_iph, hdr_len); in ah6_input_done() 483 memcpy(skb_network_header(skb), work_iph, hdr_len); in ah6_input_done() 484 __skb_pull(skb, ah_hlen + hdr_len); in ah6_input_done() 488 skb_set_transport_header(skb, -hdr_len); in ah6_input_done() 523 u16 hdr_len; in ah6_input() local 543 hdr_len = skb_network_header_len(skb); in ah6_input() 566 skb_push(skb, hdr_len); in ah6_input() 573 work_iph = ah_alloc_tmp(ahash, nfrags + sglists, hdr_len + in ah6_input() 580 auth_data = ah_tmp_auth((u8 *)work_iph, hdr_len); in ah6_input() [all …]
|
/Linux-v5.15/include/linux/soc/qcom/ |
D | apr.h | 13 #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-v5.15/net/sched/ |
D | sch_atm.c | 60 int hdr_len; member 205 int fd, error, hdr_len; in atm_tc_change() local 237 hdr_len = nla_len(tb[TCA_ATM_HDR]); in atm_tc_change() 240 hdr_len = RFC1483LLC_LEN; in atm_tc_change() 252 opt->nla_type, nla_len(opt), hdr_len); in atm_tc_change() 281 flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL); in atm_tc_change() 311 flow->hdr_len = hdr_len; in atm_tc_change() 313 memcpy(flow->hdr, hdr, hdr_len); in atm_tc_change() 498 if (skb_headroom(skb) < flow->hdr_len) { in sch_atm_dequeue() 501 new = skb_realloc_headroom(skb, flow->hdr_len); in sch_atm_dequeue() [all …]
|
/Linux-v5.15/drivers/infiniband/core/ |
D | lag.c | 22 int hdr_len; in rdma_build_skb() local 25 hdr_len = ETH_HLEN + sizeof(struct udphdr) + LL_RESERVED_SPACE(netdev); in rdma_build_skb() 26 hdr_len += is_ipv4 ? sizeof(struct iphdr) : sizeof(struct ipv6hdr); in rdma_build_skb() 28 skb = alloc_skb(hdr_len, flags); in rdma_build_skb() 33 skb_reserve(skb, hdr_len); in rdma_build_skb()
|