33 #define IF_LINE_LENGTH 1024
36 #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)
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) &&
646 if (a->sin_addr.s_addr != htonl(INADDR_ANY))
653 memcpy(addr.iabuf, &a->sin_addr.s_addr, addr.len);
655 (*dhcp_interface_setup_hook)(tmp, &addr);
659 else if ((info.
addr.ss_family == AF_INET6) &&
661 struct sockaddr_in6 *a =
662 (
struct sockaddr_in6*)&info.
addr;
666 if (IN6_IS_ADDR_LOOPBACK(&a->sin6_addr) &&
673 if (IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr))
676 add_ipv6_addr_to_interface(tmp, &a->sin6_addr);
680 memcpy(addr.iabuf, &a->sin6_addr, addr.len);
682 (*dhcp_interface_setup_hook)(tmp, &addr);
689 log_fatal(
"Error getting interface information.");
699 for (tmp = interfaces ; tmp != NULL ; tmp = tmp->
next) {
700 if (tmp->
ifp == NULL) {
703 tif = (
struct ifreq *)
dmalloc(
sizeof(
struct ifreq),
707 strcpy(tif->ifr_name, tmp->
name);
720 tmp = last = next = NULL;
722 interface_reference (&tmp, interfaces,
MDL);
725 interface_dereference (&next,
MDL);
727 interface_reference (&next, tmp -> next,
MDL);
730 interface_dereference(&tmp,
MDL);
732 interface_reference(&tmp, next,
MDL);
737 tmp -> flags &= ~(INTERFACE_AUTOMATIC |
745 if ((tmp -> flags & INTERFACE_REQUESTED) != ir)
746 log_fatal (
"%s: not found", tmp -> name);
749 interface_dereference (&interfaces,
752 interface_reference (&interfaces, next,
MDL);
754 interface_dereference (&last -> next,
MDL);
756 interface_reference (&last -> next,
760 interface_dereference (&tmp -> next,
MDL);
764 if (dummy_interfaces) {
765 interface_reference (&tmp -> next,
766 dummy_interfaces,
MDL);
767 interface_dereference (&dummy_interfaces,
MDL);
769 interface_reference (&dummy_interfaces, tmp,
MDL);
770 interface_dereference (&tmp,
MDL);
772 interface_reference (&tmp, next,
MDL);
781 log_info(
"No subnet declaration for %s (%s).",
784 "no IPv4 addresses" :
794 strcpy(abuf,
"no IPv6 addresses");
796 log_info(
"No subnet6 declaration for %s (%s).",
802 log_info (
"** Ignoring requests on %s. %s",
803 tmp -> name,
"If this is not what");
804 log_info (
" you want, please write %s",
807 "a subnet6 declaration" :
809 "a subnet declaration");
810 log_info (
" in your dhcpd.conf file %s",
811 "for the network segment");
814 tmp -> name,
"is attached. **");
821 "subnet6 declaration for this" :
823 "subnet declaration for this");
824 log_error (
"subnet. You cannot prevent %s",
826 log_error (
"from listening on this subnet %s",
828 log_fatal (
"operating system does not %s.",
829 "support this capability");
837 : (
struct subnet *)0);
838 subnet; subnet = subnet -> next_sibling) {
854 "address", tmp->
name);
881 #if defined (F_SETFD)
882 if (fcntl (tmp -> rfdesc, F_SETFD, 1) < 0)
883 log_error (
"Can't set close-on-exec on %s: %m",
885 if (tmp -> rfdesc != tmp -> wfdesc) {
886 if (fcntl (tmp -> wfdesc, F_SETFD, 1) < 0)
887 log_error (
"Can't set close-on-exec on %s: %m",
892 interface_dereference (&tmp,
MDL);
894 interface_reference (&tmp, next,
MDL);
903 for (tmp = interfaces; tmp; tmp = tmp -> next) {
905 if (tmp -> flags & INTERFACE_RUNNING)
907 if (tmp -> rfdesc == -1)
925 if (status != ISC_R_SUCCESS)
926 log_fatal (
"Can't register I/O handle for %s: %s",
927 tmp -> name, isc_result_totext (status));
944 log_fatal (
"Not configured to listen on any interfaces!");
952 #if defined (F_SETFD)
953 if (fallback_interface) {
954 if (fcntl (fallback_interface -> rfdesc, F_SETFD, 1) < 0)
955 log_error (
"Can't set close-on-exec on fallback: %m");
956 if (fallback_interface -> rfdesc != fallback_interface -> wfdesc) {
957 if (fcntl (fallback_interface -> wfdesc, F_SETFD, 1) < 0)
958 log_error (
"Can't set close-on-exec on fallback: %m");
969 if (h -> type != dhcp_type_interface)
979 status = interface_allocate (&fallback_interface, file, line);
980 if (status != ISC_R_SUCCESS)
981 log_fatal (
"Error allocating fallback interface: %s",
982 isc_result_totext (status));
983 strcpy (fallback_interface ->
name,
"fallback");
987 status = interface_reference (fp, fallback_interface, file, line);
989 fallback_interface -> index = -1;
991 return status == ISC_R_SUCCESS;
998 for (ip = interfaces; ip; ip = ip ->
next) {
1003 if (fallback_interface)
1012 struct sockaddr_in from;
1017 unsigned char packbuf [4095];
1024 if (h -> type != dhcp_type_interface)
1032 return ISC_R_UNEXPECTED;
1035 return ISC_R_UNEXPECTED;
1047 return ISC_R_UNEXPECTED;
1049 #if defined(IP_PKTINFO) && defined(IP_RECVPKTINFO) && defined(USE_V4_PKTINFO)
1052 unsigned int ifindex;
1054 memcpy(&ifindex, hfrom.
hbuf, sizeof (ifindex));
1061 while ((ip != NULL) && (if_nametoindex(ip->
name) != ifindex))
1064 return ISC_R_NOTFOUND;
1070 memcpy (ifrom.
iabuf, &from.sin_addr, ifrom.
len);
1072 (*bootp_packet_handler) (ip, &u.packet, (unsigned)result,
1073 from.sin_port, ifrom, &hfrom);
1080 return ISC_R_SUCCESS;
1086 struct sockaddr_in6 from;
1093 unsigned int if_idx = 0;
1095 if (h->type != dhcp_type_interface) {
1101 &from, &to, &if_idx);
1104 return ISC_R_UNEXPECTED;
1109 return ISC_R_NOTFOUND;
1115 if (IN6_IS_ADDR_MULTICAST(&to)) {
1116 is_unicast = ISC_FALSE;
1118 is_unicast = ISC_TRUE;
1122 memcpy(ifrom.iabuf, &from.sin6_addr, ifrom.len);
1126 while ((ip != NULL) && (if_nametoindex(ip->
name) != if_idx))
1130 return ISC_R_NOTFOUND;
1132 (*dhcpv6_packet_handler)(ip, buf,
1133 result, from.sin6_port,
1134 &ifrom, is_unicast);
1137 return ISC_R_SUCCESS;
1147 isc_result_t status;
1149 if (h -> type != dhcp_type_interface)
1151 interface = (struct interface_info *)h;
1156 value -> u.
buffer.len <
sizeof interface -> name) {
1157 memcpy (interface -> name,
1160 interface -> name [value -> u.buffer.len] = 0;
1163 return ISC_R_SUCCESS;
1167 if (h -> inner && h -> inner -> type -> set_value) {
1168 status = ((*(h -> inner -> type -> set_value))
1169 (h -> inner, id, name, value));
1174 return ISC_R_NOTFOUND;
1183 return ISC_R_NOTIMPLEMENTED;
1191 if (h -> type != dhcp_type_interface)
1193 interface = (struct interface_info *)h;
1195 if (interface -> ifp) {
1196 dfree (interface -> ifp, file, line);
1197 interface -> ifp = 0;
1199 if (interface -> next)
1200 interface_dereference (&interface -> next, file, line);
1201 if (interface -> rbuf) {
1202 dfree (interface -> rbuf, file, line);
1203 interface -> rbuf = (
unsigned char *)0;
1205 if (interface -> client)
1212 return ISC_R_SUCCESS;
1216 const char *
name, va_list ap)
1219 isc_result_t status;
1221 if (h -> type != dhcp_type_interface)
1223 interface = (struct interface_info *)h;
1227 if (!strcmp (name,
"update")) {
1228 for (ip = dummy_interfaces; ip; ip = ip -> next)
1229 if (ip == interface)
1234 for (ip = interfaces; ip; ip = ip -> next)
1235 if (ip == interface)
1242 if (h -> inner && h -> inner -> type -> signal_handler) {
1243 status = ((*(h -> inner -> type -> signal_handler))
1244 (h -> inner, name, ap));
1245 if (status == ISC_R_SUCCESS)
1248 return ISC_R_NOTFOUND;
1256 isc_result_t status;
1258 if (h -> type != dhcp_type_interface)
1260 interface = (struct interface_info *)h;
1265 if (status != ISC_R_SUCCESS)
1271 if (status != ISC_R_SUCCESS)
1275 if (h -> inner && h -> inner -> type -> stuff_values) {
1276 status = ((*(h -> inner -> type -> stuff_values))
1277 (c, id, h -> inner));
1278 if (status == ISC_R_SUCCESS)
1282 return ISC_R_SUCCESS;
1290 isc_result_t status;
1298 if (status == ISC_R_SUCCESS) {
1302 if (status != ISC_R_SUCCESS)
1306 if ((*ip) -> type != dhcp_type_interface) {
1314 if (status == ISC_R_SUCCESS) {
1317 for (interface = interfaces; interface;
1318 interface = interface -> next) {
1319 s = memchr (interface -> name, 0, IFNAMSIZ);
1321 len = s - &
interface -> name [0];
1324 if ((tv -> value -> u.buffer.len == len &&
1325 !memcmp (interface -> name,
1326 (
char *)tv -> value -> u.buffer.
value,
1331 for (interface = dummy_interfaces;
1332 interface;
interface = interface -> next) {
1333 s = memchr (interface -> name, 0, IFNAMSIZ);
1335 len = s - &
interface -> name [0];
1338 if ((tv -> value -> u.buffer.len == len &&
1339 !memcmp (interface -> name,
1341 tv -> value -> u.buffer.
value,
1351 }
else if (!interface) {
1354 return ISC_R_NOTFOUND;
1365 return ISC_R_SUCCESS;
1373 isc_result_t status;
1376 status = interface_allocate (&hp,
MDL);
1377 if (status != ISC_R_SUCCESS)
1381 interface_dereference (&hp,
MDL);
1390 interface = (struct interface_info *)lp;
1394 for (ip = interfaces; ip; ip = ip -> next) {
1395 if (ip == interface) {
1397 interface_dereference (&last -> next,
MDL);
1399 interface_reference (&last -> next,
1402 interface_dereference (&interfaces,
MDL);
1404 interface_reference (&interfaces,
1408 interface_dereference (&ip -> next,
MDL);
1414 return ISC_R_NOTFOUND;
1417 if (dummy_interfaces) {
1418 interface_reference (&interface -> next,
1419 dummy_interfaces,
MDL);
1420 interface_dereference (&dummy_interfaces,
MDL);
1422 interface_reference (&dummy_interfaces, interface,
MDL);
1426 (*dhcp_interface_shutdown_hook) (interface);
1444 return ISC_R_SUCCESS;
1453 if (tptr ->
index == -1) {
1456 interface_vector [tptr ->
index])
1460 if (interface_max <= tptr ->
index) {
1462 vec =
dmalloc ((interface_max + delta) *
1466 memset (&vec [interface_max], 0,
1468 interface_max += delta;
1469 if (interface_vector) {
1470 memcpy (vec, interface_vector,
1475 interface_vector = vec;
1477 interface_reference (&interface_vector [tptr -> index], tptr,
MDL);
1480 #if defined (TRACING)
1493 interface_reference (&tmp -> next,
1495 interface_dereference (&interfaces,
MDL);
1497 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__
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
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 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)
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