• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/libpcap-42/libpcap/

Lines Matching defs:sock_fd

368 static int	has_wext(int sock_fd, const char *device, char *ebuf);
370 static int enter_rfmon_mode(pcap_t *handle, int sock_fd,
657 add_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state,
664 ifindex = iface_get_id(sock_fd, device, handle->errbuf);
753 del_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state,
760 ifindex = iface_get_id(sock_fd, mondevice, handle->errbuf);
807 enter_rfmon_mode_mac80211(pcap_t *handle, int sock_fd, const char *device)
844 ret = add_mon_if(handle, sock_fd, &nlstate, device, mondevice);
892 if (ioctl(sock_fd, SIOCGIFFLAGS, &ifr) == -1) {
896 del_mon_if(handle, sock_fd, &nlstate, device,
902 if (ioctl(sock_fd, SIOCSIFFLAGS, &ifr) == -1) {
906 del_mon_if(handle, sock_fd, &nlstate, device,
940 int sock_fd;
983 sock_fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
984 if (sock_fd == -1) {
996 if (ioctl(sock_fd, SIOCGIWMODE, &ireq) != -1) {
1000 close(sock_fd);
1007 close(sock_fd);
1010 close(sock_fd);
2886 int sock_fd = -1, arptype;
2899 sock_fd = is_any_device ?
2903 if (sock_fd == -1) {
2942 handle->md.lo_ifindex = iface_get_id(sock_fd, "lo", handle->errbuf);
2966 err = enter_rfmon_mode(handle, sock_fd, device);
2969 close(sock_fd);
2977 close(sock_fd);
2990 arptype = iface_get_arptype(sock_fd, device, handle->errbuf);
2992 close(sock_fd);
3012 if (close(sock_fd) == -1) {
3017 sock_fd = socket(PF_PACKET, SOCK_DGRAM,
3019 if (sock_fd == -1) {
3073 handle->md.ifindex = iface_get_id(sock_fd, device,
3076 close(sock_fd);
3080 if ((err = iface_bind(sock_fd, handle->md.ifindex,
3082 close(sock_fd);
3141 if (setsockopt(sock_fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP,
3145 close(sock_fd);
3154 if (setsockopt(sock_fd, SOL_PACKET, PACKET_AUXDATA, &val,
3158 close(sock_fd);
3185 handle->fd = sock_fd;
4213 has_wext(int sock_fd, const char *device, char *ebuf)
4220 if (ioctl(sock_fd, SIOCGIWNAME, &ireq) >= 0)
4259 enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device)
4333 err = has_wext(sock_fd, device, handle->errbuf);
4360 if (ioctl(sock_fd, SIOCGIWPRIV, &ireq) != -1) {
4390 if (ioctl(sock_fd, SIOCGIWPRIV, &ireq) == -1) {
4560 if (ioctl(sock_fd, SIOCGIWMODE, &ireq) == -1) {
4620 if (ioctl(sock_fd, cmd, &ireq) != -1) {
4648 if (ioctl(sock_fd, SIOCGIFFLAGS, &ifr) == -1) {
4657 if (ioctl(sock_fd, SIOCSIFFLAGS, &ifr) == -1) {
4671 if (ioctl(sock_fd, SIOCSIWMODE, &ireq) == -1) {
4677 if (ioctl(sock_fd, SIOCSIFFLAGS, &ifr) == -1) {
4712 if (ioctl(sock_fd, cmd, &ireq) != -1)
4724 if (ioctl(sock_fd, cmd, &ireq) != -1)
4736 ioctl(sock_fd, cmd, &ireq);
4755 ioctl(sock_fd, cmd, &ireq);
4766 if (ioctl(sock_fd, SIOCGIWFREQ, &ireq) == -1) {
4785 ioctl(sock_fd, cmd, &ireq);
4799 ioctl(sock_fd, cmd, &ireq);
4812 ioctl(sock_fd, cmd, &ireq);
4826 ioctl(sock_fd, cmd, &ireq);
4839 ioctl(sock_fd, cmd, &ireq);
4848 if (ioctl(sock_fd, SIOCSIFFLAGS, &ifr) == -1) {
4888 enter_rfmon_mode(pcap_t *handle, int sock_fd, const char *device)
4895 ret = enter_rfmon_mode_mac80211(handle, sock_fd, device);
4903 ret = enter_rfmon_mode_wext(handle, sock_fd, device);