X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip4_packet.h;h=362805c8529a7000d72600341953c3dd3e90e538;hb=59f71132e;hp=79cf22c4d704630965f67c037416464ea264c3dd;hpb=9534696b4637185c9f296375e63c50d8976d153d;p=vpp.git diff --git a/src/vnet/ip/ip4_packet.h b/src/vnet/ip/ip4_packet.h index 79cf22c4d70..362805c8529 100644 --- a/src/vnet/ip/ip4_packet.h +++ b/src/vnet/ip/ip4_packet.h @@ -196,13 +196,13 @@ typedef union #define IP4_ROUTER_ALERT_OPTION 20 -always_inline int +always_inline u16 ip4_get_fragment_offset (const ip4_header_t * i) { return clib_net_to_host_u16 (i->flags_and_fragment_offset) & 0x1fff; } -always_inline int +always_inline u16 ip4_get_fragment_more (const ip4_header_t * i) { return clib_net_to_host_u16 (i->flags_and_fragment_offset) & @@ -322,7 +322,7 @@ ip4_header_clear_df (ip4_header_t * ip4) } always_inline u8 -ip4_header_get_df (ip4_header_t * ip4) +ip4_header_get_df (const ip4_header_t * ip4) { return (! !(ip4->flags_and_fragment_offset & clib_host_to_net_u16 (IP4_HEADER_FLAG_DONT_FRAGMENT))); @@ -384,6 +384,12 @@ ip4_address_is_multicast (const ip4_address_t * a) return (a->data[0] & 0xf0) == 0xe0; } +always_inline uword +ip4_address_is_global_broadcast (const ip4_address_t * a) +{ + return (a->as_u32) == 0xffffffff; +} + always_inline void ip4_multicast_address_set_for_group (ip4_address_t * a, ip_multicast_group_t g)