H A D | wlaninject.c | 1 /*- 2 * Copyright (c) 2006, Andrea Bittau <a.bittau@cs.ucl.ac.uk> 48 void setup_if(char *dev, int chan) { in setup_if() argument 56 if ((s = socket(PF_INET, SOCK_DGRAM, 0)) == -1) in setup_if() 61 snprintf(ireq.i_name, sizeof(ireq.i_name), "%s", dev); in setup_if() 64 if (ioctl(s, SIOCS80211, &ireq) == -1) in setup_if() 69 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", dev); in setup_if() 70 if (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) in setup_if() 76 if (ioctl(s, SIOCSIFFLAGS, &ifr) == -1) in setup_if() 82 int open_bpf(char *dev) in open_bpf() argument [all …]
|