Define IPv4 Minimum IHL and VHL according to rfc791 (see [1])
"The Version field indicates the format of the
internet header."
"Internet Header Length (ihl) is the length of the
internet header in 32 bit words, and thus points
to the beginning of the data. Note that
the minimum value for a correct header is 5."
[1] https://tools.ietf.org/html/rfc791
Signed-off-by: Saleh Alsouqi <salehals@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
*/
#include <stdint.h>
+#include <sys/types.h>
#include <netinet/in.h>
+#include <netinet/ip.h>
#include <rte_byteorder.h>
#include <rte_mbuf.h>
((x) >= RTE_IPV4_MIN_MCAST && (x) <= RTE_IPV4_MAX_MCAST)
/**< check if IPv4 address is multicast */
+/* IPv4 default fields values */
+#define RTE_IPV4_MIN_IHL (0x5)
+#define RTE_IPV4_VHL_DEF (IPVERSION | RTE_IPV4_MIN_IHL)
+
/**
* @internal Calculate a sum of all words in the buffer.
* Helper routine for the rte_raw_cksum().