#define IP_HDRLEN 0x05 /* default IP header length == five 32-bits words. */
#define IP_VHL_DEF (IP_VERSION | IP_HDRLEN)
-static struct ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */
+static struct rte_ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */
static struct udp_hdr pkt_udp_hdr; /**< UDP header of transmitted packets. */
static void
}
static void
-setup_pkt_udp_ip_headers(struct ipv4_hdr *ip_hdr,
+setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
struct udp_hdr *udp_hdr,
uint16_t pkt_data_len)
{
/*
* Initialize IP header.
*/
- pkt_len = (uint16_t) (pkt_len + sizeof(struct ipv4_hdr));
+ pkt_len = (uint16_t) (pkt_len + sizeof(struct rte_ipv4_hdr));
ip_hdr->version_ihl = IP_VHL_DEF;
ip_hdr->type_of_service = 0;
ip_hdr->fragment_offset = 0;
sizeof(struct rte_ether_hdr));
copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
sizeof(struct rte_ether_hdr) +
- sizeof(struct ipv4_hdr));
+ sizeof(struct rte_ipv4_hdr));
/*
* Complete first mbuf of packet and append it to the
pkt->vlan_tci = vlan_tci;
pkt->vlan_tci_outer = vlan_tci_outer;
pkt->l2_len = sizeof(struct rte_ether_hdr);
- pkt->l3_len = sizeof(struct ipv4_hdr);
+ pkt->l3_len = sizeof(struct rte_ipv4_hdr);
pkts_burst[nb_pkt] = pkt;
}
nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, pkts_burst, nb_pkt);
uint16_t pkt_data_len;
pkt_data_len = (uint16_t) (tx_pkt_length - (sizeof(struct rte_ether_hdr) +
- sizeof(struct ipv4_hdr) +
+ sizeof(struct rte_ipv4_hdr) +
sizeof(struct udp_hdr)));
setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);
}