33 #include <sys/ioctl.h> 96 if (status != ISC_R_SUCCESS)
97 log_fatal (
"Can't register interface object type: %s",
98 isc_result_totext (status));
103 #if defined (TRACING) 123 return ISC_R_SUCCESS;
147 #if defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && defined(SIOCGLIFFLAGS) 152 #ifdef ISC_PLATFORM_HAVEIF_LADDRCONF 153 # define lifc_len iflc_len 154 # define lifc_buf iflc_buf 155 # define lifc_req iflc_req 156 # define LIFCONF if_laddrconf 158 # define ISC_HAVE_LIFC_FAMILY 1 159 # define ISC_HAVE_LIFC_FLAGS 1 160 # define LIFCONF lifconf 163 #ifdef ISC_PLATFORM_HAVEIF_LADDRREQ 164 # define lifr_addr iflr_addr 165 # define lifr_name iflr_name 166 # define lifr_dstaddr iflr_dstaddr 167 # define lifr_flags iflr_flags 168 # define sockaddr_storage sockaddr_ext 169 # define ss_family sa_family 170 # define LIFREQ if_laddrreq 172 # define LIFREQ lifreq 176 # if defined(LIFNAMSIZ) 177 # define IF_NAMESIZE LIFNAMSIZ 178 # elif defined(IFNAMSIZ) 179 # define IF_NAMESIZE IFNAMSIZ 181 # define IF_NAMESIZE 16 184 #elif !defined(__linux) && !defined(HAVE_IFADDRS_H) 185 # define SIOCGLIFCONF SIOCGIFCONF 186 # define SIOCGLIFFLAGS SIOCGIFFLAGS 187 # define LIFREQ ifreq 188 # define LIFCONF ifconf 189 # define lifr_name ifr_name 190 # define lifr_addr ifr_addr 191 # define lifr_flags ifr_flags 192 # define lifc_len ifc_len 193 # define lifc_buf ifc_buf 194 # define lifc_req ifc_req 196 # define ss_family __ss_family 200 #if defined(SIOCGLIFCONF) && defined(SIOCGLIFFLAGS) 225 char name[IF_NAMESIZE+1];
226 struct sockaddr_storage addr;
237 #ifdef ISC_PLATFORM_HAVELIFNUM 238 struct lifnum lifnum;
244 if (ifaces->
sock < 0) {
245 log_error(
"Error creating socket to list interfaces; %m");
249 memset(&lifnum, 0,
sizeof(lifnum));
250 #ifdef ISC_PLATFORM_HAVELIFNUM 251 lifnum.lifn_family = AF_UNSPEC;
254 if (ioctl(ifaces->
sock, SIOCGLIFNUM, &lifnum) < 0) {
255 log_error(
"Error finding total number of interfaces; %m");
261 #ifdef ISC_PLATFORM_HAVELIFNUM 262 ifaces->
num = lifnum.lifn_count;
264 ifaces->
num = lifnum;
270 memset(&ifaces->
conf, 0,
sizeof(ifaces->
conf));
271 #ifdef ISC_HAVE_LIFC_FAMILY 272 ifaces->
conf.lifc_family = AF_UNSPEC;
276 if (ifaces->
conf.lifc_buf == NULL) {
277 log_fatal(
"Out of memory getting interface list.");
281 log_error(
"Error getting interfaces configuration list; %m");
303 isc_boolean_t foundif;
304 #if defined(sun) || defined(__linux) 312 if (ifaces->
next >= ifaces->
num) {
317 p = ifaces->
conf.lifc_req;
320 if (strlen(p->lifr_name) >=
sizeof(info->
name)) {
322 log_error(
"Interface name '%s' too long", p->lifr_name);
332 strcpy(info->
name, p->lifr_name);
333 memset(&info->
addr, 0,
sizeof(info->
addr));
334 memcpy(&info->
addr, &p->lifr_addr,
sizeof(p->lifr_addr));
336 #if defined(sun) || defined(__linux) 338 s = strchr(info->
name,
':');
345 }
while ((foundif == ISC_FALSE) ||
346 (strncmp(info->
name,
"dummy", 5) == 0));
348 memset(&tmp, 0,
sizeof(tmp));
349 strcpy(tmp.lifr_name, info->
name);
351 log_error(
"Error getting interface flags for '%s'; %m",
356 info->
flags = tmp.lifr_flags;
391 struct ifaddrs *head;
392 struct ifaddrs *
next;
400 struct sockaddr_storage addr;
411 if (getifaddrs(&ifaces->head) != 0) {
412 log_error(
"Error getting interfaces; %m");
415 ifaces->
next = ifaces->head;
429 if (ifaces->
next == NULL) {
433 if (strlen(ifaces->
next->ifa_name) >=
sizeof(info->
name)) {
434 log_error(
"Interface name '%s' too long",
435 ifaces->
next->ifa_name);
439 strcpy(info->
name, ifaces->
next->ifa_name);
441 memset(&info->
addr, 0 ,
sizeof(info->
addr));
443 if (ifaces->
next->ifa_addr != NULL) {
445 sa_len = ifaces->
next->ifa_addr->sa_len;
447 if (ifaces->
next->ifa_addr->sa_family == AF_INET)
448 sa_len =
sizeof(
struct sockaddr_in);
449 else if (ifaces->
next->ifa_addr->sa_family == AF_INET6)
450 sa_len =
sizeof(
struct sockaddr_in6);
452 memcpy(&info->
addr, ifaces->
next->ifa_addr, sa_len);
455 ifaces->
next = ifaces->
next->ifa_next;
465 freeifaddrs(ifaces->head);
474 const struct in_addr *addr) {
482 log_fatal(
"Out of memory saving IPv4 address " 492 tmp =
dmalloc(new_max *
sizeof(
struct in_addr),
MDL);
494 log_fatal(
"Out of memory saving IPv4 address " 511 const struct in6_addr *addr) {
520 log_fatal(
"Out of memory saving IPv6 address " 526 struct in6_addr *tmp;
530 tmp =
dmalloc(new_max *
sizeof(
struct in6_addr),
MDL);
532 log_fatal(
"Out of memory saving IPv6 address " 561 char abuf[
sizeof(
"ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
573 log_fatal(
"Can't get list of interfaces.");
591 for (tmp = interfaces; tmp; tmp = tmp->
next) {
601 !(info.
flags & IFF_BROADCAST)) ||
604 !(info.
flags & IFF_MULTICAST)) ||
606 info.
flags & IFF_LOOPBACK ||
607 info.
flags & IFF_POINTOPOINT) && !tmp) ||
608 (!(info.
flags & IFF_UP) &&
615 status = interface_allocate(&tmp,
MDL);
616 if (status != ISC_R_SUCCESS) {
617 log_fatal(
"Error allocating interface %s: %s",
618 info.
name, isc_result_totext(status));
622 interface_dereference(&tmp,
MDL);
627 (*dhcp_interface_discovery_hook)(tmp);
630 if ((info.
addr.ss_family == AF_INET) &&
632 struct sockaddr_in *a = (
struct sockaddr_in*)&info.
addr;
636 if (a->sin_addr.s_addr == htonl(INADDR_LOOPBACK) &&
643 if (a->sin_addr.s_addr != htonl(INADDR_ANY))
650 memcpy(addr.iabuf, &a->sin_addr.s_addr, addr.len);
652 (*dhcp_interface_setup_hook)(tmp, &addr);
656 else if ((info.
addr.ss_family == AF_INET6) &&
658 struct sockaddr_in6 *a =
659 (
struct sockaddr_in6*)&info.
addr;
663 if (IN6_IS_ADDR_LOOPBACK(&a->sin6_addr) &&
670 if (IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr))
673 add_ipv6_addr_to_interface(tmp, &a->sin6_addr);
677 memcpy(addr.iabuf, &a->sin6_addr, addr.len);
679 (*dhcp_interface_setup_hook)(tmp, &addr);
686 log_fatal(
"Error getting interface information.");
696 for (tmp = interfaces ; tmp != NULL ; tmp = tmp->
next) {
697 if (tmp->
ifp == NULL) {
700 tif = (
struct ifreq *)
dmalloc(
sizeof(
struct ifreq),
704 strcpy(tif->ifr_name, tmp->
name);
717 tmp = last = next = NULL;
719 interface_reference (&tmp, interfaces,
MDL);
722 interface_dereference (&next,
MDL);
724 interface_reference (&next, tmp -> next,
MDL);
727 interface_dereference(&tmp,
MDL);
729 interface_reference(&tmp, next,
MDL);
734 tmp -> flags &= ~(INTERFACE_AUTOMATIC |
742 if ((tmp -> flags & INTERFACE_REQUESTED) != ir)
743 log_fatal (
"%s: not found", tmp -> name);
746 interface_dereference (&interfaces,
749 interface_reference (&interfaces, next,
MDL);
751 interface_dereference (&last -> next,
MDL);
753 interface_reference (&last -> next,
757 interface_dereference (&tmp -> next,
MDL);
761 if (dummy_interfaces) {
762 interface_reference (&tmp -> next,
763 dummy_interfaces,
MDL);
764 interface_dereference (&dummy_interfaces,
MDL);
766 interface_reference (&dummy_interfaces, tmp,
MDL);
767 interface_dereference (&tmp,
MDL);
769 interface_reference (&tmp, next,
MDL);
778 log_info(
"No subnet declaration for %s (%s).",
781 "no IPv4 addresses" :
791 strcpy(abuf,
"no IPv6 addresses");
793 log_info(
"No subnet6 declaration for %s (%s).",
799 log_info (
"** Ignoring requests on %s. %s",
800 tmp -> name,
"If this is not what");
801 log_info (
" you want, please write %s",
804 "a subnet6 declaration" :
806 "a subnet declaration");
807 log_info (
" in your dhcpd.conf file %s",
808 "for the network segment");
811 tmp -> name,
"is attached. **");
818 "subnet6 declaration for this" :
820 "subnet declaration for this");
821 log_error (
"subnet. You cannot prevent %s",
823 log_error (
"from listening on this subnet %s",
825 log_fatal (
"operating system does not %s.",
826 "support this capability");
834 : (
struct subnet *)0);
835 subnet; subnet = subnet -> next_sibling) {
851 "address", tmp->
name);
878 #if defined (F_SETFD) 879 if (fcntl (tmp -> rfdesc, F_SETFD, 1) < 0)
880 log_error (
"Can't set close-on-exec on %s: %m",
882 if (tmp -> rfdesc != tmp -> wfdesc) {
883 if (fcntl (tmp -> wfdesc, F_SETFD, 1) < 0)
884 log_error (
"Can't set close-on-exec on %s: %m",
889 interface_dereference (&tmp,
MDL);
891 interface_reference (&tmp, next,
MDL);
900 for (tmp = interfaces; tmp; tmp = tmp ->
next) {
902 if (tmp -> flags & INTERFACE_RUNNING)
904 if (tmp -> rfdesc == -1)
922 if (status != ISC_R_SUCCESS)
923 log_fatal (
"Can't register I/O handle for %s: %s",
924 tmp -> name, isc_result_totext (status));
941 log_fatal (
"Not configured to listen on any interfaces!");
949 #if defined (F_SETFD) 950 if (fallback_interface) {
951 if (fcntl (fallback_interface -> rfdesc, F_SETFD, 1) < 0)
952 log_error (
"Can't set close-on-exec on fallback: %m");
953 if (fallback_interface -> rfdesc != fallback_interface -> wfdesc) {
954 if (fcntl (fallback_interface -> wfdesc, F_SETFD, 1) < 0)
955 log_error (
"Can't set close-on-exec on fallback: %m");
966 if (h -> type != dhcp_type_interface)
976 status = interface_allocate (&fallback_interface, file, line);
977 if (status != ISC_R_SUCCESS)
978 log_fatal (
"Error allocating fallback interface: %s",
979 isc_result_totext (status));
980 strcpy (fallback_interface ->
name,
"fallback");
984 status = interface_reference (fp, fallback_interface, file, line);
986 fallback_interface -> index = -1;
988 return status == ISC_R_SUCCESS;
995 for (ip = interfaces; ip; ip = ip ->
next) {
1000 if (fallback_interface)
1009 struct sockaddr_in from;
1014 unsigned char packbuf [4095];
1021 if (h -> type != dhcp_type_interface)
1029 return ISC_R_UNEXPECTED;
1032 return ISC_R_UNEXPECTED;
1044 return ISC_R_UNEXPECTED;
1046 #if defined(IP_PKTINFO) && defined(IP_RECVPKTINFO) && defined(USE_V4_PKTINFO) 1049 unsigned int ifindex;
1051 memcpy(&ifindex, hfrom.
hbuf, sizeof (ifindex));
1058 while ((ip != NULL) && (if_nametoindex(ip->
name) != ifindex))
1061 return ISC_R_NOTFOUND;
1067 memcpy (ifrom.
iabuf, &from.sin_addr, ifrom.
len);
1069 (*bootp_packet_handler) (ip, &u.packet, (unsigned)result,
1070 from.sin_port, ifrom, &hfrom);
1077 return ISC_R_SUCCESS;
1083 struct sockaddr_in6 from;
1090 unsigned int if_idx = 0;
1092 if (h->type != dhcp_type_interface) {
1098 &from, &to, &if_idx);
1101 return ISC_R_UNEXPECTED;
1106 return ISC_R_NOTFOUND;
1112 if (IN6_IS_ADDR_MULTICAST(&to)) {
1113 is_unicast = ISC_FALSE;
1115 is_unicast = ISC_TRUE;
1119 memcpy(ifrom.
iabuf, &from.sin6_addr, ifrom.
len);
1123 while ((ip != NULL) && (if_nametoindex(ip->
name) != if_idx))
1127 return ISC_R_NOTFOUND;
1129 (*dhcpv6_packet_handler)(ip, buf,
1130 result, from.sin6_port,
1131 &ifrom, is_unicast);
1134 return ISC_R_SUCCESS;
1144 isc_result_t status;
1146 if (h -> type != dhcp_type_interface)
1148 interface = (struct interface_info *)h;
1153 value -> u.
buffer.len <
sizeof interface -> name) {
1154 memcpy (interface -> name,
1157 interface -> name [value -> u.buffer.len] = 0;
1160 return ISC_R_SUCCESS;
1164 if (h -> inner && h -> inner -> type -> set_value) {
1165 status = ((*(h -> inner -> type -> set_value))
1166 (h -> inner, id, name, value));
1171 return ISC_R_NOTFOUND;
1180 return ISC_R_NOTIMPLEMENTED;
1188 if (h -> type != dhcp_type_interface)
1190 interface = (struct interface_info *)h;
1192 if (interface -> ifp) {
1193 dfree (interface -> ifp, file, line);
1194 interface -> ifp = 0;
1196 if (interface -> next)
1197 interface_dereference (&interface -> next, file, line);
1198 if (interface -> rbuf) {
1199 dfree (interface -> rbuf, file, line);
1200 interface -> rbuf = (
unsigned char *)0;
1202 if (interface -> client)
1209 return ISC_R_SUCCESS;
1213 const char *
name, va_list ap)
1216 isc_result_t status;
1218 if (h -> type != dhcp_type_interface)
1220 interface = (struct interface_info *)h;
1224 if (!strcmp (name,
"update")) {
1225 for (ip = dummy_interfaces; ip; ip = ip ->
next)
1226 if (ip == interface)
1231 for (ip = interfaces; ip; ip = ip ->
next)
1232 if (ip == interface)
1239 if (h -> inner && h -> inner -> type -> signal_handler) {
1240 status = ((*(h -> inner -> type -> signal_handler))
1241 (h -> inner, name, ap));
1242 if (status == ISC_R_SUCCESS)
1245 return ISC_R_NOTFOUND;
1253 isc_result_t status;
1255 if (h -> type != dhcp_type_interface)
1257 interface = (struct interface_info *)h;
1262 if (status != ISC_R_SUCCESS)
1268 if (status != ISC_R_SUCCESS)
1272 if (h -> inner && h -> inner -> type -> stuff_values) {
1273 status = ((*(h -> inner -> type -> stuff_values))
1274 (c, id, h -> inner));
1275 if (status == ISC_R_SUCCESS)
1279 return ISC_R_SUCCESS;
1287 isc_result_t status;
1295 if (status == ISC_R_SUCCESS) {
1299 if (status != ISC_R_SUCCESS)
1303 if ((*ip) -> type != dhcp_type_interface) {
1311 if (status == ISC_R_SUCCESS) {
1314 for (interface = interfaces; interface;
1315 interface = interface -> next) {
1316 s = memchr (interface -> name, 0, IFNAMSIZ);
1318 len = s - &
interface -> name [0];
1321 if ((tv -> value -> u.buffer.len == len &&
1322 !memcmp (interface -> name,
1323 (
char *)tv -> value -> u.buffer.
value,
1328 for (interface = dummy_interfaces;
1329 interface;
interface = interface -> next) {
1330 s = memchr (interface -> name, 0, IFNAMSIZ);
1332 len = s - &
interface -> name [0];
1335 if ((tv -> value -> u.buffer.len == len &&
1336 !memcmp (interface -> name,
1338 tv -> value -> u.buffer.
value,
1348 }
else if (!interface) {
1351 return ISC_R_NOTFOUND;
1362 return ISC_R_SUCCESS;
1370 isc_result_t status;
1373 status = interface_allocate (&hp,
MDL);
1374 if (status != ISC_R_SUCCESS)
1378 interface_dereference (&hp,
MDL);
1387 interface = (struct interface_info *)lp;
1391 for (ip = interfaces; ip; ip = ip ->
next) {
1392 if (ip == interface) {
1394 interface_dereference (&last -> next,
MDL);
1396 interface_reference (&last -> next,
1399 interface_dereference (&interfaces,
MDL);
1401 interface_reference (&interfaces,
1405 interface_dereference (&ip -> next,
MDL);
1411 return ISC_R_NOTFOUND;
1414 if (dummy_interfaces) {
1415 interface_reference (&interface -> next,
1416 dummy_interfaces,
MDL);
1417 interface_dereference (&dummy_interfaces,
MDL);
1419 interface_reference (&dummy_interfaces, interface,
MDL);
1423 (*dhcp_interface_shutdown_hook) (interface);
1441 return ISC_R_SUCCESS;
1450 if (tptr ->
index == -1) {
1453 interface_vector [tptr ->
index])
1457 if (interface_max <= tptr ->
index) {
1459 vec =
dmalloc ((interface_max + delta) *
1463 memset (&vec [interface_max], 0,
1465 interface_max += delta;
1466 if (interface_vector) {
1467 memcpy (vec, interface_vector,
1472 interface_vector = vec;
1474 interface_reference (&interface_vector [tptr -> index], tptr,
MDL);
1477 #if defined (TRACING) 1490 interface_reference (&tmp -> next,
1492 interface_dereference (&interfaces,
MDL);
1494 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
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__
trace_type_t * trace_type_register(const char *, void *, void(*)(trace_type_t *, unsigned, char *), void(*)(trace_type_t *), const char *, int)
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 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 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)
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
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)
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