summaryrefslogtreecommitdiffstats
path: root/include/utils.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-02-28 02:50:24 +0200
committerStephen Hemminger <shemming@brocade.com>2015-03-15 12:15:19 -0700
commitf3a2ddc124e09d3990b836e322ed39c76c35546e (patch)
tree8fd7213347b4263ecd94a1fc4d7111fae11e5f3d /include/utils.h
parent2e7e805d0aac4dd7a3d66951e28c0e3f457781ae (diff)
lib utils: Use helpers to get AF bit/byte len
Added funcs to get AF_XXX len in bit/bytes and replace places where switch(AF_XXX) is used for this. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Diffstat (limited to 'include/utils.h')
-rw-r--r--include/utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/utils.h b/include/utils.h
index fec9ef4f..9151c4f1 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -101,6 +101,9 @@ extern int get_s8(__s8 *val, const char *arg, int base);
extern char* hexstring_n2a(const __u8 *str, int len, char *buf, int blen);
extern __u8* hexstring_a2n(const char *str, __u8 *buf, int blen);
+extern int af_bit_len(int af);
+extern int af_byte_len(int af);
+
extern const char *format_host(int af, int len, const void *addr,
char *buf, int buflen);
extern const char *rt_addr_n2a(int af, const void *addr,