From 6c7bfa7c59399b1d16e0918adbe6bd12abd36b2e Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Fri, 26 May 2000 16:39:28 +0000 Subject: [PATCH] added ISC_NETADDR_FORMATSIZE as a counterpart to ISC_SOCKADDR_FORMATSIZE and commented them both --- lib/isc/include/isc/netaddr.h | 6 ++++++ lib/isc/include/isc/sockaddr.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/lib/isc/include/isc/netaddr.h b/lib/isc/include/isc/netaddr.h index b252432482..f6e569e34b 100644 --- a/lib/isc/include/isc/netaddr.h +++ b/lib/isc/include/isc/netaddr.h @@ -77,6 +77,12 @@ isc_netaddr_format(isc_netaddr_t *na, char *array, unsigned int size); * The resulting string is guaranteed to be null-terminated. */ +#define ISC_NETADDR_FORMATSIZE \ + sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX") +/* + * Minimum size of array to pass to isc_netaddr_format(). + */ + void isc_netaddr_fromsockaddr(isc_netaddr_t *netaddr, const isc_sockaddr_t *source); diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h index cf4476984c..781259ae3b 100644 --- a/lib/isc/include/isc/sockaddr.h +++ b/lib/isc/include/isc/sockaddr.h @@ -121,6 +121,9 @@ isc_sockaddr_format(isc_sockaddr_t *sa, char *array, unsigned int size); #define ISC_SOCKADDR_FORMATSIZE \ sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX#YYYYY") +/* + * Minimum size of array to pass to isc_sockaddr_format(). + */ ISC_LANG_ENDDECLS