Lines Matching refs:p

194 #define PKT_GET_ETH_HDR(p)        \  argument
195 ((struct eth_header *)(p))
196 #define PKT_GET_VLAN_HDR(p) \ argument
197 ((struct vlan_header *) (((uint8_t *)(p)) + sizeof(struct eth_header)))
198 #define PKT_GET_DVLAN_HDR(p) \ argument
199 (PKT_GET_VLAN_HDR(p) + 1)
200 #define PKT_GET_IP_HDR(p) \ argument
201 ((struct ip_header *)(((uint8_t *)(p)) + eth_get_l2_hdr_length(p)))
202 #define IP_HDR_GET_LEN(p) \ argument
203 ((ldub_p(p + offsetof(struct ip_header, ip_ver_len)) & 0x0F) << 2)
204 #define IP_HDR_GET_P(p) \ argument
205 (ldub_p(p + offsetof(struct ip_header, ip_p)))
206 #define PKT_GET_IP_HDR_LEN(p) \ argument
207 (IP_HDR_GET_LEN(PKT_GET_IP_HDR(p)))
208 #define PKT_GET_IP6_HDR(p) \ argument
209 ((struct ip6_header *) (((uint8_t *)(p)) + eth_get_l2_hdr_length(p)))
299 eth_get_l2_hdr_length(const void *p) in eth_get_l2_hdr_length() argument
301 uint16_t proto = be16_to_cpu(PKT_GET_ETH_HDR(p)->h_proto); in eth_get_l2_hdr_length()
302 struct vlan_header *hvlan = PKT_GET_VLAN_HDR(p); in eth_get_l2_hdr_length()
320 uint8_t p[sizeof(struct eth_header) + sizeof(struct vlan_header)]; in eth_get_l2_hdr_length_iov() local
321 size_t copied = iov_to_buf(iov, iovcnt, iovoff, p, ARRAY_SIZE(p)); in eth_get_l2_hdr_length_iov()
323 if (copied < ARRAY_SIZE(p)) { in eth_get_l2_hdr_length_iov()
327 return eth_get_l2_hdr_length(p); in eth_get_l2_hdr_length_iov()
331 eth_get_pkt_tci(const void *p) in eth_get_pkt_tci() argument
333 uint16_t proto = be16_to_cpu(PKT_GET_ETH_HDR(p)->h_proto); in eth_get_pkt_tci()
334 struct vlan_header *hvlan = PKT_GET_VLAN_HDR(p); in eth_get_pkt_tci()