1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2013 6WIND S.A.
15 #include <rte_ether.h>
22 * ARP header IPv4 payload.
25 struct rte_ether_addr arp_sha; /**< sender hardware address */
26 uint32_t arp_sip; /**< sender IP address */
27 struct rte_ether_addr arp_tha; /**< target hardware address */
28 uint32_t arp_tip; /**< target IP address */
29 } __attribute__((__packed__));
35 uint16_t arp_hardware; /* format of hardware address */
36 #define RTE_ARP_HRD_ETHER 1 /* ARP Ethernet address format */
38 uint16_t arp_protocol; /* format of protocol address */
39 uint8_t arp_hlen; /* length of hardware address */
40 uint8_t arp_plen; /* length of protocol address */
41 uint16_t arp_opcode; /* ARP opcode (command) */
42 #define RTE_ARP_OP_REQUEST 1 /* request to resolve address */
43 #define RTE_ARP_OP_REPLY 2 /* response to previous request */
44 #define RTE_ARP_OP_REVREQUEST 3 /* request proto addr given hardware */
45 #define RTE_ARP_OP_REVREPLY 4 /* response giving protocol address */
46 #define RTE_ARP_OP_INVREQUEST 8 /* request to identify peer */
47 #define RTE_ARP_OP_INVREPLY 9 /* response identifying peer */
49 struct rte_arp_ipv4 arp_data;
50 } __attribute__((__packed__));
54 * @b EXPERIMENTAL: this API may change without prior notice
56 * Make a RARP packet based on MAC addr.
59 * Pointer to the rte_mempool
61 * Pointer to the MAC addr
64 * - RARP packet pointer on success, or NULL on error
66 struct rte_mbuf * __rte_experimental
67 rte_net_make_rarp_packet(struct rte_mempool *mpool,
68 const struct rte_ether_addr *mac);
74 #endif /* _RTE_ARP_H_ */