diff options
Diffstat (limited to 'src/vnet/ip/ip_types.h')
-rw-r--r-- | src/vnet/ip/ip_types.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vnet/ip/ip_types.h b/src/vnet/ip/ip_types.h index 83a0f6adc72..f1b387df194 100644 --- a/src/vnet/ip/ip_types.h +++ b/src/vnet/ip/ip_types.h @@ -75,13 +75,11 @@ typedef enum ip_feature_location_t_ #define N_IP_FEATURE_LOCATIONS (IP_FEATURE_DROP+1) -/* *INDENT-OFF* */ typedef struct ip_address { ip46_address_t ip; ip_address_family_t version; } __clib_packed ip_address_t; -/* *INDENT-ON* */ #define IP_ADDRESS_V4_ALL_0S {.ip.ip4.as_u32 = 0, .version = AF_IP4} #define IP_ADDRESS_V6_ALL_0S {.ip.ip6.as_u64 = {0, 0}, .version = AF_IP6} @@ -112,13 +110,11 @@ extern void ip_address_from_46 (const ip46_address_t * a, extern void ip_address_increment (ip_address_t * ip); extern void ip_address_reset (ip_address_t * ip); -/* *INDENT-OFF* */ typedef struct ip_prefix { ip_address_t addr; u8 len; } __clib_packed ip_prefix_t; -/* *INDENT-ON* */ #define ip_prefix_addr(_a) (_a)->addr #define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a)) @@ -126,11 +122,13 @@ typedef struct ip_prefix #define ip_prefix_v4(_a) ip_addr_v4(&ip_prefix_addr(_a)) #define ip_prefix_v6(_a) ip_addr_v6(&ip_prefix_addr(_a)) -extern int ip_prefix_cmp (ip_prefix_t * p1, ip_prefix_t * p2); +extern int ip_prefix_cmp (const ip_prefix_t *p1, const ip_prefix_t *p2); extern void ip_prefix_normalize (ip_prefix_t * a); extern void ip_address_to_fib_prefix (const ip_address_t * addr, fib_prefix_t * prefix); +extern void ip_address_to_prefix (const ip_address_t *addr, + ip_prefix_t *prefix); extern void ip_prefix_to_fib_prefix (const ip_prefix_t * ipp, fib_prefix_t * fibp); extern u8 *format_ip_prefix (u8 * s, va_list * args); |