net: add rte prefix to IP structure
[dpdk.git] / doc / guides / sample_app_ug / ipv4_multicast.rst
index 1fe6bf1..46c9204 100644 (file)
@@ -146,7 +146,7 @@ Firstly, the Ethernet* header is removed from the packet and the IPv4 address is
 
     /* Remove the Ethernet header from the input packet */
 
-    iphdr = (struct ipv4_hdr *)rte_pktmbuf_adj(m, sizeof(struct rte_ether_hdr));
+    iphdr = (struct rte_ipv4_hdr *)rte_pktmbuf_adj(m, sizeof(struct rte_ether_hdr));
     RTE_ASSERT(iphdr != NULL);
     dest_addr = rte_be_to_cpu_32(iphdr->dst_addr);
 
@@ -227,9 +227,9 @@ The actual packet transmission is done in the mcast_send_pkt() function:
 
         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 */