Lines Matching refs:hdr_size
187 static u8 *batadv_arp_hw_src(struct sk_buff *skb, int hdr_size) in batadv_arp_hw_src() argument
191 addr = (u8 *)(skb->data + hdr_size); in batadv_arp_hw_src()
204 static __be32 batadv_arp_ip_src(struct sk_buff *skb, int hdr_size) in batadv_arp_ip_src() argument
206 return *(__be32 *)(batadv_arp_hw_src(skb, hdr_size) + ETH_ALEN); in batadv_arp_ip_src()
216 static u8 *batadv_arp_hw_dst(struct sk_buff *skb, int hdr_size) in batadv_arp_hw_dst() argument
218 return batadv_arp_hw_src(skb, hdr_size) + ETH_ALEN + 4; in batadv_arp_hw_dst()
228 static __be32 batadv_arp_ip_dst(struct sk_buff *skb, int hdr_size) in batadv_arp_ip_dst() argument
230 return *(__be32 *)(batadv_arp_hw_src(skb, hdr_size) + ETH_ALEN * 2 + 4); in batadv_arp_ip_dst()
377 u16 type, int hdr_size, char *msg) in batadv_dbg_arp() argument
387 ip_src = batadv_arp_ip_src(skb, hdr_size); in batadv_dbg_arp()
388 ip_dst = batadv_arp_ip_dst(skb, hdr_size); in batadv_dbg_arp()
391 batadv_arp_hw_src(skb, hdr_size), &ip_src, in batadv_dbg_arp()
392 batadv_arp_hw_dst(skb, hdr_size), &ip_dst); in batadv_dbg_arp()
394 if (hdr_size == 0) in batadv_dbg_arp()
444 u16 type, int hdr_size, char *msg) in batadv_dbg_arp() argument
861 struct sk_buff *skb, int hdr_size) in batadv_arp_get_type() argument
870 if (unlikely(!pskb_may_pull(skb, hdr_size + ETH_HLEN))) in batadv_arp_get_type()
873 ethhdr = (struct ethhdr *)(skb->data + hdr_size); in batadv_arp_get_type()
879 if (unlikely(!pskb_may_pull(skb, hdr_size + ETH_HLEN + in batadv_arp_get_type()
883 arphdr = (struct arphdr *)(skb->data + hdr_size + ETH_HLEN); in batadv_arp_get_type()
901 ip_src = batadv_arp_ip_src(skb, hdr_size); in batadv_arp_get_type()
902 ip_dst = batadv_arp_ip_dst(skb, hdr_size); in batadv_arp_get_type()
909 hw_src = batadv_arp_hw_src(skb, hdr_size); in batadv_arp_get_type()
915 hw_dst = batadv_arp_hw_dst(skb, hdr_size); in batadv_arp_get_type()
935 static unsigned short batadv_dat_get_vid(struct sk_buff *skb, int *hdr_size) in batadv_dat_get_vid() argument
939 vid = batadv_get_vid(skb, *hdr_size); in batadv_dat_get_vid()
947 *hdr_size += VLAN_HLEN; in batadv_dat_get_vid()
971 int hdr_size = 0; in batadv_dat_snoop_outgoing_arp_request() local
977 vid = batadv_dat_get_vid(skb, &hdr_size); in batadv_dat_snoop_outgoing_arp_request()
979 type = batadv_arp_get_type(bat_priv, skb, hdr_size); in batadv_dat_snoop_outgoing_arp_request()
986 batadv_dbg_arp(bat_priv, skb, type, hdr_size, in batadv_dat_snoop_outgoing_arp_request()
989 ip_src = batadv_arp_ip_src(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_request()
990 hw_src = batadv_arp_hw_src(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_request()
991 ip_dst = batadv_arp_ip_dst(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_request()
1027 bat_priv->stats.rx_bytes += skb->len + ETH_HLEN + hdr_size; in batadv_dat_snoop_outgoing_arp_request()
1054 struct sk_buff *skb, int hdr_size) in batadv_dat_snoop_incoming_arp_request() argument
1068 vid = batadv_dat_get_vid(skb, &hdr_size); in batadv_dat_snoop_incoming_arp_request()
1070 type = batadv_arp_get_type(bat_priv, skb, hdr_size); in batadv_dat_snoop_incoming_arp_request()
1074 hw_src = batadv_arp_hw_src(skb, hdr_size); in batadv_dat_snoop_incoming_arp_request()
1075 ip_src = batadv_arp_ip_src(skb, hdr_size); in batadv_dat_snoop_incoming_arp_request()
1076 ip_dst = batadv_arp_ip_dst(skb, hdr_size); in batadv_dat_snoop_incoming_arp_request()
1078 batadv_dbg_arp(bat_priv, skb, type, hdr_size, in batadv_dat_snoop_incoming_arp_request()
1110 if (hdr_size == sizeof(struct batadv_unicast_4addr_packet)) in batadv_dat_snoop_incoming_arp_request()
1140 int hdr_size = 0; in batadv_dat_snoop_outgoing_arp_reply() local
1146 vid = batadv_dat_get_vid(skb, &hdr_size); in batadv_dat_snoop_outgoing_arp_reply()
1148 type = batadv_arp_get_type(bat_priv, skb, hdr_size); in batadv_dat_snoop_outgoing_arp_reply()
1152 batadv_dbg_arp(bat_priv, skb, type, hdr_size, in batadv_dat_snoop_outgoing_arp_reply()
1155 hw_src = batadv_arp_hw_src(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_reply()
1156 ip_src = batadv_arp_ip_src(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_reply()
1157 hw_dst = batadv_arp_hw_dst(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_reply()
1158 ip_dst = batadv_arp_ip_dst(skb, hdr_size); in batadv_dat_snoop_outgoing_arp_reply()
1181 struct sk_buff *skb, int hdr_size) in batadv_dat_snoop_incoming_arp_reply() argument
1192 vid = batadv_dat_get_vid(skb, &hdr_size); in batadv_dat_snoop_incoming_arp_reply()
1194 type = batadv_arp_get_type(bat_priv, skb, hdr_size); in batadv_dat_snoop_incoming_arp_reply()
1198 batadv_dbg_arp(bat_priv, skb, type, hdr_size, in batadv_dat_snoop_incoming_arp_reply()
1201 hw_src = batadv_arp_hw_src(skb, hdr_size); in batadv_dat_snoop_incoming_arp_reply()
1202 ip_src = batadv_arp_ip_src(skb, hdr_size); in batadv_dat_snoop_incoming_arp_reply()
1203 hw_dst = batadv_arp_hw_dst(skb, hdr_size); in batadv_dat_snoop_incoming_arp_reply()
1204 ip_dst = batadv_arp_ip_dst(skb, hdr_size); in batadv_dat_snoop_incoming_arp_reply()
1243 int hdr_size = sizeof(struct batadv_bcast_packet); in batadv_dat_drop_broadcast_packet() local
1255 vid = batadv_dat_get_vid(forw_packet->skb, &hdr_size); in batadv_dat_drop_broadcast_packet()
1257 type = batadv_arp_get_type(bat_priv, forw_packet->skb, hdr_size); in batadv_dat_drop_broadcast_packet()
1261 ip_dst = batadv_arp_ip_dst(forw_packet->skb, hdr_size); in batadv_dat_drop_broadcast_packet()