it if IW_MODE_MONITOR isn't defined.
#ifndef lint
static const char rcsid[] _U_ =
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.161 2008-11-19 17:36:52 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.162 2008-12-14 20:03:59 guy Exp $ (LBL)";
static int iface_get_arptype(int fd, const char *device, char *ebuf);
#ifdef HAVE_PF_PACKET_SOCKETS
static int iface_bind(int fd, int ifindex, char *ebuf);
static int iface_get_arptype(int fd, const char *device, char *ebuf);
#ifdef HAVE_PF_PACKET_SOCKETS
static int iface_bind(int fd, int ifindex, char *ebuf);
static int has_wext(int sock_fd, const char *device, char *ebuf);
static int has_wext(int sock_fd, const char *device, char *ebuf);
+#endif /* IW_MODE_MONITOR */
static int enter_rfmon_mode_wext(pcap_t *handle, int sock_fd,
const char *device);
static int enter_rfmon_mode_wext(pcap_t *handle, int sock_fd,
const char *device);
+#endif /* HAVE_PF_PACKET_SOCKETS */
static int iface_bind_old(int fd, const char *device, char *ebuf);
#ifdef SO_ATTACH_FILTER
static int iface_bind_old(int fd, const char *device, char *ebuf);
#ifdef SO_ATTACH_FILTER
/*
* Check whether the device supports the Wireless Extensions.
* Returns 1 if it does, 0 if it doesn't, PCAP_ERROR_NO_SUCH_DEVICE
/*
* Check whether the device supports the Wireless Extensions.
* Returns 1 if it does, 0 if it doesn't, PCAP_ERROR_NO_SUCH_DEVICE
static int
has_wext(int sock_fd, const char *device, char *ebuf)
{
static int
has_wext(int sock_fd, const char *device, char *ebuf)
{
struct iwreq ireq;
strncpy(ireq.ifr_ifrn.ifrn_name, device,
struct iwreq ireq;
strncpy(ireq.ifr_ifrn.ifrn_name, device,
"%s: SIOCGIWPRIV: %s", device, pcap_strerror(errno));
if (errno == ENODEV)
return PCAP_ERROR_NO_SUCH_DEVICE;
"%s: SIOCGIWPRIV: %s", device, pcap_strerror(errno));
if (errno == ENODEV)
return PCAP_ERROR_NO_SUCH_DEVICE;
/*
* Per me si va ne la citta dolente,
/*
* Per me si va ne la citta dolente,