interfaceiter.c revision 89251e453b25d99c0a5f26b570fab0c1e7f24698
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfaceiter.c,v 1.26 2002/07/01 23:00:38 marka Exp $ */
#include <config.h>
#ifdef HAVE_SYS_SOCKIO_H
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <isc/interfaceiter.h>
#include <isc/strerror.h>
#ifdef HAVE_NET_IF6_H
#endif
/* Common utility functions */
/*
* Extract the network address part from a "struct sockaddr".
*
* The address family is given explicity
* instead of using src->sa_family, because the latter does not work
* for copying a network mask obtained by SIOCGIFNETMASK (it does
* not have a valid address family).
*/
static void
switch (family) {
case AF_INET:
sizeof(struct in_addr));
break;
case AF_INET6:
sizeof(struct in6_addr));
break;
default:
INSIST(0);
break;
}
}
/*
* Include system-dependent code.
*/
#include "ifiter_sysctl.c"
#else
#include "ifiter_ioctl.c"
#endif
/*
* The remaining code is common to the sysctl and ioctl case.
*/
{
return (ISC_R_SUCCESS);
}
for (;;) {
if (result != ISC_R_IGNORE)
break;
if (result != ISC_R_SUCCESS)
break;
}
return (result);
}
for (;;) {
if (result != ISC_R_SUCCESS)
break;
if (result != ISC_R_IGNORE)
break;
}
return (result);
}
void
{
}