Lines Matching refs:ip4

28 	struct ip *ip4;  in esp_inbound()  local
40 ip4 = rte_pktmbuf_mtod(m, struct ip *); in esp_inbound()
41 if (likely(ip4->ip_v == IPVERSION)) in esp_inbound()
42 ip_hdr_len = ip4->ip_hl * 4; in esp_inbound()
43 else if (ip4->ip_v == IP6_VERSION) in esp_inbound()
48 ip4->ip_v); in esp_inbound()
71 uint8_t *iv = RTE_PTR_ADD(ip4, ip_hdr_len + in esp_inbound()
96 uint8_t *iv = RTE_PTR_ADD(ip4, ip_hdr_len + in esp_inbound()
147 struct ip *ip4, *ip; in esp_inbound_post() local
201 ip4 = (struct ip *)rte_pktmbuf_adj(m, in esp_inbound_post()
204 memmove(ip4, ip, ip->ip_hl * 4); in esp_inbound_post()
205 ip4->ip_p = *nexthdr; in esp_inbound_post()
206 ip4->ip_len = htons(rte_pktmbuf_data_len(m)); in esp_inbound_post()
208 ip6 = (struct ip6_hdr *)ip4; in esp_inbound_post()
225 struct ip *ip4; in esp_outbound() local
240 ip4 = rte_pktmbuf_mtod(m, struct ip *); in esp_outbound()
241 if (likely(ip4->ip_v == IPVERSION)) { in esp_outbound()
243 ip_hdr_len = ip4->ip_hl * 4; in esp_outbound()
244 nlp = ip4->ip_p; in esp_outbound()
247 } else if (ip4->ip_v == IP6_VERSION) { in esp_outbound()
251 ip6 = (struct ip6_hdr *)ip4; in esp_outbound()
257 ip4->ip_v); in esp_outbound()
302 ip4 = ip4ip_outbound(m, sizeof(struct rte_esp_hdr) + sa->iv_len, in esp_outbound()
304 esp = (struct rte_esp_hdr *)(ip4 + 1); in esp_outbound()
314 memmove(new_ip, ip4, ip_hdr_len); in esp_outbound()
316 ip4 = (struct ip *)new_ip; in esp_outbound()
317 if (likely(ip4->ip_v == IPVERSION)) { in esp_outbound()
318 ip4->ip_p = IPPROTO_ESP; in esp_outbound()
319 ip4->ip_len = htons(rte_pktmbuf_data_len(m)); in esp_outbound()