summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_types.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-10-25 09:47:09 +0000
committerNeale Ranns <neale@graphiant.com>2021-11-18 14:06:02 +0000
commitb28652ed7ab016177593b059390f2e99e6af2961 (patch)
tree99f1bc49227d37e467cb74216de8e9324436b416 /src/vnet/ip/ip_types.h
parentfc8d0c510372823ac029b6330e876fab9400dbae (diff)
ip: comparing IP prefixes should not modify them
Type: improvement make the ip_prefix_cmp take const paramenters. plus some other miscellaneous functions. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ib69bacfb09483a8a8f8b89900c92d3d55c354ac6
Diffstat (limited to 'src/vnet/ip/ip_types.h')
-rw-r--r--src/vnet/ip/ip_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_types.h b/src/vnet/ip/ip_types.h
index 83a0f6adc72..e4d89ebd88d 100644
--- a/src/vnet/ip/ip_types.h
+++ b/src/vnet/ip/ip_types.h
@@ -126,11 +126,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);