Home
last modified time | relevance | path

Searched refs:hdrlen (Results 1 – 25 of 203) sorted by relevance

123456789

/linux-6.6.21/net/ipv6/netfilter/
Dip6t_hbh.c51 unsigned int hdrlen = 0; in hbh_mt6() local
75 hdrlen = ipv6_optlen(oh); in hbh_mt6()
76 if (skb->len - ptr < hdrlen) { in hbh_mt6()
81 pr_debug("IPv6 OPTS LEN %u %u ", hdrlen, oh->hdrlen); in hbh_mt6()
84 optinfo->hdrlen, hdrlen, in hbh_mt6()
86 ((optinfo->hdrlen == hdrlen) ^ in hbh_mt6()
90 ((optinfo->hdrlen == hdrlen) ^ in hbh_mt6()
94 hdrlen -= 2; in hbh_mt6()
102 if (hdrlen < 1) in hbh_mt6()
122 if (hdrlen < 2) in hbh_mt6()
[all …]
Dip6t_ah.c42 unsigned int hdrlen = 0; in ah_mt6() local
58 hdrlen = ipv6_authlen(ah); in ah_mt6()
60 pr_debug("IPv6 AH LEN %u %u ", hdrlen, ah->hdrlen); in ah_mt6()
69 ahinfo->hdrlen, hdrlen, in ah_mt6()
70 (!ahinfo->hdrlen || in ah_mt6()
71 (ahinfo->hdrlen == hdrlen) ^ in ah_mt6()
80 (!ahinfo->hdrlen || in ah_mt6()
81 (ahinfo->hdrlen == hdrlen) ^ in ah_mt6()
Dip6t_rt.c38 unsigned int hdrlen = 0; in rt_mt6() local
57 hdrlen = ipv6_optlen(rh); in rt_mt6()
58 if (skb->len - ptr < hdrlen) { in rt_mt6()
67 ((rtinfo->hdrlen == hdrlen) ^ in rt_mt6()
92 if (rtinfo->addrnr > (unsigned int)((hdrlen - 8) / 16)) { in rt_mt6()
98 temp < (unsigned int)((hdrlen - 8) / 16); in rt_mt6()
123 if (rtinfo->addrnr > (unsigned int)((hdrlen - 8) / 16)) { in rt_mt6()
142 temp == (unsigned int)((hdrlen - 8) / 16)) in rt_mt6()
Dip6t_srh.c29 int hdrlen, srhoff = 0; in srh_mt6() local
37 hdrlen = ipv6_optlen(srh); in srh_mt6()
38 if (skb->len - srhoff < hdrlen) in srh_mt6()
56 !(srh->hdrlen == srhinfo->hdr_len))) in srh_mt6()
61 !(srh->hdrlen > srhinfo->hdr_len))) in srh_mt6()
66 !(srh->hdrlen < srhinfo->hdr_len))) in srh_mt6()
118 int hdrlen, psidoff, nsidoff, lsidoff, srhoff = 0; in srh1_mt6() local
131 hdrlen = ipv6_optlen(srh); in srh1_mt6()
132 if (skb->len - srhoff < hdrlen) in srh1_mt6()
150 !(srh->hdrlen == srhinfo->hdr_len))) in srh1_mt6()
[all …]
Dip6t_ipv6header.c48 int hdrlen; in ipv6header_mt6() local
72 hdrlen = 8; in ipv6header_mt6()
74 hdrlen = ipv6_authlen(hp); in ipv6header_mt6()
76 hdrlen = ipv6_optlen(hp); in ipv6header_mt6()
100 len -= hdrlen; in ipv6header_mt6()
101 ptr += hdrlen; in ipv6header_mt6()
/linux-6.6.21/net/mac80211/
Dwep.c70 unsigned int hdrlen; in ieee80211_wep_add_iv() local
78 hdrlen = ieee80211_hdrlen(hdr->frame_control); in ieee80211_wep_add_iv()
80 memmove(newhdr, newhdr + IEEE80211_WEP_IV_LEN, hdrlen); in ieee80211_wep_add_iv()
85 return newhdr + hdrlen; in ieee80211_wep_add_iv()
87 ieee80211_wep_get_iv(local, keylen, keyidx, newhdr + hdrlen); in ieee80211_wep_add_iv()
88 return newhdr + hdrlen; in ieee80211_wep_add_iv()
97 unsigned int hdrlen; in ieee80211_wep_remove_iv() local
99 hdrlen = ieee80211_hdrlen(hdr->frame_control); in ieee80211_wep_remove_iv()
100 memmove(skb->data + IEEE80211_WEP_IV_LEN, skb->data, hdrlen); in ieee80211_wep_remove_iv()
199 unsigned int hdrlen; in ieee80211_wep_decrypt() local
[all …]
Dwpa.c34 unsigned int hdrlen; in ieee80211_tx_h_michael_mic_add() local
45 hdrlen = ieee80211_hdrlen(hdr->frame_control); in ieee80211_tx_h_michael_mic_add()
46 if (skb->len < hdrlen) in ieee80211_tx_h_michael_mic_add()
49 data = skb->data + hdrlen; in ieee80211_tx_h_michael_mic_add()
50 data_len = skb->len - hdrlen; in ieee80211_tx_h_michael_mic_add()
99 unsigned int hdrlen; in ieee80211_rx_h_michael_mic_verify() local
151 hdrlen = ieee80211_hdrlen(hdr->frame_control); in ieee80211_rx_h_michael_mic_verify()
152 if (skb->len < hdrlen + MICHAEL_MIC_LEN) in ieee80211_rx_h_michael_mic_verify()
159 data = skb->data + hdrlen; in ieee80211_rx_h_michael_mic_verify()
160 data_len = skb->len - hdrlen - MICHAEL_MIC_LEN; in ieee80211_rx_h_michael_mic_verify()
[all …]
/linux-6.6.21/drivers/staging/rtl8723bs/core/
Drtw_security.c65 iv = pframe+pattrib->hdrlen; in rtw_wep_encrypt()
68 payload = pframe+pattrib->iv_len+pattrib->hdrlen; in rtw_wep_encrypt()
72 length = pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len; in rtw_wep_encrypt()
81 length = pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len; in rtw_wep_encrypt()
110 iv = pframe+prxattrib->hdrlen; in rtw_wep_decrypt()
117 length = ((union recv_frame *)precvframe)->u.hdr.len-prxattrib->hdrlen-prxattrib->iv_len; in rtw_wep_decrypt()
119 payload = pframe+prxattrib->iv_len+prxattrib->hdrlen; in rtw_wep_decrypt()
495 iv = pframe+pattrib->hdrlen; in rtw_tkip_encrypt()
496 payload = pframe+pattrib->iv_len+pattrib->hdrlen; in rtw_tkip_encrypt()
508 length = pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len; in rtw_tkip_encrypt()
[all …]
/linux-6.6.21/drivers/staging/rtl8712/
Drtl871x_security.c172 iv = pframe + pattrib->hdrlen; in r8712_wep_encrypt()
177 payload = pframe + pattrib->iv_len + pattrib->hdrlen; in r8712_wep_encrypt()
180 pattrib->hdrlen - in r8712_wep_encrypt()
192 pattrib->hdrlen - pattrib->iv_len - in r8712_wep_encrypt()
225 iv = pframe + prxattrib->hdrlen; in r8712_wep_decrypt()
233 u.hdr.len - prxattrib->hdrlen - prxattrib->iv_len; in r8712_wep_decrypt()
234 payload = pframe + prxattrib->iv_len + prxattrib->hdrlen; in r8712_wep_decrypt()
590 iv = pframe + pattrib->hdrlen; in r8712_tkip_encrypt()
592 pattrib->hdrlen; in r8712_tkip_encrypt()
603 pattrib->hdrlen - in r8712_tkip_encrypt()
[all …]
/linux-6.6.21/net/ipv6/
Dexthdrs_core.c81 int hdrlen; in ipv6_skip_exthdr() local
101 hdrlen = 8; in ipv6_skip_exthdr()
103 hdrlen = ipv6_authlen(hp); in ipv6_skip_exthdr()
105 hdrlen = ipv6_optlen(hp); in ipv6_skip_exthdr()
108 start += hdrlen; in ipv6_skip_exthdr()
126 len = ((hdr->hdrlen + 1) << 3); in ipv6_find_tlv()
210 unsigned int hdrlen; in ipv6_find_hdr() local
265 hdrlen = 8; in ipv6_find_hdr()
269 hdrlen = ipv6_authlen(hp); in ipv6_find_hdr()
271 hdrlen = ipv6_optlen(hp); in ipv6_find_hdr()
[all …]
Dseg6_iptunnel.c47 return ((tuninfo->srh->hdrlen + 1) << 3) + head; in seg6_lwt_headroom()
134 int hdrlen, tot_len, err; in seg6_do_srh_encap() local
137 hdrlen = (osrh->hdrlen + 1) << 3; in seg6_do_srh_encap()
138 tot_len = hdrlen + sizeof(*hdr); in seg6_do_srh_encap()
179 memcpy(isrh, osrh, hdrlen); in seg6_do_srh_encap()
210 int hdrlen = ipv6_optlen(osrh); in seg6_do_srh_encap_red() local
220 red_hdrlen = hdrlen - sizeof(struct in6_addr); in seg6_do_srh_encap_red()
228 red_hdrlen = skip_srh ? 0 : hdrlen; in seg6_do_srh_encap_red()
280 memcpy(isrh, osrh, hdrlen); in seg6_do_srh_encap_red()
289 tlvs_len = hdrlen - tlv_offset; in seg6_do_srh_encap_red()
[all …]
Dioam6_iptunnel.c184 tuninfo->eh.hdrlen = ((sizeof(*tuninfo) + len_aligned) >> 3) - 1; in ioam6_build_state()
226 int hdrlen, err; in ioam6_do_inline() local
228 hdrlen = (tuninfo->eh.hdrlen + 1) << 3; in ioam6_do_inline()
230 err = skb_cow_head(skb, hdrlen + skb->mac_len); in ioam6_do_inline()
238 skb_push(skb, sizeof(*oldhdr) + hdrlen); in ioam6_do_inline()
247 skb_postpush_rcsum(skb, hdr, sizeof(*hdr) + hdrlen); in ioam6_do_inline()
249 memcpy(skb_transport_header(skb), (u8 *)tuninfo, hdrlen); in ioam6_do_inline()
263 int hdrlen, len, err; in ioam6_do_encap() local
265 hdrlen = (tuninfo->eh.hdrlen + 1) << 3; in ioam6_do_encap()
266 len = sizeof(*hdr) + hdrlen; in ioam6_do_encap()
[all …]
Drpl_iptunnel.c44 if ((srh->hdrlen << 3) != seglen) in rpl_validate_srh()
134 size_t hdrlen; in rpl_do_srh_inline() local
144 csrh = (struct ipv6_rpl_sr_hdr *)(buf + ((srh->hdrlen + 1) << 3)); in rpl_do_srh_inline()
154 hdrlen = ((csrh->hdrlen + 1) << 3); in rpl_do_srh_inline()
156 err = skb_cow_head(skb, hdrlen + skb->mac_len); in rpl_do_srh_inline()
166 skb_push(skb, sizeof(struct ipv6hdr) + hdrlen); in rpl_do_srh_inline()
173 memcpy(isrh, csrh, hdrlen); in rpl_do_srh_inline()
182 skb_postpush_rcsum(skb, hdr, sizeof(struct ipv6hdr) + hdrlen); in rpl_do_srh_inline()
Dexthdrs.c400 int offset = (hdr->hdrlen + 1) << 3; in ipv6_srh_rcv()
421 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_srh_rcv()
427 if (hdr->segments_left >= (hdr->hdrlen >> 1)) { in ipv6_srh_rcv()
511 int offset = (hdr->hdrlen + 1) << 3; in ipv6_rpl_srh_rcv()
531 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_rpl_srh_rcv()
537 n = (hdr->hdrlen << 3) - hdr->pad - (16 - hdr->cmpre); in ipv6_rpl_srh_rcv()
567 chdr = (struct ipv6_rpl_sr_hdr *)(buf + ((ohdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
589 skb_pull(skb, ((hdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
591 sizeof(struct ipv6hdr) + ((hdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
593 if (pskb_expand_head(skb, sizeof(struct ipv6hdr) + ((chdr->hdrlen + 1) << 3), 0, in ipv6_rpl_srh_rcv()
[all …]
/linux-6.6.21/crypto/asymmetric_keys/
Dpkcs7_parser.c204 int pkcs7_note_OID(void *context, size_t hdrlen, in pkcs7_note_OID() argument
223 int pkcs7_sig_note_digest_algo(void *context, size_t hdrlen, in pkcs7_sig_note_digest_algo() argument
270 int pkcs7_sig_note_pkey_algo(void *context, size_t hdrlen, in pkcs7_sig_note_pkey_algo() argument
308 int pkcs7_check_content_type(void *context, size_t hdrlen, in pkcs7_check_content_type() argument
325 int pkcs7_note_signeddata_version(void *context, size_t hdrlen, in pkcs7_note_signeddata_version() argument
359 int pkcs7_note_signerinfo_version(void *context, size_t hdrlen, in pkcs7_note_signerinfo_version() argument
402 int pkcs7_extract_cert(void *context, size_t hdrlen, in pkcs7_extract_cert() argument
420 value -= hdrlen; in pkcs7_extract_cert()
421 vlen += hdrlen; in pkcs7_extract_cert()
442 int pkcs7_note_certificate_list(void *context, size_t hdrlen, in pkcs7_note_certificate_list() argument
[all …]
Dx509_cert_parser.c153 int x509_note_OID(void *context, size_t hdrlen, in x509_note_OID() argument
173 int x509_note_tbs_certificate(void *context, size_t hdrlen, in x509_note_tbs_certificate() argument
180 hdrlen, tag, (unsigned long)value - ctx->data, vlen); in x509_note_tbs_certificate()
182 ctx->cert->tbs = value - hdrlen; in x509_note_tbs_certificate()
183 ctx->cert->tbs_size = vlen + hdrlen; in x509_note_tbs_certificate()
190 int x509_note_sig_algo(void *context, size_t hdrlen, unsigned char tag, in x509_note_sig_algo() argument
285 int x509_note_signature(void *context, size_t hdrlen, in x509_note_signature() argument
324 int x509_note_serial(void *context, size_t hdrlen, in x509_note_serial() argument
337 int x509_extract_name_segment(void *context, size_t hdrlen, in x509_extract_name_segment() argument
366 static int x509_fabricate_name(struct x509_parse_context *ctx, size_t hdrlen, in x509_fabricate_name() argument
[all …]
Dpkcs8_parser.c33 int pkcs8_note_OID(void *context, size_t hdrlen, in pkcs8_note_OID() argument
53 int pkcs8_note_version(void *context, size_t hdrlen, in pkcs8_note_version() argument
67 int pkcs8_note_algo(void *context, size_t hdrlen, in pkcs8_note_algo() argument
83 int pkcs8_note_key(void *context, size_t hdrlen, in pkcs8_note_key() argument
/linux-6.6.21/drivers/staging/wlan-ng/
Dp80211hdr.h167 u16 hdrlen = 0; in p80211_headerlen() local
171 hdrlen = WLAN_HDR_A3_LEN; in p80211_headerlen()
174 hdrlen = WLAN_HDR_A3_LEN; in p80211_headerlen()
176 hdrlen += ETH_ALEN; in p80211_headerlen()
179 hdrlen = wlan_ctl_framelen(WLAN_GET_FC_FSTYPE(fctl)) - in p80211_headerlen()
183 hdrlen = WLAN_HDR_A3_LEN; in p80211_headerlen()
186 return hdrlen; in p80211_headerlen()
/linux-6.6.21/crypto/
Drsa_helper.c16 int rsa_get_n(void *context, size_t hdrlen, unsigned char tag, in rsa_get_n() argument
46 int rsa_get_e(void *context, size_t hdrlen, unsigned char tag, in rsa_get_e() argument
61 int rsa_get_d(void *context, size_t hdrlen, unsigned char tag, in rsa_get_d() argument
76 int rsa_get_p(void *context, size_t hdrlen, unsigned char tag, in rsa_get_p() argument
91 int rsa_get_q(void *context, size_t hdrlen, unsigned char tag, in rsa_get_q() argument
106 int rsa_get_dp(void *context, size_t hdrlen, unsigned char tag, in rsa_get_dp() argument
121 int rsa_get_dq(void *context, size_t hdrlen, unsigned char tag, in rsa_get_dq() argument
136 int rsa_get_qinv(void *context, size_t hdrlen, unsigned char tag, in rsa_get_qinv() argument
/linux-6.6.21/fs/smb/server/
Dasn1.c162 int ksmbd_gssapi_this_mech(void *context, size_t hdrlen, unsigned char tag, in ksmbd_gssapi_this_mech() argument
179 int ksmbd_neg_token_init_mech_type(void *context, size_t hdrlen, in ksmbd_neg_token_init_mech_type() argument
211 static int ksmbd_neg_token_alloc(void *context, size_t hdrlen, in ksmbd_neg_token_alloc() argument
229 int ksmbd_neg_token_init_mech_token(void *context, size_t hdrlen, in ksmbd_neg_token_init_mech_token() argument
233 return ksmbd_neg_token_alloc(context, hdrlen, tag, value, vlen); in ksmbd_neg_token_init_mech_token()
236 int ksmbd_neg_token_targ_resp_token(void *context, size_t hdrlen, in ksmbd_neg_token_targ_resp_token() argument
240 return ksmbd_neg_token_alloc(context, hdrlen, tag, value, vlen); in ksmbd_neg_token_targ_resp_token()
/linux-6.6.21/include/net/
Dnetlink.h600 int hdrlen) in nlmsg_attrdata() argument
603 return (struct nlattr *) (data + NLMSG_ALIGN(hdrlen)); in nlmsg_attrdata()
611 static inline int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrlen() argument
613 return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen); in nlmsg_attrlen()
734 static inline int __nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, in __nlmsg_parse() argument
740 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) { in __nlmsg_parse()
745 return __nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen), in __nlmsg_parse()
746 nlmsg_attrlen(nlh, hdrlen), policy, validate, in __nlmsg_parse()
761 static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, in nlmsg_parse() argument
766 return __nlmsg_parse(nlh, hdrlen, tb, maxtype, policy, in nlmsg_parse()
[all …]
/linux-6.6.21/net/bluetooth/cmtp/
Dcore.c134 __u8 hdr, hdrlen, id; in cmtp_recv_frame() local
144 hdrlen = 2; in cmtp_recv_frame()
148 hdrlen = 3; in cmtp_recv_frame()
152 hdrlen = 1; in cmtp_recv_frame()
159 BT_DBG("hdr 0x%02x hdrlen %d len %d id %d", hdr, hdrlen, len, id); in cmtp_recv_frame()
161 if (hdrlen + len > skb->len) { in cmtp_recv_frame()
167 skb_pull(skb, hdrlen); in cmtp_recv_frame()
173 cmtp_add_msgpart(session, id, skb->data + hdrlen, len); in cmtp_recv_frame()
178 cmtp_add_msgpart(session, id, skb->data + hdrlen, len); in cmtp_recv_frame()
186 skb_pull(skb, hdrlen + len); in cmtp_recv_frame()
/linux-6.6.21/net/netfilter/
Dnf_nat_proto.c570 unsigned int hdrlen = ip_hdrlen(skb); in nf_nat_icmp_reply_translation() local
576 if (skb_ensure_writable(skb, hdrlen + sizeof(*inside))) in nf_nat_icmp_reply_translation()
578 if (nf_ip_checksum(skb, hooknum, hdrlen, IPPROTO_ICMP)) in nf_nat_icmp_reply_translation()
581 inside = (void *)skb->data + hdrlen; in nf_nat_icmp_reply_translation()
601 if (!nf_nat_ipv4_manip_pkt(skb, hdrlen + sizeof(inside->icmp), in nf_nat_icmp_reply_translation()
607 inside = (void *)skb->data + hdrlen; in nf_nat_icmp_reply_translation()
610 csum_fold(skb_checksum(skb, hdrlen, in nf_nat_icmp_reply_translation()
611 skb->len - hdrlen, 0)); in nf_nat_icmp_reply_translation()
840 unsigned int hdrlen) in nf_nat_icmpv6_reply_translation() argument
853 if (skb_ensure_writable(skb, hdrlen + sizeof(*inside))) in nf_nat_icmpv6_reply_translation()
[all …]
/linux-6.6.21/net/ipv4/
Dfou_core.c91 void *data, size_t hdrlen, u8 ipproto, in gue_remcsum() argument
97 size_t plen = sizeof(struct udphdr) + hdrlen + in gue_remcsum()
107 skb_remcsum_process(skb, (void *)guehdr + hdrlen, in gue_remcsum()
123 size_t len, optlen, hdrlen; in gue_udp_recv() local
180 hdrlen = sizeof(struct guehdr) + optlen; in gue_udp_recv()
202 hdrlen, guehdr->proto_ctype, in gue_udp_recv()
218 __skb_pull(skb, sizeof(struct udphdr) + hdrlen); in gue_udp_recv()
285 size_t hdrlen, struct gro_remcsum *grc, in gue_gro_remcsum() argument
298 guehdr = skb_gro_remcsum_process(skb, (void *)guehdr, off, hdrlen, in gue_gro_remcsum()
315 size_t len, optlen, hdrlen, off; in gue_gro_receive() local
[all …]
/linux-6.6.21/drivers/net/wireless/intersil/hostap/
Dhostap_80211_rx.c68 int hdrlen, phdrlen, head_need, tail_need; in prism2_rx_80211() local
102 hdrlen = hostap_80211_get_hdrlen(fhdr->frame_control); in prism2_rx_80211()
195 skb_pull(skb, hdrlen); in prism2_rx_80211()
653 int res, hdrlen; in hostap_rx_frame_decrypt() local
659 hdrlen = hostap_80211_get_hdrlen(hdr->frame_control); in hostap_rx_frame_decrypt()
672 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); in hostap_rx_frame_decrypt()
691 int res, hdrlen; in hostap_rx_frame_decrypt_msdu() local
697 hdrlen = hostap_80211_get_hdrlen(hdr->frame_control); in hostap_rx_frame_decrypt_msdu()
700 res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv); in hostap_rx_frame_decrypt_msdu()
722 size_t hdrlen; in hostap_80211_rx() local
[all …]

123456789