X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_net%2Frte_icmp.h;h=4429e8e29f691c0d1073ba196357317e5a03d7b7;hb=3127f99274b679124658afdbfc49210730c50617;hp=053b5f6a42802f3b27ba333857d65ea7f57b85cf;hpb=fa620b86e3fae5e0539d68beaa588cedf51b9d9e;p=dpdk.git diff --git a/lib/librte_net/rte_icmp.h b/lib/librte_net/rte_icmp.h index 053b5f6a42..4429e8e29f 100644 --- a/lib/librte_net/rte_icmp.h +++ b/lib/librte_net/rte_icmp.h @@ -16,6 +16,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -23,17 +25,17 @@ extern "C" { /** * ICMP Header */ -struct icmp_hdr { - uint8_t icmp_type; /* ICMP packet type. */ - uint8_t icmp_code; /* ICMP packet code. */ - uint16_t icmp_cksum; /* ICMP packet checksum. */ - uint16_t icmp_ident; /* ICMP packet identifier. */ - uint16_t icmp_seq_nb; /* ICMP packet sequence number. */ -} __attribute__((__packed__)); +struct rte_icmp_hdr { + uint8_t icmp_type; /* ICMP packet type. */ + uint8_t icmp_code; /* ICMP packet code. */ + rte_be16_t icmp_cksum; /* ICMP packet checksum. */ + rte_be16_t icmp_ident; /* ICMP packet identifier. */ + rte_be16_t icmp_seq_nb; /* ICMP packet sequence number. */ +} __rte_packed; /* ICMP packet types */ -#define IP_ICMP_ECHO_REPLY 0 -#define IP_ICMP_ECHO_REQUEST 8 +#define RTE_IP_ICMP_ECHO_REPLY 0 +#define RTE_IP_ICMP_ECHO_REQUEST 8 #ifdef __cplusplus }