diff --git a/lib/isc/unix/include/isc/Makefile.in b/lib/isc/unix/include/isc/Makefile.in index b05e25256a..be14f79fc7 100644 --- a/lib/isc/unix/include/isc/Makefile.in +++ b/lib/isc/unix/include/isc/Makefile.in @@ -19,7 +19,7 @@ top_srcdir = @top_srcdir@ @BIND9_VERSION@ -HEADERS = app.h sockaddr.h time.h stdtime.h +HEADERS = app.h net.h time.h stdtime.h SUBDIRS = TARGETS = diff --git a/lib/isc/unix/include/isc/sockaddr.h b/lib/isc/unix/include/isc/net.h similarity index 56% rename from lib/isc/unix/include/isc/sockaddr.h rename to lib/isc/unix/include/isc/net.h index 13fdc9238a..ba2ecb4aa0 100644 --- a/lib/isc/unix/include/isc/sockaddr.h +++ b/lib/isc/unix/include/isc/net.h @@ -15,30 +15,53 @@ * SOFTWARE. */ -#ifndef ISC_SOCKADDR_H -#define ISC_SOCKADDR_H 1 +#ifndef ISC_NET_H +#define ISC_NET_H 1 + +/***** + ***** Module Info + *****/ + +/* + * Basic Networking Types + * + * This module is responsible for defining the following basic networking + * types: + * + * struct in_addr + * struct in6_addr + * struct sockaddr + * struct sockaddr_in + * struct sockaddr_in6 + * + * It ensures that the AF_ and PF_ macros are defined. + * + * It declares ntoh[sl]() and hton[sl](). + * + * MP: + * No impact. + * + * Reliability: + * No anticipated impact. + * + * Resources: + * N/A. + * + * Security: + * No anticipated impact. + * + * Standards: + * BSD Socket API + */ + + +/*** + *** Imports. + ***/ + +#include +#include #include -#include - -ISC_LANG_BEGINDECLS - -typedef struct isc_sockaddr { - /* - * XXX Must be big enough for all sockaddr types we care about. - */ - union { - struct sockaddr_in sin; -#ifdef notyet - struct sockaddr_in6 sin6; -#endif - } type; -} isc_sockaddr_t; - -isc_boolean_t -isc_sockaddr_equal(isc_sockaddr_t *, isc_sockaddr_t *); - -ISC_LANG_ENDDECLS - -#endif /* ISC_SOCKADDR_H */ +#endif /* ISC_NET_H */ diff --git a/lib/isc/unix/include/isc/netaddr.h b/lib/isc/unix/include/isc/net.h.in similarity index 56% rename from lib/isc/unix/include/isc/netaddr.h rename to lib/isc/unix/include/isc/net.h.in index cde0b63027..ba2ecb4aa0 100644 --- a/lib/isc/unix/include/isc/netaddr.h +++ b/lib/isc/unix/include/isc/net.h.in @@ -15,24 +15,53 @@ * SOFTWARE. */ -#ifndef ISC_NETADDR_H -#define ISC_NETADDR_H 1 +#ifndef ISC_NET_H +#define ISC_NET_H 1 + +/***** + ***** Module Info + *****/ + +/* + * Basic Networking Types + * + * This module is responsible for defining the following basic networking + * types: + * + * struct in_addr + * struct in6_addr + * struct sockaddr + * struct sockaddr_in + * struct sockaddr_in6 + * + * It ensures that the AF_ and PF_ macros are defined. + * + * It declares ntoh[sl]() and hton[sl](). + * + * MP: + * No impact. + * + * Reliability: + * No anticipated impact. + * + * Resources: + * N/A. + * + * Security: + * No anticipated impact. + * + * Standards: + * BSD Socket API + */ + + +/*** + *** Imports. + ***/ + +#include +#include #include -#include - -ISC_LANG_BEGINDECLS - -typedef struct isc_netaddr { - union { - struct in_addr in; -#ifdef notyet - struct in6_addr in6; -#endif - } type; -} isc_netaddr_t; - -ISC_LANG_ENDDECLS - -#endif /* ISC_NETADDR_H */ +#endif /* ISC_NET_H */