IP4 Router Alert option handling for IGMP
[vpp.git] / src / vnet / ip / ip4_packet.h
index b2c1fcd..c41a802 100644 (file)
@@ -52,6 +52,7 @@ typedef union
   u32 data_u32;
   /* Aliases. */
   u8 as_u8[4];
+  u16 as_u16[2];
   u32 as_u32;
 } ip4_address_t;
 
@@ -76,6 +77,11 @@ typedef struct
   ip4_address_t src, dst;
 } ip4_address_pair_t;
 
+typedef struct
+{
+  ip4_address_t addr, mask;
+} ip4_address_and_mask_t;
+
 /* If address is a valid netmask, return length of mask. */
 always_inline uword
 ip4_address_netmask_length (ip4_address_t * a)
@@ -187,6 +193,8 @@ typedef union
 #define IP4_VERSION_AND_HEADER_LENGTH_NO_OPTIONS \
   ((4 << 4) | (sizeof (ip4_header_t) / sizeof (u32)))
 
+#define IP4_ROUTER_ALERT_OPTION 20
+
 always_inline int
 ip4_get_fragment_offset (ip4_header_t * i)
 {