ap_list.h (1509B)
1 /* 2 wificurse - WiFi Jamming tool 3 Copyright (C) 2012 oblique 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef AP_LIST_H 20 #define AP_LIST_H 21 22 #include <stdint.h> 23 #include <time.h> 24 #include <sys/socket.h> 25 #include <linux/wireless.h> 26 27 28 #define ESSID_LEN 32 29 30 struct ap_info { 31 int chan; 32 uint8_t bssid[IFHWADDRLEN]; 33 uint8_t essid[ESSID_LEN+1]; 34 }; 35 36 struct access_point { 37 volatile unsigned int num_of_deauths; 38 time_t last_beacon_tm; 39 uint16_t sequence:12; 40 struct ap_info info; 41 struct access_point *next; 42 struct access_point *prev; 43 }; 44 45 struct ap_list { 46 struct access_point *head; 47 struct access_point *tail; 48 }; 49 50 51 void init_ap_list(struct ap_list *apl); 52 void free_ap_list(struct ap_list *apl); 53 void link_ap(struct ap_list *apl, struct access_point *ap); 54 void unlink_ap(struct ap_list *apl, struct access_point *ap); 55 int add_or_update_ap(struct ap_list *apl, struct ap_info *api); 56 57 #endif