32 #define IF_LINE_LENGTH 1024 35 #include <sys/ioctl.h> 99 if (status != ISC_R_SUCCESS)
100 log_fatal (
"Can't register interface object type: %s",
101 isc_result_totext (status));
106 #if defined (TRACING) 126 return ISC_R_SUCCESS;
150 #if defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && defined(SIOCGLIFFLAGS) 155 #ifdef ISC_PLATFORM_HAVEIF_LADDRCONF 156 # define lifc_len iflc_len 157 # define lifc_buf iflc_buf 158 # define lifc_req iflc_req 159 # define LIFCONF if_laddrconf 161 # define ISC_HAVE_LIFC_FAMILY 1 162 # define ISC_HAVE_LIFC_FLAGS 1 163 # define LIFCONF lifconf 166 #ifdef ISC_PLATFORM_HAVEIF_LADDRREQ 167 # define lifr_addr iflr_addr 168 # define lifr_name iflr_name 169 # define lifr_dstaddr iflr_dstaddr 170 # define lifr_flags iflr_flags 171 # define sockaddr_storage sockaddr_ext 172 # define ss_family sa_family 173 # define LIFREQ if_laddrreq 175 # define LIFREQ lifreq 179 # if defined(LIFNAMSIZ) 180 # define IF_NAMESIZE LIFNAMSIZ 181 # elif defined(IFNAMSIZ) 182 # define IF_NAMESIZE IFNAMSIZ 184 # define IF_NAMESIZE 16 187 #elif !defined(__linux) && !defined(HAVE_IFADDRS_H) 188 # define SIOCGLIFCONF SIOCGIFCONF 189 # define SIOCGLIFFLAGS SIOCGIFFLAGS 190 # define LIFREQ ifreq 191 # define LIFCONF ifconf 192 # define lifr_name ifr_name 193 # define lifr_addr ifr_addr 194 # define lifr_flags ifr_flags 195 # define lifc_len ifc_len 196 # define lifc_buf ifc_buf 197 # define lifc_req ifc_req 199 # define ss_family __ss_family 203 #if defined(SIOCGLIFCONF) && defined(SIOCGLIFFLAGS) 228 char name[IF_NAMESIZE+1];
229 struct sockaddr_storage addr;
240 #ifdef ISC_PLATFORM_HAVELIFNUM 241 struct lifnum lifnum;
247 if (ifaces->
sock < 0) {
248 log_error(
"Error creating socket to list interfaces; %m");
252 memset(&lifnum, 0,
sizeof(lifnum));
253 #ifdef ISC_PLATFORM_HAVELIFNUM 254 lifnum.lifn_family = AF_UNSPEC;
257 if (ioctl(ifaces->
sock, SIOCGLIFNUM, &lifnum) < 0) {
258 log_error(
"Error finding total number of interfaces; %m");
264 #ifdef ISC_PLATFORM_HAVELIFNUM 265 ifaces->
num = lifnum.lifn_count;
267 ifaces->
num = lifnum;
273 memset(&ifaces->
conf, 0,
sizeof(ifaces->
conf));
274 #ifdef ISC_HAVE_LIFC_FAMILY 275 ifaces->
conf.lifc_family = AF_UNSPEC;
279 if (ifaces->
conf.lifc_buf == NULL) {
280 log_fatal(
"Out of memory getting interface list.");
284 log_error(
"Error getting interfaces configuration list; %m");
306 isc_boolean_t foundif;
307 #if defined(sun) || defined(__linux) 315 if (ifaces->
next >= ifaces->
num) {
320 p = ifaces->
conf.lifc_req;
323 if (strlen(p->lifr_name) >=
sizeof(info->
name)) {
325 log_error(
"Interface name '%s' too long", p->lifr_name);
335 strcpy(info->
name, p->lifr_name);
336 memset(&info->
addr, 0,
sizeof(info->
addr));
337 memcpy(&info->
addr, &p->lifr_addr,
sizeof(p->lifr_addr));
339 #if defined(sun) || defined(__linux) 341 s = strchr(info->
name,
':');
348 }
while ((foundif == ISC_FALSE) ||
349 (strncmp(info->
name,
"dummy", 5) == 0));
351 memset(&tmp, 0,
sizeof(tmp));
352 strcpy(tmp.lifr_name, info->
name);
354 log_error(
"Error getting interface flags for '%s'; %m",
359 info->
flags = tmp.lifr_flags;
394 struct ifaddrs *head;
395 struct ifaddrs *
next;
403 struct sockaddr_storage addr;
414 if (getifaddrs(&ifaces->head) != 0) {
415 log_error(
"Error getting interfaces; %m");
418 ifaces->
next = ifaces->head;
432 if (ifaces->
next == NULL) {
436 if (strlen(ifaces->
next->ifa_name) >=
sizeof(info->
name)) {
437 log_error(
"Interface name '%s' too long",
438 ifaces->
next->ifa_name);
442 strcpy(info->
name, ifaces->
next->ifa_name);
444 memset(&info->
addr, 0 ,
sizeof(info->
addr));
446 if (ifaces->
next->ifa_addr != NULL) {
448 sa_len = ifaces->
next->ifa_addr->sa_len;
450 if (ifaces->
next->ifa_addr->sa_family == AF_INET)
451 sa_len =
sizeof(
struct sockaddr_in);
452 else if (ifaces->
next->ifa_addr->sa_family == AF_INET6)
453 sa_len =
sizeof(
struct sockaddr_in6);
455 memcpy(&info->
addr, ifaces->
next->ifa_addr, sa_len);
458 ifaces->
next = ifaces->
next->ifa_next;
468 freeifaddrs(ifaces->head);
477 const struct in_addr *addr) {
485 log_fatal(
"Out of memory saving IPv4 address " 495 tmp =
dmalloc(new_max *
sizeof(
struct in_addr),
MDL);
497 log_fatal(
"Out of memory saving IPv4 address " 514 const struct in6_addr *addr) {
523 log_fatal(
"Out of memory saving IPv6 address " 529 struct in6_addr *tmp;
533 tmp =
dmalloc(new_max *
sizeof(
struct in6_addr),
MDL);
535 log_fatal(
"Out of memory saving IPv6 address " 564 char abuf[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
576 log_fatal(
"Can't get list of interfaces.");
594 for (tmp = interfaces; tmp; tmp = tmp->
next) {
604 !(info.
flags & IFF_BROADCAST)) ||
607 !(info.
flags & IFF_MULTICAST)) ||
609 info.
flags & IFF_LOOPBACK ||
610 info.
flags & IFF_POINTOPOINT) && !tmp) ||
611 (!(info.
flags & IFF_UP) &&
618 status = interface_allocate(&tmp,
MDL);
619 if (status != ISC_R_SUCCESS) {
620 log_fatal(
"Error allocating interface %s: %s",
621 info.
name, isc_result_totext(status));
625 interface_dereference(&tmp,
MDL);
630 (*dhcp_interface_discovery_hook)(tmp);
633 if ((info.
addr.ss_family == AF_INET) &&
635 struct sockaddr_in *a = (
struct sockaddr_in*)&info.
addr;
639 if (a->sin_addr.s_addr == htonl(INADDR_LOOPBACK) &&
647 if (a->sin_addr.s_addr != htonl(INADDR_ANY))
654 memcpy(addr.iabuf, &a->sin_addr.s_addr, addr.len);
656 (*dhcp_interface_setup_hook)(tmp, &addr);
660 else if ((info.
addr.ss_family == AF_INET6) &&
662 struct sockaddr_in6 *a =
663 (
struct sockaddr_in6*)&info.
addr;
667 if (IN6_IS_ADDR_LOOPBACK(&a->sin6_addr) &&
675 if (IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr))
678 add_ipv6_addr_to_interface(tmp, &a->sin6_addr);
682 memcpy(addr.iabuf, &a->sin6_addr, addr.len);
684 (*dhcp_interface_setup_hook)(tmp, &addr);
691 log_fatal(
"Error getting interface information.");
701 for (tmp = interfaces ; tmp != NULL ; tmp = tmp->
next) {
702 if (tmp->
ifp == NULL) {
705 tif = (
struct ifreq *)
dmalloc(
sizeof(
struct ifreq),
709 strcpy(tif->ifr_name, tmp->
name);
722 tmp = last = next = NULL;
724 interface_reference (&tmp, interfaces,
MDL);
727 interface_dereference (&next,
MDL);
729 interface_reference (&next, tmp -> next,
MDL);
732 interface_dereference(&tmp,
MDL);
734 interface_reference(&tmp, next,
MDL);
739 tmp -> flags &= ~(INTERFACE_AUTOMATIC |
747 if ((tmp -> flags & INTERFACE_REQUESTED) != ir)
748 log_fatal (
"%s: not found", tmp -> name);
751 interface_dereference (&interfaces,
754 interface_reference (&interfaces, next,
MDL);
756 interface_dereference (&last -> next,
MDL);
758 interface_reference (&last -> next,
762 interface_dereference (&tmp -> next,
MDL);
766 if (dummy_interfaces) {
767 interface_reference (&tmp -> next,
768 dummy_interfaces,
MDL);
769 interface_dereference (&dummy_interfaces,
MDL);
771 interface_reference (&dummy_interfaces, tmp,
MDL);
772 interface_dereference (&tmp,
MDL);
774 interface_reference (&tmp, next,
MDL);
783 log_info(
"No subnet declaration for %s (%s).",
786 "no IPv4 addresses" :
796 strcpy(abuf,
"no IPv6 addresses");
798 log_info(
"No subnet6 declaration for %s (%s).",
804 log_info (
"** Ignoring requests on %s. %s",
805 tmp -> name,
"If this is not what");
806 log_info (
" you want, please write %s",
809 "a subnet6 declaration" :
811 "a subnet declaration");
812 log_info (
" in your dhcpd.conf file %s",
813 "for the network segment");
816 tmp -> name,
"is attached. **");
823 "subnet6 declaration for this" :
825 "subnet declaration for this");
826 log_error (
"subnet. You cannot prevent %s",
828 log_error (
"from listening on this subnet %s",
830 log_fatal (
"operating system does not %s.",
831 "support this capability");
839 : (
struct subnet *)0);
840 subnet; subnet = subnet -> next_sibling) {
856 "address", tmp->
name);
897 #if defined (F_SETFD) 900 if ((tmp -> rfdesc >= 0) &&
901 (fcntl (tmp -> rfdesc, F_SETFD, 1) < 0))
902 log_error (
"Can't set close-on-exec on %s: %m",
904 if ((tmp -> wfdesc != tmp -> rfdesc) &&
905 (tmp -> wfdesc >= 0) &&
906 (fcntl (tmp -> wfdesc, F_SETFD, 1) < 0))
907 log_error (
"Can't set close-on-exec on %s: %m",
911 interface_dereference (&tmp,
MDL);
913 interface_reference (&tmp, next,
MDL);
922 for (tmp = interfaces; tmp; tmp = tmp ->
next) {
924 if (tmp -> flags & INTERFACE_RUNNING)
926 if (tmp -> rfdesc == -1)
944 if (status != ISC_R_SUCCESS)
945 log_fatal (
"Can't register I/O handle for %s: %s",
946 tmp -> name, isc_result_totext (status));
963 log_fatal (
"Not configured to listen on any interfaces!");
972 #if defined (F_SETFD) 973 if (fallback_interface) {
974 if (fcntl (fallback_interface -> rfdesc, F_SETFD, 1) < 0)
975 log_error (
"Can't set close-on-exec on fallback: %m");
976 if (fallback_interface -> rfdesc != fallback_interface -> wfdesc) {
977 if (fcntl (fallback_interface -> wfdesc, F_SETFD, 1) < 0)
978 log_error (
"Can't set close-on-exec on fallback: %m");
989 if (h -> type != dhcp_type_interface)
999 status = interface_allocate (&fallback_interface, file, line);
1000 if (status != ISC_R_SUCCESS)
1001 log_fatal (
"Error allocating fallback interface: %s",
1002 isc_result_totext (status));
1003 strcpy (fallback_interface ->
name,
"fallback");
1007 status = interface_reference (fp, fallback_interface, file, line);
1009 fallback_interface -> index = -1;
1011 return status == ISC_R_SUCCESS;
1018 for (ip = interfaces; ip; ip = ip ->
next) {
1023 if (fallback_interface)
1032 struct sockaddr_in from;
1037 unsigned char packbuf [4095];
1044 if (h -> type != dhcp_type_interface)
1052 return ISC_R_UNEXPECTED;
1055 return ISC_R_UNEXPECTED;
1067 return ISC_R_UNEXPECTED;
1069 #if defined(IP_PKTINFO) && defined(IP_RECVPKTINFO) && defined(USE_V4_PKTINFO) 1072 unsigned int ifindex;
1074 memcpy(&ifindex, hfrom.
hbuf, sizeof (ifindex));
1081 while ((ip != NULL) && (if_nametoindex(ip->
name) != ifindex))
1084 return ISC_R_NOTFOUND;
1090 memcpy (ifrom.
iabuf, &from.sin_addr, ifrom.
len);
1092 (*bootp_packet_handler) (ip, &u.packet, (unsigned)result,
1093 from.sin_port, ifrom, &hfrom);
1100 return ISC_R_SUCCESS;
1106 struct sockaddr_in6 from;
1113 unsigned int if_idx = 0;
1115 if (h->type != dhcp_type_interface) {
1121 &from, &to, &if_idx);
1124 return ISC_R_UNEXPECTED;
1129 return ISC_R_NOTFOUND;
1135 if (IN6_IS_ADDR_MULTICAST(&to)) {
1136 is_unicast = ISC_FALSE;
1138 is_unicast = ISC_TRUE;
1142 memcpy(ifrom.
iabuf, &from.sin6_addr, ifrom.
len);
1146 while ((ip != NULL) && (if_nametoindex(ip->
name) != if_idx))
1150 return ISC_R_NOTFOUND;
1152 (*dhcpv6_packet_handler)(ip, buf,
1153 result, from.sin6_port,
1154 &ifrom, is_unicast);
1157 return ISC_R_SUCCESS;
1167 isc_result_t status;
1169 if (h -> type != dhcp_type_interface)
1171 interface = (struct interface_info *)h;
1176 value -> u.
buffer.len <
sizeof interface -> name) {
1177 memcpy (interface -> name,
1180 interface -> name [value -> u.buffer.len] = 0;
1183 return ISC_R_SUCCESS;
1187 if (h -> inner && h -> inner -> type -> set_value) {
1188 status = ((*(h -> inner -> type -> set_value))
1189 (h -> inner, id, name, value));
1194 return ISC_R_NOTFOUND;
1203 return ISC_R_NOTIMPLEMENTED;
1211 if (h -> type != dhcp_type_interface)
1213 interface = (struct interface_info *)h;
1215 if (interface -> ifp) {
1216 dfree (interface -> ifp, file, line);
1217 interface -> ifp = 0;
1219 if (interface -> next)
1220 interface_dereference (&interface -> next, file, line);
1221 if (interface -> rbuf) {
1222 dfree (interface -> rbuf, file, line);
1223 interface -> rbuf = (
unsigned char *)0;
1225 if (interface -> client)
1232 return ISC_R_SUCCESS;
1236 const char *
name, va_list ap)
1239 isc_result_t status;
1241 if (h -> type != dhcp_type_interface)
1243 interface = (struct interface_info *)h;
1247 if (!strcmp (name,
"update")) {
1248 for (ip = dummy_interfaces; ip; ip = ip ->
next)
1249 if (ip == interface)
1254 for (ip = interfaces; ip; ip = ip ->
next)
1255 if (ip == interface)
1262 if (h -> inner && h -> inner -> type -> signal_handler) {
1263 status = ((*(h -> inner -> type -> signal_handler))
1264 (h -> inner, name, ap));
1265 if (status == ISC_R_SUCCESS)
1268 return ISC_R_NOTFOUND;
1276 isc_result_t status;
1278 if (h -> type != dhcp_type_interface)
1280 interface = (struct interface_info *)h;
1285 if (status != ISC_R_SUCCESS)
1291 if (status != ISC_R_SUCCESS)
1295 if (h -> inner && h -> inner -> type -> stuff_values) {
1296 status = ((*(h -> inner -> type -> stuff_values))
1297 (c, id, h -> inner));
1298 if (status == ISC_R_SUCCESS)
1302 return ISC_R_SUCCESS;
1310 isc_result_t status;
1318 if (status == ISC_R_SUCCESS) {
1322 if (status != ISC_R_SUCCESS)
1326 if ((*ip) -> type != dhcp_type_interface) {
1334 if (status == ISC_R_SUCCESS) {
1337 for (interface = interfaces; interface;
1338 interface = interface -> next) {
1339 s = memchr (interface -> name, 0, IFNAMSIZ);
1341 len = s - &
interface -> name [0];
1344 if ((tv -> value -> u.buffer.len == len &&
1345 !memcmp (interface -> name,
1346 (
char *)tv -> value -> u.buffer.
value,
1351 for (interface = dummy_interfaces;
1352 interface;
interface = interface -> next) {
1353 s = memchr (interface -> name, 0, IFNAMSIZ);
1355 len = s - &
interface -> name [0];
1358 if ((tv -> value -> u.buffer.len == len &&
1359 !memcmp (interface -> name,
1361 tv -> value -> u.buffer.
value,
1371 }
else if (!interface) {
1374 return ISC_R_NOTFOUND;
1385 return ISC_R_SUCCESS;
1393 isc_result_t status;
1396 status = interface_allocate (&hp,
MDL);
1397 if (status != ISC_R_SUCCESS)
1401 interface_dereference (&hp,
MDL);
1410 interface = (struct interface_info *)lp;
1414 for (ip = interfaces; ip; ip = ip ->
next) {
1415 if (ip == interface) {
1417 interface_dereference (&last -> next,
MDL);
1419 interface_reference (&last -> next,
1422 interface_dereference (&interfaces,
MDL);
1424 interface_reference (&interfaces,
1428 interface_dereference (&ip -> next,
MDL);
1434 return ISC_R_NOTFOUND;
1437 if (dummy_interfaces) {
1438 interface_reference (&interface -> next,
1439 dummy_interfaces,
MDL);
1440 interface_dereference (&dummy_interfaces,
MDL);
1442 interface_reference (&dummy_interfaces, interface,
MDL);
1446 (*dhcp_interface_shutdown_hook) (interface);
1464 return ISC_R_SUCCESS;
1473 if (tptr ->
index == -1) {
1476 interface_vector [tptr ->
index])
1480 if (interface_max <= tptr ->
index) {
1482 vec =
dmalloc ((interface_max + delta) *
1486 memset (&vec [interface_max], 0,
1488 interface_max += delta;
1489 if (interface_vector) {
1490 memcpy (vec, interface_vector,
1495 interface_vector = vec;
1497 interface_reference (&interface_vector [tptr -> index], tptr,
MDL);
1500 #if defined (TRACING) 1513 interface_reference (&tmp -> next,
1515 interface_dereference (&interfaces,
MDL);
1517 interface_reference (&interfaces, tmp,
MDL);
void if_register_send(struct interface_info *)
#define DHCP_FIXED_NON_UDP
void(* dhcpv6_packet_handler)(struct interface_info *, const char *, int, int, const struct iaddr *, isc_boolean_t)
isc_result_t omapi_register_io_object(omapi_object_t *, int(*)(omapi_object_t *), int(*)(omapi_object_t *), isc_result_t(*)(omapi_object_t *), isc_result_t(*)(omapi_object_t *), isc_result_t(*)(omapi_object_t *))
void end_iface_scan(struct iface_conf_list *ifaces)
isc_result_t omapi_object_reference(omapi_object_t **, omapi_object_t *, const char *, int)
struct shared_network * shared_network
trace_type_t * trace_type_register(const char *, void *, void(*)(trace_type_t *, unsigned, char *), void(*)(trace_type_t *), const char *, int)
isc_result_t dhcp_interface_destroy(omapi_object_t *h, const char *file, int line)
int if_readsocket(omapi_object_t *h)
void if_reinitialize_send(struct interface_info *)
void(* bootp_packet_handler)(struct interface_info *, struct dhcp_packet *, unsigned, unsigned int, struct iaddr, struct hardware *)
void * dmalloc(unsigned, const char *, int)
void trace_interface_register(trace_type_t *, struct interface_info *)
trace_type_t * interface_trace
isc_result_t dhcp_interface_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *h)
#define DHCP_R_INVALIDARG
omapi_typed_data_t * value
#define DISCOVER_REQUESTED
void reinitialize_interfaces()
void trace_outpacket_input(trace_type_t *, unsigned, char *)
isc_result_t dhcp_interface_remove(omapi_object_t *lp, omapi_object_t *id)
struct in_addr * addresses
int setup_fallback(struct interface_info **fp, const char *file, int line)
#define INTERFACE_RUNNING
int log_error(const char *,...) __attribute__((__format__(__printf__
void add_ipv4_addr_to_interface(struct interface_info *iface, const struct in_addr *addr)
#define OMAPI_OBJECT_ALLOC(name, stype, type)
void if_deregister_receive(struct interface_info *)
#define DHCP_R_KEYCONFLICT
void get_hw_addr(struct interface_info *info)
void maybe_setup_fallback(void)
void if_deregister_send(struct interface_info *)
void log_fatal(const char *,...) __attribute__((__format__(__printf__
isc_result_t dhcp_interface_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)
#define INTERFACE_AUTOMATIC
void interface_trace_setup(void)
struct omapi_typed_data_t::@3::@4 buffer
void if_deregister6(struct interface_info *info)
struct interface_info * fallback_interface
void trace_outpacket_stop(trace_type_t *)
void trace_inpacket_stop(trace_type_t *)
void if_register_linklocal6(struct interface_info *info)
isc_result_t omapi_get_value_str(omapi_object_t *, omapi_object_t *, const char *, omapi_value_t **)
struct iaddr interface_address
isc_result_t dhcp_interface_create(omapi_object_t **lp, omapi_object_t *id)
void trace_inpacket_input(trace_type_t *, unsigned, char *)
trace_type_t * inpacket_trace
isc_result_t omapi_object_dereference(omapi_object_t **, const char *, int)
isc_result_t got_one_v6(omapi_object_t *)
void dfree(void *, const char *, int)
omapi_object_type_t * dhcp_type_interface
isc_result_t omapi_handle_td_lookup(omapi_object_t **, omapi_typed_data_t *)
int begin_iface_scan(struct iface_conf_list *ifaces)
struct in_addr limited_broadcast
int int log_info(const char *,...) __attribute__((__format__(__printf__
isc_result_t dhcp_interface_set_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_typed_data_t *value)
struct interface_info * interfaces
isc_result_t omapi_connection_put_string(omapi_object_t *, const char *)
int interfaces_invalidated
void interface_snorf(struct interface_info *tmp, int ir)
int(* dhcp_interface_setup_hook)(struct interface_info *, struct iaddr *)
isc_result_t omapi_value_dereference(omapi_value_t **, const char *, int)
void if_register6(struct interface_info *info, int do_multicast)
int quiet_interface_discovery
isc_result_t(* dhcp_interface_startup_hook)(struct interface_info *)
#define DISCOVER_UNCONFIGURED
struct sockaddr_storage addr
isc_result_t dhcp_interface_signal_handler(omapi_object_t *h, const char *name, va_list ap)
struct interface_info * next
isc_result_t omapi_object_type_register(omapi_object_type_t **, const char *, isc_result_t(*)(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_typed_data_t *), isc_result_t(*)(omapi_object_t *, omapi_object_t *, omapi_data_string_t *, omapi_value_t **), isc_result_t(*)(omapi_object_t *, const char *, int), isc_result_t(*)(omapi_object_t *, const char *, va_list), isc_result_t(*)(omapi_object_t *, omapi_object_t *, omapi_object_t *), isc_result_t(*)(omapi_object_t **, omapi_object_t *, omapi_object_t *), isc_result_t(*)(omapi_object_t **, omapi_object_t *), isc_result_t(*)(omapi_object_t *, omapi_object_t *), isc_result_t(*)(omapi_object_t *, const char *, int), isc_result_t(*)(omapi_object_t **, const char *, int), isc_result_t(*)(size_t), size_t, isc_result_t(*)(omapi_object_t *, const char *, int), int)
struct interface_info * dummy_interfaces
int omapi_ds_strcmp(omapi_data_string_t *, const char *)
isc_result_t got_one(omapi_object_t *h)
isc_result_t omapi_unregister_io_object(omapi_object_t *)
isc_result_t interface_initialize(omapi_object_t *ipo, const char *file, int line)
#define DISCOVER_SERVER46
int supports_multiple_interfaces(struct interface_info *)
isc_result_t interface_setup()
u_int8_t hbuf[HARDWARE_ADDR_LEN+1]
struct in_addr local_address
int(* dhcp_interface_discovery_hook)(struct interface_info *)
ssize_t receive_packet(struct interface_info *, unsigned char *, size_t, struct sockaddr_in *, struct hardware *)
void trace_interface_input(trace_type_t *, unsigned, char *)
isc_result_t omapi_connection_put_name(omapi_object_t *, const char *)
void if_reinitialize_receive(struct interface_info *)
void if_register_receive(struct interface_info *)
struct interface_info ** interface_vector
void interface_stash(struct interface_info *tptr)
trace_type_t * outpacket_trace
void trace_interface_stop(trace_type_t *)
int(* dhcp_interface_shutdown_hook)(struct interface_info *)
void discover_interfaces(int state)
int next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces)
isc_result_t dhcp_interface_lookup(omapi_object_t **ip, omapi_object_t *id, omapi_object_t *ref)
#define INTERFACE_REQUESTED
ssize_t receive_packet6(struct interface_info *interface, unsigned char *buf, size_t len, struct sockaddr_in6 *from, struct in6_addr *to_addr, unsigned int *if_index)
struct in6_addr * v6addresses