X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_net%2Frte_arp.h;h=183641874bc77bb224d8f91d190bff704268668d;hb=ecaed092b677;hp=c7b0e5141622401c825343f342da2729e61a31ba;hpb=168dfa61667e0a46bdbbed2b30a3117f91b62537;p=dpdk.git diff --git a/lib/librte_net/rte_arp.h b/lib/librte_net/rte_arp.h index c7b0e51416..183641874b 100644 --- a/lib/librte_net/rte_arp.h +++ b/lib/librte_net/rte_arp.h @@ -39,6 +39,7 @@ */ #include +#include #ifdef __cplusplus extern "C" { @@ -48,10 +49,10 @@ extern "C" { * ARP header IPv4 payload. */ struct arp_ipv4 { - uint8_t arp_sha[6]; /* sender hardware address */ - uint8_t arp_sip[4]; /* sender IP address */ - uint8_t arp_tha[6]; /* target hardware address */ - uint8_t arp_tip[4]; /* target IP address */ + struct ether_addr arp_sha; /**< sender hardware address */ + uint32_t arp_sip; /**< sender IP address */ + struct ether_addr arp_tha; /**< target hardware address */ + uint32_t arp_tip; /**< target IP address */ } __attribute__((__packed__)); /** @@ -72,9 +73,7 @@ struct arp_hdr { #define ARP_OP_INVREQUEST 8 /* request to identify peer */ #define ARP_OP_INVREPLY 9 /* response identifying peer */ - union { - struct arp_ipv4 arp_ip; - } arp_data; + struct arp_ipv4 arp_data; } __attribute__((__packed__)); #ifdef __cplusplus