Lines Matching refs:ebuf
205 static int iface_get_id(int fd, const char *device, char *ebuf);
207 static int iface_get_mtu(int fd, const char *device, char *ebuf);
208 static int iface_get_arptype(int fd, const char *device, char *ebuf);
210 static int iface_bind(int fd, int ifindex, char *ebuf);
212 static int iface_bind_old(int fd, const char *device, char *ebuf);
238 char *ebuf)
248 return dag_open_live(device, snaplen, promisc, to_ms, ebuf);
254 return septel_open_live(device, snaplen, promisc, to_ms, ebuf);
262 snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc: %s",
283 snprintf(ebuf, PCAP_ERRBUF_SIZE,
291 snprintf(ebuf, PCAP_ERRBUF_SIZE, "strdup: %s",
307 if ((err = live_open_new(handle, device, promisc, to_ms, ebuf)) == 1)
311 if (live_open_old(handle, device, promisc, to_ms, ebuf))
317 * up and report our failure (ebuf is expected to be
378 mtu = iface_get_mtu(handle->fd, device, ebuf);
414 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1389 int to_ms, char *ebuf)
1410 snprintf(ebuf, PCAP_ERRBUF_SIZE, "socket: %s",
1429 handle->md.lo_ifindex = iface_get_id(sock_fd, "lo", ebuf);
1446 arptype = iface_get_arptype(sock_fd, device, ebuf);
1469 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1476 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1500 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1514 handle->md.ifindex = iface_get_id(sock_fd, device, ebuf);
1519 ebuf)) < 0) {
1569 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1596 strncpy(ebuf,
1605 * Return the index of the given device name. Fill ebuf and return
1609 iface_get_id(int fd, const char *device, char *ebuf)
1617 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1629 iface_bind(int fd, int ifindex, char *ebuf)
1641 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1649 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1655 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1779 int to_ms, char *ebuf)
1789 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1803 strncpy(ebuf, "pcap_open_live: The \"any\" device isn't supported on 2.0[.x]-kernel systems",
1807 if (iface_bind_old(handle->fd, device, ebuf) == -1)
1813 arptype = iface_get_arptype(handle->fd, device, ebuf);
1823 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1834 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1859 strncpy(ebuf, "atexit failed",
1868 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1903 iface_bind_old(int fd, const char *device, char *ebuf)
1912 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1920 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1926 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1941 iface_get_mtu(int fd, const char *device, char *ebuf)
1952 snprintf(ebuf, PCAP_ERRBUF_SIZE,
1964 iface_get_arptype(int fd, const char *device, char *ebuf)
1972 snprintf(ebuf, PCAP_ERRBUF_SIZE,