91 #if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE) || \
92 defined(USE_DLPI_HWADDR)
94 # include <sys/ioctl.h>
95 # include <sys/time.h>
96 # include <sys/dlpi.h>
98 # ifdef USE_DLPI_PFMOD
99 # include <sys/pfmod.h>
104 # include <netinet/in_systm.h>
109 # ifdef USE_DLPI_PFMOD
111 # define DLPI_MODNAME "DLPI+RAW+PFMOD"
113 # define DLPI_MODNAME "DLPI+PFMOD"
117 # define DLPI_MODNAME "DLPI+RAW"
119 # define DLPI_MODNAME "DLPI"
124 # define ABS(x) ((x) >= 0 ? (x) : 0-(x))
127 #if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW)
128 static int strioctl (
int fd,
int cmd,
int timeout,
int len,
char *dp);
131 #define DLPI_MAXDLBUF 8192
132 #define DLPI_MAXDLADDR 1024
133 #define DLPI_DEVDIR "/dev/"
135 static int dlpiopen(
const char *ifname);
136 static int dlpiunit (
char *ifname);
137 static int dlpiinforeq (
int fd);
138 static int dlpiphysaddrreq (
int fd,
unsigned long addrtype);
139 static int dlpiattachreq (
int fd,
unsigned long ppa);
140 static int dlpibindreq (
int fd,
unsigned long sap,
unsigned long max_conind,
141 unsigned long service_mode,
unsigned long conn_mgmt,
142 unsigned long xidtest);
143 #if defined(UNUSED_DLPI_INTERFACE)
147 static int dlpidetachreq (
int fd);
148 static int dlpiunbindreq (
int fd);
150 static int dlpiokack (
int fd,
char *bufp);
151 static int dlpiinfoack (
int fd,
char *bufp);
152 static int dlpiphysaddrack (
int fd,
char *bufp);
153 static int dlpibindack (
int fd,
char *bufp);
154 #if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
158 static int dlpiunitdatareq (
int fd,
unsigned char *addr,
int addrlen,
159 unsigned long minpri,
unsigned long maxpri,
160 unsigned char *data,
int datalen);
161 static int dlpiunitdataind (
int fd,
162 unsigned char *dstaddr,
163 unsigned long *dstaddrlen,
164 unsigned char *srcaddr,
165 unsigned long *srcaddrlen,
166 unsigned long *grpaddr,
170 static int expected (
unsigned long prim,
union DL_primitives *dlp,
172 static int strgetmsg (
int fd,
struct strbuf *ctlp,
struct strbuf *datap,
173 int *flagsp,
char *caller);
185 #ifdef USE_DLPI_RECEIVE
196 int if_register_dlpi (info)
201 long buf [DLPI_MAXDLBUF];
202 union DL_primitives *dlp;
204 dlp = (
union DL_primitives *)buf;
207 if ((sock = dlpiopen (info -> name)) < 0) {
208 log_fatal (
"Can't open DLPI device for %s: %m", info -> name);
215 if (dlpiinforeq(sock) < 0 || dlpiinfoack(sock, (
char *)buf) < 0) {
216 log_fatal (
"Can't get DLPI MAC type for %s: %m", info -> name);
218 switch (dlp -> info_ack.dl_mac_type) {
231 log_fatal(
"%s: unsupported DLPI MAC type %lu", info->name,
232 (
unsigned long)dlp->info_ack.dl_mac_type);
240 info -> dlpi_sap_length = dlp -> info_ack.dl_sap_length;
241 info -> dlpi_broadcast_addr.hlen =
242 dlp -> info_ack.dl_brdcst_addr_length;
243 memcpy (info -> dlpi_broadcast_addr.hbuf,
244 (
char *)dlp + dlp -> info_ack.dl_brdcst_addr_offset,
245 dlp -> info_ack.dl_brdcst_addr_length);
248 if (dlp -> info_ack.dl_provider_style == DL_STYLE2) {
253 unit = dlpiunit (info -> name);
255 if (dlpiattachreq (sock, unit) < 0
256 || dlpiokack (sock, (
char *)buf) < 0) {
257 log_fatal (
"Can't attach DLPI device for %s: %m", info -> name);
264 if (dlpibindreq (sock,
ETHERTYPE_IP, 0, DL_CLDLS, 0, 0) < 0
265 || dlpibindack (sock, (
char *)buf) < 0) {
266 log_fatal (
"Can't bind DLPI device for %s: %m", info -> name);
273 if (dlpiphysaddrreq (sock, DL_CURR_PHYS_ADDR) < 0
274 || dlpiphysaddrack (sock, (
char *)buf) < 0) {
275 log_fatal (
"Can't get DLPI hardware address for %s: %m",
279 info -> hw_address.hlen = dlp -> physaddr_ack.dl_addr_length + 1;
280 memcpy (&info -> hw_address.hbuf [1],
281 (
char *)buf + dlp -> physaddr_ack.dl_addr_offset,
282 dlp -> physaddr_ack.dl_addr_length);
285 if (strioctl (sock, DLIOCRAW, INFTIM, 0, 0) < 0) {
286 log_fatal (
"Can't set DLPI RAW mode for %s: %m",
291 #ifdef USE_DLPI_PFMOD
292 if (ioctl (sock, I_PUSH,
"pfmod") < 0) {
293 log_fatal (
"Can't push packet filter onto DLPI for %s: %m",
301 #if defined(USE_DLPI_PFMOD) || defined(USE_DLPI_RAW)
303 strioctl (fd, cmd,
timeout, len, dp)
314 sio.ic_timout = timeout;
318 if ((rslt = ioctl (fd, I_STR, &sio)) < 0) {
332 #ifndef USE_DLPI_RECEIVE
333 # ifdef USE_DLPI_PFMOD
334 struct packetfilt pf;
337 info -> wfdesc = if_register_dlpi (info);
339 # ifdef USE_DLPI_PFMOD
343 pf.Pf_Filter [0] = ENF_PUSHZERO;
346 if (strioctl (info -> wfdesc, PFIOCSETF, INFTIM,
347 sizeof (pf), (
char *)&pf) < 0) {
348 log_fatal (
"Can't set PFMOD send filter on %s: %m", info -> name);
357 info -> wfdesc = info -> rfdesc;
361 log_info (
"Sending on DLPI/%s/%s%s%s",
364 info -> hw_address.hlen - 1,
365 &info -> hw_address.hbuf [1]),
370 #ifdef DLPI_FIRST_SEND_WAIT
372 # ifdef USE_DLPI_RECEIVE
373 sleep (DLPI_FIRST_SEND_WAIT - (DLPI_FIRST_SEND_WAIT / 2));
375 sleep (DLPI_FIRST_SEND_WAIT);
385 #ifndef USE_DLPI_RECEIVE
386 close (info -> wfdesc);
391 log_info (
"Disabling output on DLPI/%s/%s%s%s",
394 info -> hw_address.hlen - 1,
395 &info -> hw_address.hbuf [1]),
402 #ifdef USE_DLPI_RECEIVE
410 #ifdef USE_DLPI_PFMOD
411 struct packetfilt pf;
417 info -> rfdesc = if_register_dlpi (info);
419 #ifdef USE_DLPI_PFMOD
427 #if defined (USE_DLPI_RAW)
428 # define ETHER_H_PREFIX (14)
433 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + (offset / 2);
434 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_CAND;
435 pf.Pf_Filter [pf.Pf_FilterLen++] = htons (
ETHERTYPE_IP);
437 # define ETHER_H_PREFIX (0)
452 offset = ETHER_H_PREFIX +
sizeof (iphdr) +
sizeof (u_int16_t);
453 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + (offset / 2);
454 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_CAND;
455 pf.Pf_Filter [pf.Pf_FilterLen++] =
local_port;
461 offset = ETHER_H_PREFIX + ((u_int8_t *)&(iphdr.ip_p) - (u_int8_t *)&iphdr);
462 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHWORD + (offset / 2);
463 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_AND;
464 pf.Pf_Filter [pf.Pf_FilterLen++] = htons (0x00FF);
465 pf.Pf_Filter [pf.Pf_FilterLen++] = ENF_PUSHLIT | ENF_CAND;
466 pf.Pf_Filter [pf.Pf_FilterLen++] = htons (IPPROTO_UDP);
469 if (strioctl (info -> rfdesc, PFIOCSETF, INFTIM,
470 sizeof (pf), (
char *)&pf) < 0) {
471 log_fatal (
"Can't set PFMOD receive filter on %s: %m", info -> name);
476 log_info (
"Listening on DLPI/%s/%s%s%s",
479 info -> hw_address.hlen - 1,
480 &info -> hw_address.hbuf [1]),
485 #ifdef DLPI_FIRST_SEND_WAIT
487 # ifdef USE_DLPI_SEND
488 sleep (DLPI_FIRST_SEND_WAIT / 2);
490 sleep (DLPI_FIRST_SEND_WAIT);
500 #ifndef USE_DLPI_SEND
501 close (info -> rfdesc);
506 log_info (
"Disabling input on DLPI/%s/%s%s%s",
509 info -> hw_address.hlen - 1,
510 &info -> hw_address.hbuf [1]),
524 struct sockaddr_in *to;
531 double ih [1536 /
sizeof (double)];
532 unsigned char *dbuf = (
unsigned char *)ih;
534 unsigned char dstaddr [DLPI_MAXDLADDR];
538 if (!strcmp (interface -> name,
"fallback"))
542 if (hto == NULL && interface->anycast_mac_addr.
hlen)
543 hto = &interface->anycast_mac_addr;
550 if (dbuflen >
sizeof hh)
551 log_fatal (
"send_packet: hh buffer too small.\n");
553 memcpy (dbuf + fudge, (
unsigned char *)hh, dbuflen);
557 to -> sin_addr.s_addr, to -> sin_port,
558 (
unsigned char *)raw, len);
561 memcpy (dbuf + dbuflen, raw, len);
565 result = write (interface -> wfdesc, dbuf + fudge, dbuflen - fudge);
578 unsigned char phys [DLPI_MAXDLADDR];
579 unsigned char sap [4];
580 int sap_len =
interface -> dlpi_sap_length;
581 int phys_len =
interface -> hw_address.hlen - 1;
584 memset (sap, 0,
sizeof (sap));
585 # if (BYTE_ORDER == LITTLE_ENDIAN)
593 if (hto && hto -> hlen == interface -> hw_address.
hlen)
594 memcpy ( phys, (
char *) &hto -> hbuf [1], phys_len);
596 memcpy ( phys, interface -> dlpi_broadcast_addr.hbuf,
597 interface -> dlpi_broadcast_addr.hlen);
600 memcpy ( dstaddr, phys, phys_len);
601 memcpy ( (
char *) &dstaddr [phys_len], sap, ABS (sap_len));
604 memcpy ( dstaddr, (
void *) sap, sap_len);
605 memcpy ( (
char *) &dstaddr [sap_len], phys, phys_len);
607 addrlen = phys_len + ABS (sap_len);
610 result = dlpiunitdatareq (interface -> wfdesc, dstaddr, addrlen,
611 0, 0, dbuf, dbuflen);
619 #ifdef USE_DLPI_RECEIVE
624 struct sockaddr_in *from;
627 unsigned char dbuf [1536];
628 unsigned char srcaddr [DLPI_MAXDLADDR];
629 unsigned long srcaddrlen;
636 length = read (interface -> rfdesc, dbuf,
sizeof (dbuf));
638 length = dlpiunitdataind (interface -> rfdesc, (
unsigned char *)NULL,
639 (
unsigned long *)NULL, srcaddr, &srcaddrlen,
640 (
unsigned long *)NULL, dbuf,
sizeof (dbuf));
648 # if !defined (USE_DLPI_RAW)
657 int sap_len =
interface -> dlpi_sap_length;
658 int phys_len =
interface -> hw_address.hlen - 1;
660 if (hfrom && (srcaddrlen == ABS (sap_len) + phys_len )) {
661 hfrom -> hbuf [0] =
interface -> hw_address.hbuf [0];
662 hfrom -> hlen =
interface -> hw_address.hlen;
665 memcpy ((
char *) &hfrom -> hbuf [1], srcaddr, phys_len);
668 memcpy((
char *)&hfrom->
hbuf[1], srcaddr + sap_len, phys_len);
672 memset (hfrom,
'\0',
sizeof *hfrom);
694 from, length, &paylen, 1);
715 memcpy(buf, &dbuf [bufix], paylen);
738 #define DLPI_MAXWAIT 15
745 static int dlpiunit (ifname)
759 while ((*(cp-1) >=
'0' && *(cp-1) <=
'9') || *(cp - 1) ==
':') cp--;
763 while (*cp >=
'0' && *cp <=
'9') {
765 unit += (*cp++ -
'0');
775 dlpiopen(
const char *ifname) {
785 if (*ifname ==
'/') {
789 memcpy (devname, DLPI_DEVDIR, strlen (DLPI_DEVDIR));
790 dp = &devname [strlen (DLPI_DEVDIR)];
798 while ((*(ep - 1) >=
'0' && *(ep - 1) <=
'9') || *(ep - 1) ==
':')
807 return open (devname, O_RDWR | O_CLOEXEC, 0);
814 static int dlpiinforeq (fd)
817 dl_info_req_t info_req;
821 info_req.dl_primitive = DL_INFO_REQ;
824 ctl.len =
sizeof (info_req);
825 ctl.buf = (
char *)&info_req;
829 return putmsg (fd, &ctl, (
struct strbuf *)NULL, flags);
835 static int dlpiphysaddrreq (fd, addrtype)
837 unsigned long addrtype;
839 dl_phys_addr_req_t physaddr_req;
843 physaddr_req.dl_primitive = DL_PHYS_ADDR_REQ;
844 physaddr_req.dl_addr_type = addrtype;
847 ctl.len =
sizeof (physaddr_req);
848 ctl.buf = (
char *)&physaddr_req;
852 return putmsg (fd, &ctl, (
struct strbuf *)NULL, flags);
858 static int dlpiattachreq (fd, ppa)
862 dl_attach_req_t attach_req;
866 attach_req.dl_primitive = DL_ATTACH_REQ;
867 attach_req.dl_ppa = ppa;
870 ctl.len =
sizeof (attach_req);
871 ctl.buf = (
char *)&attach_req;
875 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
881 static int dlpibindreq (fd, sap, max_conind, service_mode, conn_mgmt, xidtest)
883 unsigned long max_conind;
884 unsigned long service_mode;
885 unsigned long conn_mgmt;
886 unsigned long xidtest;
889 dl_bind_req_t bind_req;
893 bind_req.dl_primitive = DL_BIND_REQ;
894 bind_req.dl_sap = sap;
895 bind_req.dl_max_conind = max_conind;
896 bind_req.dl_service_mode = service_mode;
897 bind_req.dl_conn_mgmt = conn_mgmt;
898 bind_req.dl_xidtest_flg = xidtest;
901 ctl.len =
sizeof (bind_req);
902 ctl.buf = (
char *)&bind_req;
906 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
909 #if defined(UNUSED_DLPI_INTERFACE)
915 static int dlpiunbindreq (fd)
918 dl_unbind_req_t unbind_req;
922 unbind_req.dl_primitive = DL_UNBIND_REQ;
925 ctl.len =
sizeof (unbind_req);
926 ctl.buf = (
char *)&unbind_req;
930 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
939 static int dlpidetachreq (fd)
942 dl_detach_req_t detach_req;
946 detach_req.dl_primitive = DL_DETACH_REQ;
949 ctl.len =
sizeof (detach_req);
950 ctl.buf = (
char *)&detach_req;
954 return putmsg (fd, &ctl, (
struct strbuf*)NULL, flags);
962 static int dlpibindack (fd, bufp)
966 union DL_primitives *dlp;
970 ctl.maxlen = DLPI_MAXDLBUF;
974 if (strgetmsg (fd, &ctl,
975 (
struct strbuf*)NULL, &flags,
"dlpibindack") < 0) {
979 dlp = (
union DL_primitives *)ctl.buf;
981 if (expected (DL_BIND_ACK, dlp, flags) == -1) {
985 if (ctl.len < sizeof (dl_bind_ack_t)) {
996 static int dlpiokack (fd, bufp)
1000 union DL_primitives *dlp;
1004 ctl.maxlen = DLPI_MAXDLBUF;
1008 if (strgetmsg (fd, &ctl,
1009 (
struct strbuf*)NULL, &flags,
"dlpiokack") < 0) {
1013 dlp = (
union DL_primitives *)ctl.buf;
1015 if (expected (DL_OK_ACK, dlp, flags) == -1) {
1019 if (ctl.len < sizeof (dl_ok_ack_t)) {
1030 static int dlpiinfoack (fd, bufp)
1034 union DL_primitives *dlp;
1038 ctl.maxlen = DLPI_MAXDLBUF;
1042 if (strgetmsg (fd, &ctl, (
struct strbuf *)NULL, &flags,
1043 "dlpiinfoack") < 0) {
1047 dlp = (
union DL_primitives *) ctl.buf;
1049 if (expected (DL_INFO_ACK, dlp, flags) == -1) {
1053 if (ctl.len < sizeof (dl_info_ack_t)) {
1064 int dlpiphysaddrack (fd, bufp)
1068 union DL_primitives *dlp;
1072 ctl.maxlen = DLPI_MAXDLBUF;
1076 if (strgetmsg (fd, &ctl, (
struct strbuf *)NULL, &flags,
1077 "dlpiphysaddrack") < 0) {
1081 dlp = (
union DL_primitives *)ctl.buf;
1083 if (expected (DL_PHYS_ADDR_ACK, dlp, flags) == -1) {
1087 if (ctl.len < sizeof (dl_phys_addr_ack_t)) {
1095 #if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
1096 int dlpiunitdatareq (fd, addr, addrlen, minpri, maxpri, dbuf, dbuflen)
1098 unsigned char *addr;
1100 unsigned long minpri;
1101 unsigned long maxpri;
1102 unsigned char *dbuf;
1105 long buf [DLPI_MAXDLBUF];
1106 union DL_primitives *dlp;
1107 struct strbuf ctl, data;
1110 dlp = (
union DL_primitives *)buf;
1111 dlp -> unitdata_req.dl_primitive = DL_UNITDATA_REQ;
1112 dlp -> unitdata_req.dl_dest_addr_length = addrlen;
1113 dlp -> unitdata_req.dl_dest_addr_offset =
sizeof (dl_unitdata_req_t);
1114 dlp -> unitdata_req.dl_priority.dl_min = minpri;
1115 dlp -> unitdata_req.dl_priority.dl_max = maxpri;
1118 memcpy ((
char *)buf + dlp -> unitdata_req.dl_dest_addr_offset,
1122 ctl.len = dlp -> unitdata_req.dl_dest_addr_offset + addrlen;
1123 ctl.buf = (
char *)buf;
1126 data.buf = (
char *)dbuf;
1130 return putmsg (fd, &ctl, &data, 0);
1133 static int dlpiunitdataind (fd, daddr, daddrlen,
1134 saddr, saddrlen, grpaddr, dbuf, dlen)
1136 unsigned char *daddr;
1137 unsigned long *daddrlen;
1138 unsigned char *saddr;
1139 unsigned long *saddrlen;
1140 unsigned long *grpaddr;
1141 unsigned char *dbuf;
1144 long buf [DLPI_MAXDLBUF];
1145 union DL_primitives *dlp;
1146 struct strbuf ctl, data;
1151 dlp = (
union DL_primitives *)buf;
1152 dlp -> unitdata_ind.dl_primitive = DL_UNITDATA_IND;
1154 ctl.maxlen = DLPI_MAXDLBUF;
1156 ctl.buf = (
char *)buf;
1160 data.buf = (
char *)dbuf;
1162 result = getmsg (fd, &ctl, &data, &flags);
1169 if (ctl.len < sizeof (dl_unitdata_ind_t) ||
1170 dlp -> unitdata_ind.dl_primitive != DL_UNITDATA_IND) {
1174 if (data.len <= 0) {
1181 (
char *)buf + dlp -> unitdata_ind.dl_src_addr_offset,
1182 dlp -> unitdata_ind.dl_src_addr_length);
1185 *saddrlen = dlp -> unitdata_ind.dl_src_addr_length;
1191 (
char *)buf + dlp -> unitdata_ind.dl_dest_addr_offset,
1192 dlp -> unitdata_ind.dl_dest_addr_length);
1195 *daddrlen = dlp -> unitdata_ind.dl_dest_addr_length;
1199 *grpaddr = dlp -> unitdata_ind.dl_group_address;
1209 static int expected (prim, dlp, msgflags)
1211 union DL_primitives *dlp;
1214 if (msgflags != RS_HIPRI) {
1219 if (dlp->dl_primitive != prim) {
1230 static int strgetmsg (fd, ctlp, datap, flagsp, caller)
1231 struct strbuf *ctlp, *datap;
1244 pfd.events = POLLPRI;
1250 now = time (&starttime);
1251 while (now <= starttime + DLPI_MAXWAIT) {
1252 to_msec = ((starttime + DLPI_MAXWAIT) - now) * 1000;
1253 count = poll (&pfd, 1, to_msec);
1258 }
else if (count < 0) {
1259 if (errno == EAGAIN || errno == EINTR) {
1275 if ((result = getmsg (fd, ctlp, datap, flagsp)) < 0) {
1282 if (result & (MORECTL|MOREDATA)) {
1289 if (ctlp -> len <
sizeof (
long)) {
1296 #if defined(USE_DLPI_SEND)
1317 isc_result_t status;
1324 if (status != ISC_R_SUCCESS)
1325 log_fatal (
"Can't register I/O handle for %s: %s",
1326 fbi ->
name, isc_result_totext (status));
1327 interface_dereference (&fbi,
MDL);
1335 long buf[DLPI_MAXDLBUF];
1336 union DL_primitives *dlp;
1338 dlp = (
union DL_primitives *)buf;
1343 sock = dlpiopen(name);
1345 log_fatal(
"Can't open DLPI device for %s: %m", name);
1352 if (dlpiinforeq(sock) < 0) {
1353 log_fatal(
"Can't request DLPI MAC type for %s: %m", name);
1355 if (dlpiinfoack(sock, (
char *)buf) < 0) {
1356 log_fatal(
"Can't get DLPI MAC type for %s: %m", name);
1358 switch (dlp->info_ack.dl_mac_type) {
1370 log_fatal(
"%s: unsupported DLPI MAC type %lu", name,
1371 (
unsigned long)dlp->info_ack.dl_mac_type);
1374 if (dlp->info_ack.dl_provider_style == DL_STYLE2) {
1379 unit = dlpiunit((
char *)name);
1381 if (dlpiattachreq(sock, unit) < 0 ||
1382 dlpiokack(sock, (
char *)buf) < 0) {
1383 log_fatal(
"Can't attach DLPI device for %s: %m",
1392 if (dlpiphysaddrreq(sock, DL_CURR_PHYS_ADDR) < 0) {
1393 log_fatal(
"Can't request DLPI hardware address for %s: %m",
1396 if (dlpiphysaddrack(sock, (
char *)buf) < 0) {
1397 log_fatal(
"Can't get DLPI hardware address for %s: %m",
1400 if (dlp->physaddr_ack.dl_addr_length <
sizeof(hw->
hbuf)) {
1402 (
char *)buf + dlp->physaddr_ack.dl_addr_offset,
1403 dlp->physaddr_ack.dl_addr_length);
1404 hw->
hlen = dlp->physaddr_ack.dl_addr_length + 1;
1407 (
char *)buf + dlp->physaddr_ack.dl_addr_offset,
1408 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 *)
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]
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 *)