summaryrefslogtreecommitdiffstats
path: root/lib/sockunion.h
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-04-08 19:51:10 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-04-08 19:51:10 +0100
commit83447a051fbcc88b33fcea6670520687668d3ba1 (patch)
treef3be10368d9fc6c605c1ec351bc7c1f2c0c61ff0 /lib/sockunion.h
parent17b711e6e4a4d5ce3728a07890434d890ebb76b4 (diff)
downloadquagga-83447a051fbcc88b33fcea6670520687668d3ba1.tar.bz2
quagga-83447a051fbcc88b33fcea6670520687668d3ba1.tar.xz
New functions for error numbers and addresses in messages.
Implemented less onerous ways of including descriptions of errors and IP addresses in logging and other messages. Implemented mapping of error numbers to error names, which is generally more meaningful.
Diffstat (limited to 'lib/sockunion.h')
-rw-r--r--lib/sockunion.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sockunion.h b/lib/sockunion.h
index 3f71cb55..3823c522 100644
--- a/lib/sockunion.h
+++ b/lib/sockunion.h
@@ -70,6 +70,13 @@ CONFIRM(SU_ADDRSTRLEN >= INET_ADDRSTRLEN) ;
CONFIRM(SU_ADDRSTRLEN >= INET6_ADDRSTRLEN) ;
#endif
+/* Sockunion String Object */
+typedef struct sockunion_string sockunion_string_t ;
+struct sockunion_string
+{
+ char str[SU_ADDRSTRLEN] ;
+};
+
/* Macro to set link local index to the IPv6 address. For KAME IPv6
stack. */
#ifdef KAME
@@ -96,6 +103,7 @@ CONFIRM(SU_ADDRSTRLEN >= INET6_ADDRSTRLEN) ;
extern sockunion sockunion_init_new(sockunion su, sa_family_t family) ;
extern int str2sockunion (const char *, union sockunion *);
extern const char *sockunion2str (union sockunion *, char *, size_t);
+extern sockunion_string_t sutoa(sockunion su) ;
extern int sockunion_cmp (union sockunion *, union sockunion *);
extern int sockunion_same (union sockunion *, union sockunion *);