90 #if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE) || \ 91 defined(USE_DLPI_HWADDR) 93 # include <sys/ioctl.h> 94 # include <sys/time.h> 95 # include <sys/dlpi.h> 97 # ifdef USE_DLPI_PFMOD 98 # include <sys/pfmod.h> 103 # include <netinet/in_systm.h> 108 # ifdef USE_DLPI_PFMOD 110 # define DLPI_MODNAME "DLPI+RAW+PFMOD" 112 # define DLPI_MODNAME "DLPI+PFMOD" 116 # define DLPI_MODNAME "DLPI+RAW" 118 # define DLPI_MODNAME "DLPI" 123 # define ABS(x) ((x) >= 0 ? (x) : 0-(x)) 126 #if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW) 127 static int strioctl (
int fd,
int cmd,
int timeout,
int len,
char *dp);
130 #define DLPI_MAXDLBUF 8192 131 #define DLPI_MAXDLADDR 1024 134 #if defined(USE_DEV_NET) 135 #define DLPI_DEVDIR "/dev/net/" 137 #define DLPI_DEVDIR "/dev/" 140 static int dlpiopen(
const char *ifname);
141 static int dlpiunit (
char *ifname);
142 static int dlpiinforeq (
int fd);
143 static int dlpiphysaddrreq (
int fd,
unsigned long addrtype);
144 static int dlpiattachreq (
int fd,
unsigned long ppa);
145 static int dlpibindreq (
int fd,
unsigned long sap,
unsigned long max_conind,
146 unsigned long service_mode,
unsigned long conn_mgmt,
147 unsigned long xidtest);
148 #if defined(UNUSED_DLPI_INTERFACE) 152 static int dlpidetachreq (
int fd);
153 static int dlpiunbindreq (
int fd);
155 static int dlpiokack (
int fd,
char *bufp);
156 static int dlpiinfoack (
int fd,
char *bufp);
157 static int dlpiphysaddrack (
int fd,
char *bufp);
158 static int dlpibindack (
int fd,
char *bufp);
159 #if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE) 163 static int dlpiunitdatareq (
int fd,
unsigned char *addr,
int addrlen,
164 unsigned long minpri,
unsigned long maxpri,
165 unsigned char *data,
int datalen);
166 static int dlpiunitdataind (
int fd,
167 unsigned char *dstaddr,
168 unsigned long *dstaddrlen,
169 unsigned char *srcaddr,
170 unsigned long *srcaddrlen,
171 unsigned long *grpaddr,
175 static int expected (
unsigned long prim,
union DL_primitives *dlp,
177 static int strgetmsg (
int fd,
struct strbuf *ctlp,
struct strbuf *datap,
178 int *flagsp,
char *caller);
190 #ifdef USE_DLPI_RECEIVE 201 int if_register_dlpi (info)
206 long buf [DLPI_MAXDLBUF];
207 union DL_primitives *dlp;
209 dlp = (
union DL_primitives *)buf;
212 if ((sock = dlpiopen (info -> name)) < 0) {
213 log_fatal (
"Can't open DLPI device for %s: %m", info -> name);
220 if (dlpiinforeq(sock) < 0 || dlpiinfoack(sock, (
char *)buf) < 0) {
221 log_fatal (
"Can't get DLPI MAC type for %s: %m", info -> name);
223 switch (dlp -> info_ack.dl_mac_type) {
237 (
unsigned long)dlp->info_ack.dl_mac_type);
245 info -> dlpi_sap_length = dlp -> info_ack.dl_sap_length;
246 info -> dlpi_broadcast_addr.hlen =
247 dlp -> info_ack.dl_brdcst_addr_length;
248 memcpy (info -> dlpi_broadcast_addr.hbuf,
249 (
char *)dlp + dlp -> info_ack.dl_brdcst_addr_offset,
250 dlp -> info_ack.dl_brdcst_addr_length);
253 if (dlp -> info_ack.dl_provider_style == DL_STYLE2) {
258 unit = dlpiunit (info -> name);
260 if (dlpiattachreq (sock, unit) < 0
261 || dlpiokack (sock, (
char *)buf) < 0) {
262 log_fatal (
"Can't attach DLPI device for %s: %m", info -> name);
269 if (dlpibindreq (sock,
ETHERTYPE_IP, 0, DL_CLDLS, 0, 0) < 0
270 || dlpibindack (sock, (
char *)buf) < 0) {
271 log_fatal (
"Can't bind DLPI device for %s: %m", info -> name);
278 if (dlpiphysaddrreq (sock, DL_CURR_PHYS_ADDR) < 0
279 || dlpiphysaddrack (sock, (
char *)buf) < 0) {
280 log_fatal (
"Can't get DLPI hardware address for %s: %m",
284 info -> hw_address.hlen = dlp -> physaddr_ack.dl_addr_length + 1;
285 memcpy (&info -> hw_address.hbuf [1],
286 (
char *)buf + dlp -> physaddr_ack.dl_addr_offset,
287 dlp -> physaddr_ack.dl_addr_length);
290 if (strioctl (sock, DLIOCRAW, INFTIM, 0, 0) < 0) {
291 log_fatal (
"Can't set DLPI RAW mode for %s: %m",
296 #ifdef USE_DLPI_PFMOD 297 if (ioctl (sock, I_PUSH,
"pfmod") < 0) {
298 log_fatal (
"Can't push packet filter onto DLPI for %s: %m",
306 #if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW) 308 strioctl (fd, cmd,
timeout, len, dp)
319 sio.ic_timout = timeout;
323 if ((rslt = ioctl (fd, I_STR, &sio)) < 0) {
337 #ifndef USE_DLPI_RECEIVE 338 # ifdef USE_DLPI_PFMOD 339 struct packetfilt pf;
342 info -> wfdesc = if_register_dlpi (info);
344 # ifdef USE_DLPI_PFMOD 348 pf.Pf_Filter [0] = ENF_PUSHZERO;
351 if (strioctl (info -> wfdesc, PFIOCSETF, INFTIM,
352 sizeof (pf), (
char *)&pf) < 0) {
353 log_fatal (
"Can't set PFMOD send filter on %s: %m", info -> name);
362 info -> wfdesc = info -> rfdesc;
366 log_info (
"Sending on DLPI/%s/%s%s%s",
369 info -> hw_address.hlen - 1,
370 &info -> hw_address.hbuf [1]),
375 #ifdef DLPI_FIRST_SEND_WAIT 377 # ifdef USE_DLPI_RECEIVE 378 sleep (DLPI_FIRST_SEND_WAIT - (DLPI_FIRST_SEND_WAIT / 2));
380 sleep (DLPI_FIRST_SEND_WAIT);
390 #ifndef USE_DLPI_RECEIVE 396 log_info (
"Disabling output on DLPI/%s/%s%s%s",
407 #ifdef USE_DLPI_RECEIVE 415 #ifdef USE_DLPI_PFMOD 416 struct packetfilt pf;
422 info -> rfdesc = if_register_dlpi (info);
424 #ifdef USE_DLPI_PFMOD 432 #if defined (USE_DLPI_RAW) 433 # define ETHER_H_PREFIX (14) 438 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + (offset / 2);
439 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_CAND;
440 pf.Pf_Filter [pf.Pf_FilterLen++] = htons (
ETHERTYPE_IP);
442 # define ETHER_H_PREFIX (0) 457 offset = ETHER_H_PREFIX +
sizeof (iphdr) +
sizeof (u_int16_t);
458 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + (offset / 2);
459 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_CAND;
460 pf.Pf_Filter [pf.Pf_FilterLen++] =
local_port;
466 offset = ETHER_H_PREFIX + ((u_int8_t *)&(iphdr.ip_p) - (u_int8_t *)&iphdr);
467 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + (offset / 2);
468 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_AND;
469 pf.Pf_Filter [pf.Pf_FilterLen++] = htons (0x00FF);
470 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_CAND;
471 pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP);
474 if (strioctl (info -> rfdesc, PFIOCSETF, INFTIM,
475 sizeof (pf), (
char *)&pf) < 0) {
476 log_fatal (
"Can't set PFMOD receive filter on %s: %m", info -> name);
481 log_info (
"Listening on DLPI/%s/%s%s%s",
484 info -> hw_address.hlen - 1,
485 &info -> hw_address.hbuf [1]),
490 #ifdef DLPI_FIRST_SEND_WAIT 492 # ifdef USE_DLPI_SEND 493 sleep (DLPI_FIRST_SEND_WAIT / 2);
495 sleep (DLPI_FIRST_SEND_WAIT);
505 #ifndef USE_DLPI_SEND 511 log_info (
"Disabling input on DLPI/%s/%s%s%s",
529 struct sockaddr_in *to;
536 double ih [1536 /
sizeof (double)];
537 unsigned char *dbuf = (
unsigned char *)ih;
539 unsigned char dstaddr [DLPI_MAXDLADDR];
543 if (!strcmp (interface -> name,
"fallback"))
555 if (dbuflen >
sizeof hh)
556 log_fatal (
"send_packet: hh buffer too small.\n");
558 memcpy (dbuf + fudge, (
unsigned char *)hh, dbuflen);
562 to -> sin_addr.s_addr, to -> sin_port,
563 (
unsigned char *)raw, len);
566 memcpy (dbuf + dbuflen, raw, len);
570 result = write (interface -> wfdesc, dbuf + fudge, dbuflen - fudge);
583 unsigned char phys [DLPI_MAXDLADDR];
584 unsigned char sap [4];
585 int sap_len =
interface -> dlpi_sap_length;
586 int phys_len =
interface -> hw_address.hlen - 1;
589 memset (sap, 0,
sizeof (sap));
590 # if (BYTE_ORDER == LITTLE_ENDIAN) 598 if (hto && hto -> hlen == interface -> hw_address.hlen)
599 memcpy ( phys, (
char *) &hto -> hbuf [1], phys_len);
601 memcpy ( phys, interface -> dlpi_broadcast_addr.hbuf,
602 interface -> dlpi_broadcast_addr.hlen);
605 memcpy ( dstaddr, phys, phys_len);
606 memcpy ( (
char *) &dstaddr [phys_len], sap, ABS (sap_len));
609 memcpy ( dstaddr, (
void *) sap, sap_len);
610 memcpy ( (
char *) &dstaddr [sap_len], phys, phys_len);
612 addrlen = phys_len + ABS (sap_len);
615 result = dlpiunitdatareq (interface -> wfdesc, dstaddr, addrlen,
616 0, 0, dbuf, dbuflen);
624 #ifdef USE_DLPI_RECEIVE 629 struct sockaddr_in *from;
632 unsigned char dbuf [1536];
633 unsigned char srcaddr [DLPI_MAXDLADDR];
634 unsigned long srcaddrlen;
641 length = read (interface -> rfdesc, dbuf,
sizeof (dbuf));
643 length = dlpiunitdataind (interface -> rfdesc, (
unsigned char *)NULL,
644 (
unsigned long *)NULL, srcaddr, &srcaddrlen,
645 (
unsigned long *)NULL, dbuf,
sizeof (dbuf));
653 # if !defined (USE_DLPI_RAW) 662 int sap_len =
interface -> dlpi_sap_length;
663 int phys_len =
interface -> hw_address.hlen - 1;
665 if (hfrom && (srcaddrlen == ABS (sap_len) + phys_len )) {
666 hfrom -> hbuf [0] =
interface -> hw_address.hbuf [0];
667 hfrom -> hlen =
interface -> hw_address.hlen;
670 memcpy ((
char *) &hfrom -> hbuf [1], srcaddr, phys_len);
673 memcpy((
char *)&hfrom->
hbuf[1], srcaddr + sap_len, phys_len);
677 memset (hfrom,
'\0',
sizeof *hfrom);
699 from, length, &paylen, 1);
720 memcpy(buf, &dbuf [bufix], paylen);
743 #define DLPI_MAXWAIT 15 750 static int dlpiunit (ifname)
764 while ((*(cp-1) >=
'0' && *(cp-1) <=
'9') || *(cp - 1) ==
':') cp--;
768 while (*cp >=
'0' && *cp <=
'9') {
770 unit += (*cp++ -
'0');
780 dlpiopen(
const char *ifname) {
790 if (*ifname ==
'/') {
794 memcpy (devname, DLPI_DEVDIR, strlen (DLPI_DEVDIR));
795 dp = &devname [strlen (DLPI_DEVDIR)];
804 #if !defined(USE_DEV_NET) 806 while ((*(ep - 1) >=
'0' && *(ep - 1) <=
'9') || *(ep - 1) ==
':')
816 return open (devname, O_RDWR | O_CLOEXEC, 0);
823 static int dlpiinforeq (fd)
826 dl_info_req_t info_req;
830 info_req.dl_primitive = DL_INFO_REQ;
833 ctl.len =
sizeof (info_req);
834 ctl.buf = (
char *)&info_req;
838 return putmsg (fd, &ctl, (
struct strbuf *)NULL, flags);
844 static int dlpiphysaddrreq (fd, addrtype)
846 unsigned long addrtype;
848 dl_phys_addr_req_t physaddr_req;
852 physaddr_req.dl_primitive = DL_PHYS_ADDR_REQ;
853 physaddr_req.dl_addr_type = addrtype;
856 ctl.len =
sizeof (physaddr_req);
857 ctl.buf = (
char *)&physaddr_req;
861 return putmsg (fd, &ctl, (
struct strbuf *)NULL, flags);
867 static int dlpiattachreq (fd, ppa)
871 dl_attach_req_t attach_req;
875 attach_req.dl_primitive = DL_ATTACH_REQ;
876 attach_req.dl_ppa = ppa;
879 ctl.len =
sizeof (attach_req);
880 ctl.buf = (
char *)&attach_req;
884 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
890 static int dlpibindreq (fd, sap, max_conind, service_mode, conn_mgmt, xidtest)
892 unsigned long max_conind;
893 unsigned long service_mode;
894 unsigned long conn_mgmt;
895 unsigned long xidtest;
898 dl_bind_req_t bind_req;
902 bind_req.dl_primitive = DL_BIND_REQ;
903 bind_req.dl_sap = sap;
904 bind_req.dl_max_conind = max_conind;
905 bind_req.dl_service_mode = service_mode;
906 bind_req.dl_conn_mgmt = conn_mgmt;
907 bind_req.dl_xidtest_flg = xidtest;
910 ctl.len =
sizeof (bind_req);
911 ctl.buf = (
char *)&bind_req;
915 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
918 #if defined(UNUSED_DLPI_INTERFACE) 924 static int dlpiunbindreq (fd)
927 dl_unbind_req_t unbind_req;
931 unbind_req.dl_primitive = DL_UNBIND_REQ;
934 ctl.len =
sizeof (unbind_req);
935 ctl.buf = (
char *)&unbind_req;
939 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
948 static int dlpidetachreq (fd)
951 dl_detach_req_t detach_req;
955 detach_req.dl_primitive = DL_DETACH_REQ;
958 ctl.len =
sizeof (detach_req);
959 ctl.buf = (
char *)&detach_req;
963 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
971 static int dlpibindack (fd, bufp)
975 union DL_primitives *dlp;
979 ctl.maxlen = DLPI_MAXDLBUF;
983 if (strgetmsg (fd, &ctl,
984 (
struct strbuf*)NULL, &flags,
"dlpibindack") < 0) {
988 dlp = (
union DL_primitives *)ctl.buf;
990 if (expected (DL_BIND_ACK, dlp, flags) == -1) {
994 if (ctl.len < sizeof (dl_bind_ack_t)) {
1005 static int dlpiokack (fd, bufp)
1009 union DL_primitives *dlp;
1013 ctl.maxlen = DLPI_MAXDLBUF;
1017 if (strgetmsg (fd, &ctl,
1018 (
struct strbuf*)NULL, &flags,
"dlpiokack") < 0) {
1022 dlp = (
union DL_primitives *)ctl.buf;
1024 if (expected (DL_OK_ACK, dlp, flags) == -1) {
1028 if (ctl.len < sizeof (dl_ok_ack_t)) {
1039 static int dlpiinfoack (fd, bufp)
1043 union DL_primitives *dlp;
1047 ctl.maxlen = DLPI_MAXDLBUF;
1051 if (strgetmsg (fd, &ctl, (
struct strbuf *)NULL, &flags,
1052 "dlpiinfoack") < 0) {
1056 dlp = (
union DL_primitives *) ctl.buf;
1058 if (expected (DL_INFO_ACK, dlp, flags) == -1) {
1062 if (ctl.len < sizeof (dl_info_ack_t)) {
1073 int dlpiphysaddrack (fd, bufp)
1077 union DL_primitives *dlp;
1081 ctl.maxlen = DLPI_MAXDLBUF;
1085 if (strgetmsg (fd, &ctl, (
struct strbuf *)NULL, &flags,
1086 "dlpiphysaddrack") < 0) {
1090 dlp = (
union DL_primitives *)ctl.buf;
1092 if (expected (DL_PHYS_ADDR_ACK, dlp, flags) == -1) {
1096 if (ctl.len < sizeof (dl_phys_addr_ack_t)) {
1104 #if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE) 1105 int dlpiunitdatareq (fd, addr, addrlen, minpri, maxpri, dbuf, dbuflen)
1107 unsigned char *addr;
1109 unsigned long minpri;
1110 unsigned long maxpri;
1111 unsigned char *dbuf;
1114 long buf [DLPI_MAXDLBUF];
1115 union DL_primitives *dlp;
1116 struct strbuf ctl, data;
1119 dlp = (
union DL_primitives *)buf;
1120 dlp -> unitdata_req.dl_primitive = DL_UNITDATA_REQ;
1121 dlp -> unitdata_req.dl_dest_addr_length = addrlen;
1122 dlp -> unitdata_req.dl_dest_addr_offset =
sizeof (dl_unitdata_req_t);
1123 dlp -> unitdata_req.dl_priority.dl_min = minpri;
1124 dlp -> unitdata_req.dl_priority.dl_max = maxpri;
1127 memcpy ((
char *)buf + dlp -> unitdata_req.dl_dest_addr_offset,
1131 ctl.len = dlp -> unitdata_req.dl_dest_addr_offset + addrlen;
1132 ctl.buf = (
char *)buf;
1135 data.buf = (
char *)dbuf;
1139 return putmsg (fd, &ctl, &data, 0);
1142 static int dlpiunitdataind (fd, daddr, daddrlen,
1143 saddr, saddrlen, grpaddr, dbuf, dlen)
1145 unsigned char *daddr;
1146 unsigned long *daddrlen;
1147 unsigned char *saddr;
1148 unsigned long *saddrlen;
1149 unsigned long *grpaddr;
1150 unsigned char *dbuf;
1153 long buf [DLPI_MAXDLBUF];
1154 union DL_primitives *dlp;
1155 struct strbuf ctl, data;
1160 dlp = (
union DL_primitives *)buf;
1161 dlp -> unitdata_ind.dl_primitive = DL_UNITDATA_IND;
1163 ctl.maxlen = DLPI_MAXDLBUF;
1165 ctl.buf = (
char *)buf;
1169 data.buf = (
char *)dbuf;
1171 result = getmsg (fd, &ctl, &data, &flags);
1178 if (ctl.len < sizeof (dl_unitdata_ind_t) ||
1179 dlp -> unitdata_ind.dl_primitive != DL_UNITDATA_IND) {
1183 if (data.len <= 0) {
1190 (
char *)buf + dlp -> unitdata_ind.dl_src_addr_offset,
1191 dlp -> unitdata_ind.dl_src_addr_length);
1194 *saddrlen = dlp -> unitdata_ind.dl_src_addr_length;
1200 (
char *)buf + dlp -> unitdata_ind.dl_dest_addr_offset,
1201 dlp -> unitdata_ind.dl_dest_addr_length);
1204 *daddrlen = dlp -> unitdata_ind.dl_dest_addr_length;
1208 *grpaddr = dlp -> unitdata_ind.dl_group_address;
1218 static int expected (prim, dlp, msgflags)
1220 union DL_primitives *dlp;
1223 if (msgflags != RS_HIPRI) {
1228 if (dlp->dl_primitive != prim) {
1239 static int strgetmsg (fd, ctlp, datap, flagsp, caller)
1240 struct strbuf *ctlp, *datap;
1253 pfd.events = POLLPRI;
1259 now = time (&starttime);
1260 while (now <= starttime + DLPI_MAXWAIT) {
1261 to_msec = ((starttime + DLPI_MAXWAIT) - now) * 1000;
1262 count = poll (&pfd, 1, to_msec);
1267 }
else if (count < 0) {
1268 if (errno == EAGAIN || errno == EINTR) {
1284 if ((result = getmsg (fd, ctlp, datap, flagsp)) < 0) {
1291 if (result & (MORECTL|MOREDATA)) {
1298 if (ctlp -> len <
sizeof (
long)) {
1305 #if defined(USE_DLPI_SEND) 1326 isc_result_t status;
1333 if (status != ISC_R_SUCCESS)
1334 log_fatal (
"Can't register I/O handle for %s: %s",
1335 fbi ->
name, isc_result_totext (status));
1336 interface_dereference (&fbi,
MDL);
1344 long buf[DLPI_MAXDLBUF];
1345 union DL_primitives *dlp;
1347 dlp = (
union DL_primitives *)buf;
1352 sock = dlpiopen(name);
1354 log_fatal(
"Can't open DLPI device for %s: %m", name);
1361 if (dlpiinforeq(sock) < 0) {
1362 log_fatal(
"Can't request DLPI MAC type for %s: %m", name);
1364 if (dlpiinfoack(sock, (
char *)buf) < 0) {
1365 log_fatal(
"Can't get DLPI MAC type for %s: %m", name);
1367 switch (dlp->info_ack.dl_mac_type) {
1379 log_fatal(
"%s: unsupported DLPI MAC type %lu", name,
1380 (
unsigned long)dlp->info_ack.dl_mac_type);
1383 if (dlp->info_ack.dl_provider_style == DL_STYLE2) {
1388 unit = dlpiunit((
char *)name);
1390 if (dlpiattachreq(sock, unit) < 0 ||
1391 dlpiokack(sock, (
char *)buf) < 0) {
1392 log_fatal(
"Can't attach DLPI device for %s: %m",
1401 if (dlpiphysaddrreq(sock, DL_CURR_PHYS_ADDR) < 0) {
1402 log_fatal(
"Can't request DLPI hardware address for %s: %m",
1405 if (dlpiphysaddrack(sock, (
char *)buf) < 0) {
1406 log_fatal(
"Can't get DLPI hardware address for %s: %m",
1409 if (dlp->physaddr_ack.dl_addr_length <
sizeof(hw->
hbuf)) {
1411 (
char *)buf + dlp->physaddr_ack.dl_addr_offset,
1412 dlp->physaddr_ack.dl_addr_length);
1413 hw->
hlen = dlp->physaddr_ack.dl_addr_length + 1;
1416 (
char *)buf + dlp->physaddr_ack.dl_addr_offset,
1417 sizeof(hw->
hbuf)-1);
void if_register_send(struct interface_info *)
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 assemble_udp_ip_header(struct interface_info *, unsigned char *, unsigned *, u_int32_t, u_int32_t, u_int32_t, unsigned char *, unsigned)
int if_readsocket(omapi_object_t *h)
void if_reinitialize_send(struct interface_info *)
char * print_hw_addr(int htype, const int hlen, const unsigned char *data) const
ssize_t decode_udp_ip_header(struct interface_info *, unsigned char *, unsigned, struct sockaddr_in *, unsigned, unsigned *, int)
int int int log_debug(const char *,...) __attribute__((__format__(__printf__
int can_receive_unicast_unconfigured(struct interface_info *)
int setup_fallback(struct interface_info **fp, const char *file, int line)
int log_error(const char *,...) __attribute__((__format__(__printf__
void if_deregister_receive(struct interface_info *)
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__
void assemble_hw_header(struct interface_info *, unsigned char *, unsigned *, struct hardware *)
ssize_t send_packet(struct interface_info *, struct packet *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *)
struct hardware hw_address
int int log_info(const char *,...) __attribute__((__format__(__printf__
int quiet_interface_discovery
void if_register_fallback(struct interface_info *)
ssize_t send_fallback(struct interface_info *, struct packet *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *)
int supports_multiple_interfaces(struct interface_info *)
u_int8_t hbuf[HARDWARE_ADDR_LEN+1]
struct hardware anycast_mac_addr
ssize_t receive_packet(struct interface_info *, unsigned char *, size_t, struct sockaddr_in *, struct hardware *)
ssize_t decode_hw_header(struct interface_info *, unsigned char *, unsigned, struct hardware *)
void if_reinitialize_receive(struct interface_info *)
int can_unicast_without_arp(struct interface_info *)
void if_register_receive(struct interface_info *)
isc_result_t fallback_discard(omapi_object_t *)