]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_net/rte_arp.h
net: add a helper for making RARP packet
[dpdk.git] / lib / librte_net / rte_arp.h
index 183641874bc77bb224d8f91d190bff704268668d..dad7423ad335a7d3779654e96cad938660295924 100644 (file)
@@ -76,6 +76,23 @@ struct arp_hdr {
        struct arp_ipv4 arp_data;
 } __attribute__((__packed__));
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Make a RARP packet based on MAC addr.
+ *
+ * @param mbuf
+ *   Pointer to the rte_mbuf structure
+ * @param mac
+ *   Pointer to the MAC addr
+ *
+ * @return
+ *   - 0 on success, negative on error
+ */
+int
+rte_net_make_rarp_packet(struct rte_mbuf *mbuf, const struct ether_addr *mac);
+
 #ifdef __cplusplus
 }
 #endif