isc_netaddr_t now has a "family" field

This commit is contained in:
Andreas Gustafsson 1999-10-28 23:09:01 +00:00
parent 0dc4e6a6ae
commit cdd5e37820
2 changed files with 3 additions and 1 deletions

View file

@ -24,6 +24,7 @@
ISC_LANG_BEGINDECLS
typedef struct isc_netaddr {
unsigned int family;
union {
struct in_addr in;
struct in6_addr in6;

View file

@ -51,7 +51,8 @@
*/
static void
get_addr(int family, isc_netaddr_t *dst, struct sockaddr *src) {
get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) {
dst->family = family;
switch (family) {
case AF_INET:
memcpy(&dst->type.in,