X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fsample_app_ug%2Fipv4_multicast.rst;h=8923a7f548790b09c647ad0485e03655f5455e01;hb=1f295c40da3de1722ed6f6f0bc0853966b6ff4ae;hp=f6efa7f6f468292a477f3c279d413caf2585d2de;hpb=91dc9c13ba978fb8147240ed6fa20c41145bf0db;p=dpdk.git diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst index f6efa7f6f4..8923a7f548 100644 --- a/doc/guides/sample_app_ug/ipv4_multicast.rst +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst @@ -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 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); @@ -155,7 +155,7 @@ if the routing table has any ports assigned to the destination address: .. code-block:: c - if (!IS_IPV4_MCAST(dest_addr) || + if (!RTE_IS_IPV4_MCAST(dest_addr) || (hash = rte_fbk_hash_lookup(mcast_hash, dest_addr)) <= 0 || (port_mask = hash & enabled_port_mask) == 0) { rte_pktmbuf_free(m); @@ -216,20 +216,20 @@ The actual packet transmission is done in the mcast_send_pkt() function: .. code-block:: c - static inline void mcast_send_pkt(struct rte_mbuf *pkt, struct ether_addr *dest_addr, struct lcore_queue_conf *qconf, uint16_t port) + static inline void mcast_send_pkt(struct rte_mbuf *pkt, struct rte_ether_addr *dest_addr, struct lcore_queue_conf *qconf, uint16_t port) { - struct ether_hdr *ethdr; + struct rte_ether_hdr *ethdr; uint16_t len; /* Construct Ethernet header. */ - ethdr = (struct ether_hdr *)rte_pktmbuf_prepend(pkt, (uint16_t) sizeof(*ethdr)); + ethdr = (struct rte_ether_hdr *)rte_pktmbuf_prepend(pkt, (uint16_t) sizeof(*ethdr)); RTE_ASSERT(ethdr != NULL); - ether_addr_copy(dest_addr, ðdr->d_addr); - ether_addr_copy(&ports_eth_addr[port], ðdr->s_addr); - ethdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4); + rte_ether_addr_copy(dest_addr, ðdr->d_addr); + rte_ether_addr_copy(&ports_eth_addr[port], ðdr->s_addr); + ethdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4); /* Put new packet into the output queue */