summaryrefslogtreecommitdiffstats
path: root/lib/sockunion.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-05-22 12:40:59 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-05-26 17:33:30 +0200
commit95e0999cc57a72d9da8f79c2cb12968ea9042dfa (patch)
treeba530a012568e5e3d74e4c53b65fdf1261844ed3 /lib/sockunion.h
parentsockopt: add support for querying tcp round-trip-time (diff)
downloadfrr-95e0999cc57a72d9da8f79c2cb12968ea9042dfa.tar.xz
frr-95e0999cc57a72d9da8f79c2cb12968ea9042dfa.zip
sockunion: add accessors for sockunion address
Upcoming nhrp code will use this, and it can be used to remove the sockunion2ip(X) macro. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 483abc037b0ac4b3ed168c4810bb14ea338fa80c)
Diffstat (limited to 'lib/sockunion.h')
-rw-r--r--lib/sockunion.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sockunion.h b/lib/sockunion.h
index f041f95a1..c674cb8bb 100644
--- a/lib/sockunion.h
+++ b/lib/sockunion.h
@@ -74,6 +74,11 @@ extern int sockunion_cmp (union sockunion *, union sockunion *);
extern int sockunion_same (const union sockunion *, const union sockunion *);
extern unsigned int sockunion_hash (const union sockunion *);
+extern size_t family2addrsize(int family);
+extern size_t sockunion_get_addrlen(const union sockunion *);
+extern const u_char *sockunion_get_addr(const union sockunion *);
+extern void sockunion_set(union sockunion *, int family, const u_char *addr, size_t bytes);
+
extern union sockunion *sockunion_str2su (const char *str);
extern int sockunion_accept (int sock, union sockunion *);
extern int sockunion_stream_socket (union sockunion *);