X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl3fwd%2Fl3fwd.h;h=e2399d76b9f31d780f93f73bef3498c4a7946094;hb=e2de1f7bb9668415c8fdfce6b736112bfb24f377;hp=c962deac39be5633867a3a24468dbd124646f766;hpb=3998e2a07220844d3f3c17f76a781ced3efe0de0;p=dpdk.git diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index c962deac39..e2399d76b9 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -5,6 +5,7 @@ #ifndef __L3_FWD_H__ #define __L3_FWD_H__ +#include #include #define DO_RFC_1812_CHECKS @@ -73,7 +74,7 @@ extern volatile bool force_quit; /* ethernet addresses of ports */ extern uint64_t dest_eth_addr[RTE_MAX_ETHPORTS]; -extern struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; +extern struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; /* mask of enabled ports */ extern uint32_t enabled_port_mask; @@ -130,14 +131,14 @@ send_single_packet(struct lcore_conf *qconf, #ifdef DO_RFC_1812_CHECKS static inline int -is_valid_ipv4_pkt(struct ipv4_hdr *pkt, uint32_t link_len) +is_valid_ipv4_pkt(struct rte_ipv4_hdr *pkt, uint32_t link_len) { /* From http://www.rfc-editor.org/rfc/rfc1812.txt section 5.2.2 */ /* * 1. The packet length reported by the Link Layer must be large * enough to hold the minimum length legal IP datagram (20 bytes). */ - if (link_len < sizeof(struct ipv4_hdr)) + if (link_len < sizeof(struct rte_ipv4_hdr)) return -1; /* 2. The IP checksum must be correct. */ @@ -162,7 +163,7 @@ is_valid_ipv4_pkt(struct ipv4_hdr *pkt, uint32_t link_len) * datagram header, whose length is specified in the IP header length * field. */ - if (rte_cpu_to_be_16(pkt->total_length) < sizeof(struct ipv4_hdr)) + if (rte_cpu_to_be_16(pkt->total_length) < sizeof(struct rte_ipv4_hdr)) return -5; return 0;