Home
last modified time | relevance | path

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

123

/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()
Dnf_conntrack_reasm.c399 int hdrlen; in find_prev_fhdr() local
415 hdrlen = ipv6_authlen(&hdr); in find_prev_fhdr()
417 hdrlen = ipv6_optlen(&hdr); in find_prev_fhdr()
423 len -= hdrlen; in find_prev_fhdr()
424 start += hdrlen; in find_prev_fhdr()
/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 …]
/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 …]
Dioam6_iptunnel.c136 tuninfo->eh.hdrlen = (len_aligned >> 3) - 1; in ioam6_build_state()
166 int hdrlen, err; in ioam6_do_inline() local
168 hdrlen = (tuninfo->eh.hdrlen + 1) << 3; in ioam6_do_inline()
170 err = skb_cow_head(skb, hdrlen + skb->mac_len); in ioam6_do_inline()
178 skb_push(skb, sizeof(*oldhdr) + hdrlen); in ioam6_do_inline()
187 skb_postpush_rcsum(skb, hdr, sizeof(*hdr) + hdrlen); in ioam6_do_inline()
189 memcpy(skb_transport_header(skb), (u8 *)tuninfo, hdrlen); in ioam6_do_inline()
Dseg6_iptunnel.c45 return ((tuninfo->srh->hdrlen + 1) << 3) + head; in seg6_lwt_headroom()
132 int hdrlen, tot_len, err; in seg6_do_srh_encap() local
135 hdrlen = (osrh->hdrlen + 1) << 3; in seg6_do_srh_encap()
136 tot_len = hdrlen + sizeof(*hdr); in seg6_do_srh_encap()
177 memcpy(isrh, osrh, hdrlen); in seg6_do_srh_encap()
205 int hdrlen, err; in seg6_do_srh_inline() local
207 hdrlen = (osrh->hdrlen + 1) << 3; in seg6_do_srh_inline()
209 err = skb_cow_head(skb, hdrlen + skb->mac_len); in seg6_do_srh_inline()
219 skb_push(skb, sizeof(struct ipv6hdr) + hdrlen); in seg6_do_srh_inline()
228 memcpy(isrh, osrh, hdrlen); in seg6_do_srh_inline()
[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.c395 int offset = (hdr->hdrlen + 1) << 3; in ipv6_srh_rcv()
420 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_srh_rcv()
426 if (hdr->segments_left >= (hdr->hdrlen >> 1)) { in ipv6_srh_rcv()
513 int offset = (hdr->hdrlen + 1) << 3; in ipv6_rpl_srh_rcv()
537 skb->transport_header += (hdr->hdrlen + 1) << 3; in ipv6_rpl_srh_rcv()
548 n = (hdr->hdrlen << 3) - hdr->pad - (16 - hdr->cmpre); in ipv6_rpl_srh_rcv()
584 chdr = (struct ipv6_rpl_sr_hdr *)(buf + ((ohdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
609 skb_pull(skb, ((hdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
611 sizeof(struct ipv6hdr) + ((hdr->hdrlen + 1) << 3)); in ipv6_rpl_srh_rcv()
613 if (pskb_expand_head(skb, sizeof(struct ipv6hdr) + ((chdr->hdrlen + 1) << 3), 0, in ipv6_rpl_srh_rcv()
[all …]
Drpl.c46 outhdr->hdrlen = (((n + 1) * sizeof(struct in6_addr)) >> 3); in ipv6_rpl_srh_decompress()
107 outhdr->hdrlen = seglen >> 3; in ipv6_rpl_srh_compress()
109 outhdr->hdrlen++; in ipv6_rpl_srh_compress()
Dseg6_local.c620 int hdrlen; in end_dt_vrf_core() local
629 hdrlen = sizeof(struct iphdr); in end_dt_vrf_core()
633 hdrlen = sizeof(struct ipv6hdr); in end_dt_vrf_core()
650 skb_set_transport_header(skb, hdrlen); in end_dt_vrf_core()
881 if ((srh_state->hdrlen & 7) != 0) in seg6_bpf_has_valid_srh()
884 srh->hdrlen = (u8)(srh_state->hdrlen >> 3); in seg6_bpf_has_valid_srh()
885 if (!seg6_validate_srh(srh, (srh->hdrlen + 1) << 3, true)) in seg6_bpf_has_valid_srh()
914 srh_state->hdrlen = srh->hdrlen << 3; in input_action_end_bpf()
1166 len = (srh->hdrlen + 1) << 3; in put_nla_srh()
1179 int len = (a->srh->hdrlen + 1) << 3; in cmp_nla_srh()
[all …]
Ddatagram.c710 put_cmsg(msg, SOL_IPV6, IPV6_2292RTHDR, (rthdr->hdrlen+1) << 3, rthdr); in ip6_datagram_recv_specific_ctl()
865 len = ((hdr->hdrlen + 1) << 3); in ip6_datagram_send_ctl()
885 len = ((hdr->hdrlen + 1) << 3); in ip6_datagram_send_ctl()
910 len = ((hdr->hdrlen + 1) << 3); in ip6_datagram_send_ctl()
940 if (rthdr->hdrlen != 2 || in ip6_datagram_send_ctl()
952 len = ((rthdr->hdrlen + 1) << 3); in ip6_datagram_send_ctl()
960 if ((rthdr->hdrlen >> 1) != rthdr->segments_left) { in ip6_datagram_send_ctl()
969 int dsthdrlen = ((opt->dst1opt->hdrlen+1)<<3); in ip6_datagram_send_ctl()
/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()
/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 …]
/net/ipv4/
Dfou.c89 void *data, size_t hdrlen, u8 ipproto, in gue_remcsum() argument
95 size_t plen = sizeof(struct udphdr) + hdrlen + in gue_remcsum()
105 skb_remcsum_process(skb, (void *)guehdr + hdrlen, in gue_remcsum()
121 size_t len, optlen, hdrlen; in gue_udp_recv() local
178 hdrlen = sizeof(struct guehdr) + optlen; in gue_udp_recv()
200 hdrlen, guehdr->proto_ctype, in gue_udp_recv()
216 __skb_pull(skb, sizeof(struct udphdr) + hdrlen); in gue_udp_recv()
289 size_t hdrlen, struct gro_remcsum *grc, in gue_gro_remcsum() argument
302 guehdr = skb_gro_remcsum_process(skb, (void *)guehdr, off, hdrlen, in gue_gro_remcsum()
319 size_t len, optlen, hdrlen, off; in gue_gro_receive() local
[all …]
Dinet_diag.c206 static int inet_diag_parse_attrs(const struct nlmsghdr *nlh, int hdrlen, in inet_diag_parse_attrs() argument
212 nlmsg_for_each_attr(nla, nlh, hdrlen, remaining) { in inet_diag_parse_attrs()
593 int hdrlen, in inet_diag_cmd_exact() argument
601 err = inet_diag_parse_attrs(nlh, hdrlen, dump_data.req_nlas); in inet_diag_cmd_exact()
1200 static int __inet_diag_dump_start(struct netlink_callback *cb, int hdrlen) in __inet_diag_dump_start() argument
1212 err = inet_diag_parse_attrs(nlh, hdrlen, cb_data->req_nlas); in __inet_diag_dump_start()
1307 int hdrlen = sizeof(struct inet_diag_req); in inet_diag_rcv_msg_compat() local
1311 nlmsg_len(nlh) < hdrlen) in inet_diag_rcv_msg_compat()
1328 int hdrlen = sizeof(struct inet_diag_req_v2); in inet_diag_handler_cmd() local
1331 if (nlmsg_len(h) < hdrlen) in inet_diag_handler_cmd()
[all …]
/net/wireless/
Dutil.c465 unsigned int hdrlen = 24; in ieee80211_hdrlen() local
468 hdrlen = 4; in ieee80211_hdrlen()
474 hdrlen = 30; in ieee80211_hdrlen()
476 hdrlen += IEEE80211_QOS_CTL_LEN; in ieee80211_hdrlen()
478 hdrlen += IEEE80211_HT_CTL_LEN; in ieee80211_hdrlen()
485 hdrlen += IEEE80211_HT_CTL_LEN; in ieee80211_hdrlen()
500 hdrlen = 10; in ieee80211_hdrlen()
502 hdrlen = 16; in ieee80211_hdrlen()
505 return hdrlen; in ieee80211_hdrlen()
513 unsigned int hdrlen; in ieee80211_get_hdrlen_from_skb() local
[all …]
/net/netlink/
Dgenetlink.c523 int hdrlen, in genl_family_rcv_msg_attrs_parse() argument
540 err = __nlmsg_parse(nlh, hdrlen, attrbuf, ops->maxattr, ops->policy, in genl_family_rcv_msg_attrs_parse()
559 int hdrlen; member
573 if (ctx->nlh->nlmsg_len < nlmsg_msg_size(ctx->hdrlen)) in genl_start()
577 ops, ctx->hdrlen, in genl_start()
654 int hdrlen, struct net *net) in genl_family_rcv_msg_dumpit() argument
666 ctx.hdrlen = hdrlen; in genl_family_rcv_msg_dumpit()
700 int hdrlen, struct net *net) in genl_family_rcv_msg_doit() argument
710 ops, hdrlen, in genl_family_rcv_msg_doit()
750 int hdrlen; in genl_family_rcv_msg() local
[all …]
/net/tipc/
Ddiag.c79 int hdrlen = sizeof(struct tipc_sock_diag_req); in tipc_sock_diag_handler_dump() local
82 if (nlmsg_len(h) < hdrlen) in tipc_sock_diag_handler_dump()
/net/xfrm/
Dxfrm_output.c229 int hdrlen, optlen; in xfrm4_beet_encap_add() local
231 hdrlen = 0; in xfrm4_beet_encap_add()
234 hdrlen += IPV4_BEET_PHMAXLEN - (optlen & 4); in xfrm4_beet_encap_add()
236 skb_set_network_header(skb, -x->props.header_len - hdrlen + in xfrm4_beet_encap_add()
246 ph = __skb_pull(skb, XFRM_MODE_SKB_CB(skb)->ihl - hdrlen); in xfrm4_beet_encap_add()
255 ph->hdrlen = optlen / 8; in xfrm4_beet_encap_add()
382 ph->hdrlen = optlen / 8; in xfrm6_beet_encap_add()
/net/sunrpc/auth_gss/
Dgss_krb5_crypto.c147 make_checksum(struct krb5_ctx *kctx, char *header, int hdrlen, in make_checksum() argument
190 sg_init_one(sg, header, hdrlen); in make_checksum()
191 ahash_request_set_crypt(req, sg, NULL, hdrlen); in make_checksum()
239 make_checksum_v2(struct krb5_ctx *kctx, char *header, int hdrlen, in make_checksum_v2() argument
286 sg_init_one(sg, header, hdrlen); in make_checksum_v2()
287 ahash_request_set_crypt(req, sg, NULL, hdrlen); in make_checksum_v2()

123