Lines Matching refs:ebuf
461 char *ebuf)
485 strlcpy(ebuf, pcap_strerror(errno), PCAP_ERRBUF_SIZE);
506 cp = split_dname(dname, &ppa, ebuf);
524 snprintf(ebuf, PCAP_ERRBUF_SIZE,
548 ppa = get_dlpi_ppa(p->fd, dname, ppa, ebuf);
568 cp = split_dname(dname, &ppa, ebuf);
582 snprintf(ebuf
605 snprintf(ebuf, PCAP_ERRBUF_SIZE,
608 snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s: %s",
623 if (dlinforeq(p->fd, ebuf) < 0 ||
624 dlinfoack(p->fd, (char *)buf, ebuf) < 0)
632 if (dl_doattach(p->fd, ppa, ebuf) < 0)
636 if (dl_doattach(p->send_fd, ppa, ebuf) < 0)
666 if ((dlbindreq(p->fd, 1537, ebuf) < 0 &&
667 dlbindreq(p->fd, 2, ebuf) < 0) ||
668 dlbindack(p->fd, (char *)buf, ebuf, NULL) < 0)
674 if (dl_dohpuxbind(p->fd, ebuf) < 0)
682 if (dl_dohpuxbind(p->send_fd, ebuf) < 0)
690 if (dlbindreq(p->fd, 0, ebuf) < 0 ||
691 dlbindack(p->fd, (char *)buf, ebuf, NULL) < 0)
705 snprintf(ebuf, PCAP_ERRBUF_SIZE, "A_PROMISCON_REQ: %s",
715 if (dlpromisconreq(p->fd, DL_PROMISC_PHYS, ebuf) < 0 ||
716 dlokack(p->fd, "promisc_phys", (char *)buf, ebuf) < 0)
725 if (dlpromisconreq(p->fd, DL_PROMISC_MULTI, ebuf) < 0 ||
726 dlokack(p->fd, "promisc_multi", (char *)buf, ebuf) < 0)
728 "WARNING: DL_PROMISC_MULTI failed (%s)\n", ebuf);
744 (dlpromisconreq(p->fd, DL_PROMISC_SAP, ebuf) < 0 ||
745 dlokack(p->fd, "promisc_sap", (char *)buf, ebuf) < 0)) {
749 "WARNING: DL_PROMISC_SAP failed (%s)\n", ebuf);
760 if (dl_dohpuxbind(p->fd, ebuf) < 0)
773 if (dl_dohpuxbind(p->send_fd, ebuf) < 0)
783 if (dlinforeq(p->fd, ebuf) < 0 ||
784 dlinfoack(p->fd, (char *)buf, ebuf) < 0)
836 snprintf(ebuf, PCAP_ERRBUF_SIZE, "unknown mac type %lu",
847 snprintf(ebuf, PCAP_ERRBUF_SIZE, "DLIOCRAW: %s",
858 snprintf(ebuf, PCAP_ERRBUF_SIZE, "I_PUSH bufmod: %s",
886 snprintf(ebuf, PCAP_ERRBUF_SIZE, "SBIOCSSNAP: %s",
900 snprintf(ebuf, PCAP_ERRBUF_SIZE, "SBIOCSTIME: %s",
912 snprintf(ebuf, PCAP_ERRBUF_SIZE, "SBIOCSCHUNKP: %s",
922 snprintf(ebuf, PCAP_ERRBUF_SIZE, "FLUSHR: %s",
931 strlcpy(ebuf, pcap_strerror(errno), PCAP_ERRBUF_SIZE);
972 * Returns NULL on error, and fills "ebuf" with an error message.
975 split_dname(char *device, int *unitp, char *ebuf)
986 snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s missing unit number",
998 snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s bad unit number", device);
1002 snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s unit number too large",
1007 snprintf(ebuf, PCAP_ERRBUF_SIZE, "%s unit number is negative",
1016 dl_doattach(int fd, int ppa, char *ebuf)
1020 if (dlattachreq(fd, ppa, ebuf) < 0 ||
1021 dlokack(fd, "attach", (char *)buf, ebuf) < 0)
1028 dl_dohpuxbind(int fd, char *ebuf)
1043 if (dlbindreq(fd, hpsap, ebuf) < 0)
1045 if (dlbindack(fd, (char *)buf, ebuf, &uerror) >= 0)
1052 * dlbindack() has already filled in ebuf for
1060 * somebody else is using that SAP. Clear ebuf so
1064 *ebuf = '\0';
1067 strlcpy(ebuf,
1121 send_request(int fd, char *ptr, int len, char *what, char *ebuf)
1132 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1141 recv_ack(int fd, int size, const char *what, char *bufp, char *ebuf, int *uerror)
1160 snprintf(ebuf, PCAP_ERRBUF_SIZE, "recv_ack: %s getmsg: %s",
1183 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1189 snprintf(ebuf, PCAP_ERRBUF_SIZE, "recv_ack: %s: %s",
1196 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1203 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1416 dlattachreq(int fd, bpf_u_int32 ppa, char *ebuf)
1423 return (send_request(fd, (char *)&req, sizeof(req), "attach", ebuf));
1427 dlbindreq(int fd, bpf_u_int32 sap, char *ebuf)
1443 return (send_request(fd, (char *)&req, sizeof(req), "bind", ebuf));
1447 dlbindack(int fd, char *bufp, char *ebuf, int *uerror)
1450 return (recv_ack(fd, DL_BIND_ACK_SIZE, "bind", bufp, ebuf, uerror));
1454 dlpromisconreq(int fd, bpf_u_int32 level, char *ebuf)
1461 return (send_request(fd, (char *)&req, sizeof(req), "promiscon", ebuf));
1465 dlokack(int fd, const char *what, char *bufp, char *ebuf)
1468 return (recv_ack(fd, DL_OK_ACK_SIZE, what, bufp, ebuf, NULL));
1473 dlinforeq(int fd, char *ebuf)
1479 return (send_request(fd, (char *)&req, sizeof(req), "info", ebuf));
1483 dlinfoack(int fd, char *bufp, char *ebuf)
1486 return (recv_ack(fd, DL_INFO_ACK_SIZE, "info", bufp, ebuf, NULL));
1613 register char *ebuf)
1633 if (send_request(fd, (char *)&req, sizeof(req), "hpppa", ebuf) < 0)
1655 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1662 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1669 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1677 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1686 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1692 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1751 snprintf(ebuf, PCAP_ERRBUF_SIZE, "stat: %s: %s",
1768 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1773 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1800 register char *ebuf)
1812 snprintf(ebuf, PCAP_ERRBUF_SIZE, "nlist %s failed",
1817 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1824 snprintf(ebuf, PCAP_ERRBUF_SIZE, "kmem open: %s",
1829 &addr, sizeof(addr), ebuf) < 0) {
1835 &ifnet, sizeof(ifnet), ebuf) < 0 ||
1837 if_name, sizeof(ifnet.if_name), ebuf) < 0) {
1846 snprintf(ebuf, PCAP_ERRBUF_SIZE, "Can't find %s", ifname);
1852 register void *buf, register u_int len, register char *ebuf)
1857 snprintf(ebuf, PCAP_ERRBUF_SIZE, "lseek: %s",
1863 snprintf(ebuf, PCAP_ERRBUF_SIZE, "read: %s",
1867 snprintf(ebuf, PCAP_ERRBUF_SIZE, "short read (%d != %d)", cc,