/openbmc/linux/net/wireless/ |
H A D | lib80211_crypt_wep.c | 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() 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() 158 if (skb->len < hdr_len + 8) in lib80211_wep_decrypt() 161 pos = skb->data + hdr_len; in lib80211_wep_decrypt() 175 plen = skb->len - hdr_len - 8; in lib80211_wep_decrypt() [all …]
|
H A D | lib80211_crypt_tkip.c | 306 memmove(pos, pos + TKIP_HDR_LEN, hdr_len); in lib80211_tkip_hdr() 307 pos += hdr_len; in lib80211_tkip_hdr() 344 len = skb->len - hdr_len; in lib80211_tkip_encrypt() 345 pos = skb->data + hdr_len; in lib80211_tkip_encrypt() 396 if (skb->len < hdr_len + TKIP_HDR_LEN + 4) in lib80211_tkip_decrypt() 399 pos = skb->data + hdr_len; in lib80211_tkip_decrypt() 437 plen = skb->len - hdr_len - 12; in lib80211_tkip_decrypt() 550 skb_tailroom(skb), hdr_len, skb->len); in lib80211_michael_mic_add() 557 skb->data + hdr_len, skb->len - 8 - hdr_len, pos)) in lib80211_michael_mic_add() 585 int hdr_len, void *priv) in lib80211_michael_mic_verify() argument [all …]
|
H A D | lib80211_crypt_ccmp.c | 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() 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() 265 size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN; in lib80211_ccmp_decrypt() 267 if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { in lib80211_ccmp_decrypt() 273 pos = skb->data + hdr_len; in lib80211_ccmp_decrypt() [all …]
|
/openbmc/linux/net/ipv4/ |
H A 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()
|
/openbmc/linux/net/802/ |
H A 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()
|
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | test_parse_tcp_hdr_opt_dynptr.c | 33 __u8 kind, hdr_len; in parse_hdr_opt() local 34 __u8 buffer[sizeof(kind) + sizeof(hdr_len) + sizeof(*server_id)]; in parse_hdr_opt() 57 hdr_len = data[1]; in parse_hdr_opt() 58 if (hdr_len > *hdr_bytes_remaining) in parse_hdr_opt() 62 if (hdr_len != tcp_hdr_opt_len_tpr) in parse_hdr_opt() 69 *off += hdr_len; in parse_hdr_opt() 70 *hdr_bytes_remaining -= hdr_len; in parse_hdr_opt()
|
H A D | test_parse_tcp_hdr_opt.c | 40 __u8 *tcp_opt, kind, hdr_len; in parse_hdr_opt() local 61 hdr_len = tcp_opt[1]; in parse_hdr_opt() 62 if (hdr_len > state->hdr_bytes_remaining) in parse_hdr_opt() 66 if (hdr_len != tcp_hdr_opt_len_tpr) in parse_hdr_opt() 76 state->hdr_bytes_remaining -= hdr_len; in parse_hdr_opt() 77 state->byte_offset += hdr_len; in parse_hdr_opt()
|
/openbmc/linux/drivers/staging/rtl8192e/ |
H A D | rtllib_crypt_wep.c | 59 static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_encrypt() argument 71 skb->len < hdr_len){ in prism2_wep_encrypt() 73 skb_headroom(skb), skb_tailroom(skb), skb->len, hdr_len); in prism2_wep_encrypt() 76 len = skb->len - hdr_len; in prism2_wep_encrypt() 78 memmove(pos, pos + 4, hdr_len); in prism2_wep_encrypt() 79 pos += hdr_len; in prism2_wep_encrypt() 128 static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in prism2_wep_decrypt() argument 139 if (skb->len < hdr_len + 8) in prism2_wep_decrypt() 142 pos = skb->data + hdr_len; in prism2_wep_decrypt() 156 plen = skb->len - hdr_len - 8; in prism2_wep_decrypt() [all …]
|
H A D | rtllib_crypt_tkip.c | 266 skb->len < hdr_len) in rtllib_tkip_encrypt() 283 len = skb->len - hdr_len; in rtllib_tkip_encrypt() 285 memmove(pos, pos + 8, hdr_len); in rtllib_tkip_encrypt() 286 pos += hdr_len; in rtllib_tkip_encrypt() 341 if (skb->len < hdr_len + 8 + 4) in rtllib_tkip_decrypt() 345 pos = skb->data + hdr_len; in rtllib_tkip_decrypt() 396 plen = skb->len - hdr_len - 12; in rtllib_tkip_decrypt() 432 memmove(skb->data + 8, skb->data, hdr_len); in rtllib_tkip_decrypt() 521 skb->data + hdr_len, skb->len - 8 - hdr_len, pos)) in rtllib_michael_mic_add() 549 int hdr_len, void *priv) in rtllib_michael_mic_verify() argument [all …]
|
H A D | rtllib_crypt_ccmp.c | 151 static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_ccmp_encrypt() argument 161 skb->len < hdr_len) in rtllib_ccmp_encrypt() 165 memmove(pos, pos + CCMP_HDR_LEN, hdr_len); in rtllib_ccmp_encrypt() 166 pos += hdr_len; in rtllib_ccmp_encrypt() 192 int data_len = skb->len - hdr_len - CCMP_HDR_LEN; in rtllib_ccmp_encrypt() 203 sg_set_buf(&sg[1], skb->data + hdr_len + CCMP_HDR_LEN, in rtllib_ccmp_encrypt() 219 static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) in rtllib_ccmp_decrypt() argument 228 if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { in rtllib_ccmp_decrypt() 234 pos = skb->data + hdr_len; in rtllib_ccmp_decrypt() 270 size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN; in rtllib_ccmp_decrypt() [all …]
|
/openbmc/linux/drivers/staging/rtl8192u/ieee80211/ |
H A 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()
|
H A D | ieee80211_crypt_tkip.c | 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() 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() 529 skb->data + hdr_len, skb->len - 8 - hdr_len, pos)) in ieee80211_michael_mic_add() 557 int hdr_len, void *priv) in ieee80211_michael_mic_verify() argument [all …]
|
H A 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,
|
H A 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 …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/ |
H A D | iwl-devtrace-iwlwifi.h | 80 int hdr_len), 81 TP_ARGS(dev, skb, tfd, tfdlen, buf0, buf0_len, hdr_len), 94 __dynamic_array(u8, buf1, hdr_len > 0 && iwl_trace_data(skb) ? 95 0 : skb->len - hdr_len) 101 if (hdr_len > 0) 102 __entry->framelen += skb->len - hdr_len; 105 if (hdr_len > 0 && !iwl_trace_data(skb)) 106 skb_copy_bits(skb, hdr_len, 108 skb->len - hdr_len);
|
/openbmc/linux/net/core/ |
H A D | tso.c | 11 int hdr_len = skb_transport_offset(skb) + tso->tlen; in tso_build_hdr() local 14 memcpy(hdr, skb->data, hdr_len); in tso_build_hdr() 19 iph->tot_len = htons(size + hdr_len - mac_hdr_len); in tso_build_hdr() 67 int hdr_len = skb_transport_offset(skb) + tlen; in tso_start() local 76 tso->size = skb_headlen(skb) - hdr_len; in tso_start() 77 tso->data = skb->data + hdr_len; in tso_start() 87 return hdr_len; in tso_start()
|
/openbmc/linux/drivers/net/wireless/intel/ipw2x00/ |
H A D | libipw_tx.c | 139 struct sk_buff *frag, int hdr_len) in libipw_encrypt_fragment() argument 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() 348 skb_put_data(skb_new, &header, hdr_len); in libipw_xmit() 363 skb_pull(skb, hdr_len); in libipw_xmit() 379 bytes_per_frag = frag_size - hdr_len; in libipw_xmit() 401 frag_size = bytes + hdr_len; in libipw_xmit() 428 frag_hdr = skb_put(skb_frag, hdr_len); in libipw_xmit() 435 memcpy(frag_hdr, &header, hdr_len); in libipw_xmit() [all …]
|
/openbmc/linux/fs/smb/server/ |
H A D | asn1.c | 64 char hdr_len = compute_asn_hdr_len_bytes(length); in encode_asn_tag() local 65 int len = length + 2 + hdr_len; in encode_asn_tag() 70 if (!hdr_len) { in encode_asn_tag() 73 buf[index++] = 0x80 | hdr_len; in encode_asn_tag() 74 for (i = hdr_len - 1; i >= 0; i--) in encode_asn_tag() 82 if (!hdr_len) { in encode_asn_tag() 85 buf[index++] = 0x80 | hdr_len; in encode_asn_tag() 86 for (i = hdr_len - 1; i >= 0; i--) in encode_asn_tag()
|
/openbmc/linux/drivers/nvmem/layouts/ |
H A D | onie-tlv.c | 104 unsigned int hdr_len = sizeof(struct onie_tlv_hdr); in onie_tlv_add_cells() local 116 tlv.len, hdr_len + offset); in onie_tlv_add_cells() 124 cell.offset = hdr_len + offset + sizeof(tlv.type) + sizeof(tlv.len); in onie_tlv_add_cells() 189 size_t table_len, data_len, hdr_len; in onie_tlv_parse_table() local 202 hdr_len = sizeof(hdr.id) + sizeof(hdr.version) + sizeof(hdr.data_len); in onie_tlv_parse_table() 204 table_len = hdr_len + data_len; in onie_tlv_parse_table() 221 data = table + hdr_len; in onie_tlv_parse_table()
|
/openbmc/linux/include/net/ |
H A 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,
|
/openbmc/linux/drivers/net/usb/ |
H A 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 …]
|
/openbmc/linux/drivers/net/ethernet/cisco/enic/ |
H A D | enic_res.h | 32 unsigned int mss_or_csum_offset, unsigned int hdr_len, in enic_queue_wq_desc_ex() argument 45 (u16)hdr_len, (u8)offload_mode, in enic_queue_wq_desc_ex() 89 unsigned int csum_offset, unsigned int hdr_len, in enic_queue_wq_desc_csum_l4() argument 93 csum_offset, hdr_len, vlan_tag_insert, vlan_tag, in enic_queue_wq_desc_csum_l4() 100 unsigned int mss, unsigned int hdr_len, int vlan_tag_insert, in enic_queue_wq_desc_tso() argument 104 mss, hdr_len, vlan_tag_insert, vlan_tag, in enic_queue_wq_desc_tso()
|
/openbmc/linux/drivers/net/ethernet/sfc/siena/ |
H A 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()
|
/openbmc/linux/net/xfrm/ |
H A D | xfrm_output.c | 168 int hdr_len; in xfrm6_transport_output() local 174 if (hdr_len < 0) in xfrm6_transport_output() 175 return hdr_len; in xfrm6_transport_output() 180 __skb_pull(skb, hdr_len); in xfrm6_transport_output() 181 memmove(ipv6_hdr(skb), iph, hdr_len); in xfrm6_transport_output() 199 int hdr_len; in xfrm6_ro_output() local 204 if (hdr_len < 0) in xfrm6_ro_output() 205 return hdr_len; in xfrm6_ro_output() 210 __skb_pull(skb, hdr_len); in xfrm6_ro_output() 358 int optlen, hdr_len; in xfrm6_beet_encap_add() local [all …]
|
/openbmc/linux/drivers/net/ethernet/sfc/ |
H A 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()
|