Lines Matching refs:hdr_size

227  * @hdr_size: size of the possible header before the ARP packet
231 static u8 *batadv_arp_hw_src(struct sk_buff *skb, int hdr_size)
235 addr = (u8 *)(skb->data + hdr_size);
244 * @hdr_size: size of the possible header before the ARP packet
248 static __be32 batadv_arp_ip_src(struct sk_buff *skb, int hdr_size)
250 return *(__force __be32 *)(batadv_arp_hw_src(skb, hdr_size) + ETH_ALEN);
256 * @hdr_size: size of the possible header before the ARP packet
260 static u8 *batadv_arp_hw_dst(struct sk_buff *skb, int hdr_size)
262 return batadv_arp_hw_src(skb, hdr_size) + ETH_ALEN + 4;
268 * @hdr_size: size of the possible header before the ARP packet
272 static __be32 batadv_arp_ip_dst(struct sk_buff *skb, int hdr_size)
274 u8 *dst = batadv_arp_hw_src(skb, hdr_size) + ETH_ALEN * 2 + 4;
420 * @hdr_size: size of the possible header before the ARP packet
424 int hdr_size, char *msg)
434 ip_src = batadv_arp_ip_src(skb, hdr_size);
435 ip_dst = batadv_arp_ip_dst(skb, hdr_size);
438 batadv_arp_hw_src(skb, hdr_size), &ip_src,
439 batadv_arp_hw_dst(skb, hdr_size), &ip_dst);
441 if (hdr_size < sizeof(struct batadv_unicast_packet))
491 int hdr_size, char *msg)
995 * @hdr_size: size of the possible header before the ARP packet in the skb
1000 struct sk_buff *skb, int hdr_size)
1009 if (unlikely(!pskb_may_pull(skb, hdr_size + ETH_HLEN)))
1012 ethhdr = (struct ethhdr *)(skb->data + hdr_size);
1018 if (unlikely(!pskb_may_pull(skb, hdr_size + ETH_HLEN +
1022 arphdr = (struct arphdr *)(skb->data + hdr_size + ETH_HLEN);
1040 ip_src = batadv_arp_ip_src(skb, hdr_size);
1041 ip_dst = batadv_arp_ip_dst(skb, hdr_size);
1048 hw_src = batadv_arp_hw_src(skb, hdr_size);
1054 hw_dst = batadv_arp_hw_dst(skb, hdr_size);
1068 * @hdr_size: the size of the batman-adv header encapsulating the packet
1074 static unsigned short batadv_dat_get_vid(struct sk_buff *skb, int *hdr_size)
1078 vid = batadv_get_vid(skb, *hdr_size);
1080 /* ARP parsing functions jump forward of hdr_size + ETH_HLEN.
1082 * hdr_size is updated so that the functions will still skip the
1086 *hdr_size += VLAN_HLEN;
1146 int hdr_size = 0;
1152 vid = batadv_dat_get_vid(skb, &hdr_size);
1154 type = batadv_arp_get_type(bat_priv, skb, hdr_size);
1161 batadv_dbg_arp(bat_priv, skb, hdr_size, "Parsing outgoing ARP REQUEST");
1163 ip_src = batadv_arp_ip_src(skb, hdr_size);
1164 hw_src = batadv_arp_hw_src(skb, hdr_size);
1165 ip_dst = batadv_arp_ip_dst(skb, hdr_size);
1208 skb->len + ETH_HLEN + hdr_size);
1228 * @hdr_size: size of the encapsulation header
1233 struct sk_buff *skb, int hdr_size)
1247 vid = batadv_dat_get_vid(skb, &hdr_size);
1249 type = batadv_arp_get_type(bat_priv, skb, hdr_size);
1253 hw_src = batadv_arp_hw_src(skb, hdr_size);
1254 ip_src = batadv_arp_ip_src(skb, hdr_size);
1255 ip_dst = batadv_arp_ip_dst(skb, hdr_size);
1257 batadv_dbg_arp(bat_priv, skb, hdr_size, "Parsing incoming ARP REQUEST");
1274 if (hdr_size == sizeof(struct batadv_unicast_4addr_packet))
1303 int hdr_size = 0;
1309 vid = batadv_dat_get_vid(skb, &hdr_size);
1311 type = batadv_arp_get_type(bat_priv, skb, hdr_size);
1315 batadv_dbg_arp(bat_priv, skb, hdr_size, "Parsing outgoing ARP REPLY");
1317 hw_src = batadv_arp_hw_src(skb, hdr_size);
1318 ip_src = batadv_arp_ip_src(skb, hdr_size);
1319 hw_dst = batadv_arp_hw_dst(skb, hdr_size);
1320 ip_dst = batadv_arp_ip_dst(skb, hdr_size);
1339 * @hdr_size: size of the encapsulation header
1345 struct sk_buff *skb, int hdr_size)
1357 vid = batadv_dat_get_vid(skb, &hdr_size);
1359 type = batadv_arp_get_type(bat_priv, skb, hdr_size);
1363 batadv_dbg_arp(bat_priv, skb, hdr_size, "Parsing incoming ARP REPLY");
1365 hw_src = batadv_arp_hw_src(skb, hdr_size);
1366 ip_src = batadv_arp_ip_src(skb, hdr_size);
1367 hw_dst = batadv_arp_hw_dst(skb, hdr_size);
1368 ip_dst = batadv_arp_ip_dst(skb, hdr_size);
1738 * @hdr_size: header size, up to the tail of the batman-adv header
1745 struct sk_buff *skb, int hdr_size)
1757 if (unlikely(!pskb_may_pull(skb, hdr_size + ETH_HLEN)))
1760 ethhdr = (struct ethhdr *)(skb->data + hdr_size);
1761 skb_set_network_header(skb, hdr_size + ETH_HLEN);
1768 vid = batadv_dat_get_vid(skb, &hdr_size);
1796 int hdr_size = sizeof(struct batadv_bcast_packet);
1808 vid = batadv_dat_get_vid(forw_packet->skb, &hdr_size);
1810 type = batadv_arp_get_type(bat_priv, forw_packet->skb, hdr_size);
1814 ip_dst = batadv_arp_ip_dst(forw_packet->skb, hdr_size);