net: add rte prefix to IP structure
[dpdk.git] / examples / ipv4_multicast / main.c
index a047197..a84d28c 100644 (file)
@@ -278,9 +278,9 @@ mcast_send_pkt(struct rte_mbuf *pkt, struct rte_ether_addr *dest_addr,
                rte_pktmbuf_prepend(pkt, (uint16_t)sizeof(*ethdr));
        RTE_ASSERT(ethdr != NULL);
 
-       ether_addr_copy(dest_addr, &ethdr->d_addr);
-       ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
-       ethdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4);
+       rte_ether_addr_copy(dest_addr, &ethdr->d_addr);
+       rte_ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
+       ethdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv4);
 
        /* Put new packet into the output queue */
        len = qconf->tx_mbufs[port].len;
@@ -297,7 +297,7 @@ static inline void
 mcast_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf)
 {
        struct rte_mbuf *mc;
-       struct ipv4_hdr *iphdr;
+       struct rte_ipv4_hdr *iphdr;
        uint32_t dest_addr, port_mask, port_num, use_clone;
        int32_t hash;
        uint16_t port;
@@ -307,7 +307,7 @@ mcast_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf)
        } dst_eth_addr;
 
        /* Remove the Ethernet header from the input packet */
-       iphdr = (struct ipv4_hdr *)
+       iphdr = (struct rte_ipv4_hdr *)
                rte_pktmbuf_adj(m, (uint16_t)sizeof(struct rte_ether_hdr));
        RTE_ASSERT(iphdr != NULL);
 
@@ -539,8 +539,8 @@ parse_args(int argc, char **argv)
 static void
 print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 {
-       char buf[ETHER_ADDR_FMT_SIZE];
-       ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+       char buf[RTE_ETHER_ADDR_FMT_SIZE];
+       rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
        printf("%s%s", name, buf);
 }