ifieee80211.c (194136) | ifieee80211.c (195618) |
---|---|
1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 194136 2009-06-13 23:43:00Z sam $ | 27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 195618 2009-07-11 15:02:45Z rpaulo $ |
28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 40 unchanged lines hidden (view full) --- 76#include <net/if_types.h> 77#include <net/if_media.h> 78#include <net/route.h> 79 80#include <net80211/ieee80211_ioctl.h> 81#include <net80211/ieee80211_freebsd.h> 82#include <net80211/ieee80211_superg.h> 83#include <net80211/ieee80211_tdma.h> | 28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 40 unchanged lines hidden (view full) --- 76#include <net/if_types.h> 77#include <net/if_media.h> 78#include <net/route.h> 79 80#include <net80211/ieee80211_ioctl.h> 81#include <net80211/ieee80211_freebsd.h> 82#include <net80211/ieee80211_superg.h> 83#include <net80211/ieee80211_tdma.h> |
84#include <net80211/ieee80211_mesh.h> |
|
84 85#include <assert.h> 86#include <ctype.h> 87#include <err.h> 88#include <errno.h> 89#include <fcntl.h> 90#include <inttypes.h> 91#include <stdio.h> --- 65 unchanged lines hidden (view full) --- 157static const char *get_string(const char *val, const char *sep, 158 u_int8_t *buf, int *lenp); 159static void print_string(const u_int8_t *buf, int len); 160static void print_regdomain(const struct ieee80211_regdomain *, int); 161static void print_channels(int, const struct ieee80211req_chaninfo *, 162 int allchans, int verbose); 163static void regdomain_makechannels(struct ieee80211_regdomain_req *, 164 const struct ieee80211_devcaps_req *); | 85 86#include <assert.h> 87#include <ctype.h> 88#include <err.h> 89#include <errno.h> 90#include <fcntl.h> 91#include <inttypes.h> 92#include <stdio.h> --- 65 unchanged lines hidden (view full) --- 158static const char *get_string(const char *val, const char *sep, 159 u_int8_t *buf, int *lenp); 160static void print_string(const u_int8_t *buf, int len); 161static void print_regdomain(const struct ieee80211_regdomain *, int); 162static void print_channels(int, const struct ieee80211req_chaninfo *, 163 int allchans, int verbose); 164static void regdomain_makechannels(struct ieee80211_regdomain_req *, 165 const struct ieee80211_devcaps_req *); |
166static const char *mesh_linkstate_string(uint8_t state); |
|
165 166static struct ieee80211req_chaninfo *chaninfo; 167static struct ieee80211_regdomain regdomain; 168static int gotregdomain = 0; 169static struct ieee80211_roamparams_req roamparams; 170static int gotroam = 0; 171static struct ieee80211_txparams_req txparams; 172static int gottxparams = 0; --- 397 unchanged lines hidden (view full) --- 570 len = sizeof(data); 571 if (get_string(val, NULL, data, &len) == NULL) 572 exit(1); 573 574 set80211(s, IEEE80211_IOC_SSID, ssid, len, data); 575} 576 577static void | 167 168static struct ieee80211req_chaninfo *chaninfo; 169static struct ieee80211_regdomain regdomain; 170static int gotregdomain = 0; 171static struct ieee80211_roamparams_req roamparams; 172static int gotroam = 0; 173static struct ieee80211_txparams_req txparams; 174static int gottxparams = 0; --- 397 unchanged lines hidden (view full) --- 572 len = sizeof(data); 573 if (get_string(val, NULL, data, &len) == NULL) 574 exit(1); 575 576 set80211(s, IEEE80211_IOC_SSID, ssid, len, data); 577} 578 579static void |
580set80211meshid(const char *val, int d, int s, const struct afswtch *rafp) 581{ 582 int len; 583 u_int8_t data[IEEE80211_NWID_LEN]; 584 585 memset(data, 0, sizeof(data)); 586 len = sizeof(data); 587 if (get_string(val, NULL, data, &len) == NULL) 588 exit(1); 589 590 set80211(s, IEEE80211_IOC_MESH_ID, 0, len, data); 591} 592 593static void |
|
578set80211stationname(const char *val, int d, int s, const struct afswtch *rafp) 579{ 580 int len; 581 u_int8_t data[33]; 582 583 bzero(data, sizeof(data)); 584 len = sizeof(data); 585 get_string(val, NULL, data, &len); --- 671 unchanged lines hidden (view full) --- 1257 1258static 1259DECL_CMD_FUNC(set80211maccmd, val, d) 1260{ 1261 set80211(s, IEEE80211_IOC_MACCMD, d, 0, NULL); 1262} 1263 1264static void | 594set80211stationname(const char *val, int d, int s, const struct afswtch *rafp) 595{ 596 int len; 597 u_int8_t data[33]; 598 599 bzero(data, sizeof(data)); 600 len = sizeof(data); 601 get_string(val, NULL, data, &len); --- 671 unchanged lines hidden (view full) --- 1273 1274static 1275DECL_CMD_FUNC(set80211maccmd, val, d) 1276{ 1277 set80211(s, IEEE80211_IOC_MACCMD, d, 0, NULL); 1278} 1279 1280static void |
1281set80211meshrtmac(int s, int req, const char *val) 1282{ 1283 char *temp; 1284 struct sockaddr_dl sdl; 1285 1286 temp = malloc(strlen(val) + 2); /* ':' and '\0' */ 1287 if (temp == NULL) 1288 errx(1, "malloc failed"); 1289 temp[0] = ':'; 1290 strcpy(temp + 1, val); 1291 sdl.sdl_len = sizeof(sdl); 1292 link_addr(temp, &sdl); 1293 free(temp); 1294 if (sdl.sdl_alen != IEEE80211_ADDR_LEN) 1295 errx(1, "malformed link-level address"); 1296 set80211(s, IEEE80211_IOC_MESH_RTCMD, req, 1297 IEEE80211_ADDR_LEN, LLADDR(&sdl)); 1298} 1299 1300static 1301DECL_CMD_FUNC(set80211addmeshrt, val, d) 1302{ 1303 set80211meshrtmac(s, IEEE80211_MESH_RTCMD_ADD, val); 1304} 1305 1306static 1307DECL_CMD_FUNC(set80211delmeshrt, val, d) 1308{ 1309 set80211meshrtmac(s, IEEE80211_MESH_RTCMD_DELETE, val); 1310} 1311 1312static 1313DECL_CMD_FUNC(set80211meshrtcmd, val, d) 1314{ 1315 set80211(s, IEEE80211_IOC_MESH_RTCMD, d, 0, NULL); 1316} 1317 1318static 1319DECL_CMD_FUNC(set80211hwmprootmode, val, d) 1320{ 1321 int mode; 1322 1323 if (strcasecmp(val, "normal") == 0) 1324 mode = IEEE80211_HWMP_ROOTMODE_NORMAL; 1325 else if (strcasecmp(val, "proactive") == 0) 1326 mode = IEEE80211_HWMP_ROOTMODE_PROACTIVE; 1327 else if (strcasecmp(val, "rann") == 0) 1328 mode = IEEE80211_HWMP_ROOTMODE_RANN; 1329 else 1330 mode = IEEE80211_HWMP_ROOTMODE_DISABLED; 1331 set80211(s, IEEE80211_IOC_HWMP_ROOTMODE, mode, 0, NULL); 1332} 1333 1334static 1335DECL_CMD_FUNC(set80211hwmpmaxhops, val, d) 1336{ 1337 set80211(s, IEEE80211_IOC_HWMP_MAXHOPS, atoi(val), 0, NULL); 1338} 1339 1340static void |
|
1265set80211pureg(const char *val, int d, int s, const struct afswtch *rafp) 1266{ 1267 set80211(s, IEEE80211_IOC_PUREG, d, 0, NULL); 1268} 1269 1270static void 1271set80211bgscan(const char *val, int d, int s, const struct afswtch *rafp) 1272{ --- 493 unchanged lines hidden (view full) --- 1766} 1767 1768static 1769DECL_CMD_FUNC(set80211tdmabintval, val, d) 1770{ 1771 set80211(s, IEEE80211_IOC_TDMA_BINTERVAL, atoi(val), 0, NULL); 1772} 1773 | 1341set80211pureg(const char *val, int d, int s, const struct afswtch *rafp) 1342{ 1343 set80211(s, IEEE80211_IOC_PUREG, d, 0, NULL); 1344} 1345 1346static void 1347set80211bgscan(const char *val, int d, int s, const struct afswtch *rafp) 1348{ --- 493 unchanged lines hidden (view full) --- 1842} 1843 1844static 1845DECL_CMD_FUNC(set80211tdmabintval, val, d) 1846{ 1847 set80211(s, IEEE80211_IOC_TDMA_BINTERVAL, atoi(val), 0, NULL); 1848} 1849 |
1850static 1851DECL_CMD_FUNC(set80211meshttl, val, d) 1852{ 1853 set80211(s, IEEE80211_IOC_MESH_TTL, atoi(val), 0, NULL); 1854} 1855 1856static 1857DECL_CMD_FUNC(set80211meshforward, val, d) 1858{ 1859 set80211(s, IEEE80211_IOC_MESH_FWRD, atoi(val), 0, NULL); 1860} 1861 1862static 1863DECL_CMD_FUNC(set80211meshpeering, val, d) 1864{ 1865 set80211(s, IEEE80211_IOC_MESH_AP, atoi(val), 0, NULL); 1866} 1867 1868static 1869DECL_CMD_FUNC(set80211meshmetric, val, d) 1870{ 1871 char v[12]; 1872 1873 memcpy(v, val, sizeof(v)); 1874 set80211(s, IEEE80211_IOC_MESH_PR_METRIC, 0, 0, v); 1875} 1876 1877static 1878DECL_CMD_FUNC(set80211meshpath, val, d) 1879{ 1880 char v[12]; 1881 1882 memcpy(v, val, sizeof(v)); 1883 set80211(s, IEEE80211_IOC_MESH_PR_PATH, 0, 0, v); 1884} 1885 |
|
1774static int 1775regdomain_sort(const void *a, const void *b) 1776{ 1777#define CHAN_ALL \ 1778 (IEEE80211_CHAN_ALLTURBO|IEEE80211_CHAN_HALF|IEEE80211_CHAN_QUARTER) 1779 const struct ieee80211_channel *ca = a; 1780 const struct ieee80211_channel *cb = b; 1781 --- 711 unchanged lines hidden (view full) --- 2493 if (ath->ath_capability & ATHEROS_CAP_WME) 2494 printf("WME,"); 2495 if (ath->ath_capability & ATHEROS_CAP_BOOST) 2496 printf("BOOST,"); 2497 printf("0x%x>", LE_READ_2(ath->ath_defkeyix)); 2498 } 2499} 2500 | 1886static int 1887regdomain_sort(const void *a, const void *b) 1888{ 1889#define CHAN_ALL \ 1890 (IEEE80211_CHAN_ALLTURBO|IEEE80211_CHAN_HALF|IEEE80211_CHAN_QUARTER) 1891 const struct ieee80211_channel *ca = a; 1892 const struct ieee80211_channel *cb = b; 1893 --- 711 unchanged lines hidden (view full) --- 2605 if (ath->ath_capability & ATHEROS_CAP_WME) 2606 printf("WME,"); 2607 if (ath->ath_capability & ATHEROS_CAP_BOOST) 2608 printf("BOOST,"); 2609 printf("0x%x>", LE_READ_2(ath->ath_defkeyix)); 2610 } 2611} 2612 |
2613 2614static void 2615printmeshconf(const char *tag, const uint8_t *ie, size_t ielen, int maxlen) 2616{ 2617#define MATCHOUI(field, oui, string) \ 2618do { \ 2619 if (memcmp(field, oui, 4) == 0) \ 2620 printf("%s", string); \ 2621} while (0) 2622 2623 printf("%s", tag); 2624 if (verbose) { 2625 const struct ieee80211_meshconf_ie *mconf = 2626 (const struct ieee80211_meshconf_ie *)ie; 2627 const uint8_t null[4] = IEEE80211_MESHCONF_NULL; 2628 const uint8_t hwmp[4] = IEEE80211_MESHCONF_HWMP; 2629 const uint8_t airtime[4] = IEEE80211_MESHCONF_AIRTIME; 2630 const uint8_t ccsig[4] = IEEE80211_MESHCONF_CCSIG; 2631 const uint8_t sae[4] = IEEE80211_MESHCONF_SAE; 2632 const uint8_t neighoff[4] = IEEE80211_MESHCONF_SAE; 2633 printf("<v%d PATH:", mconf->conf_ver); 2634 MATCHOUI(mconf->conf_pselid, hwmp, "HWMP"); 2635 printf(" LINK:"); 2636 MATCHOUI(mconf->conf_pmetid, airtime, "AIRTIME"); 2637 printf(" CONGESTION:"); 2638 MATCHOUI(mconf->conf_ccid, ccsig, "SIG"); 2639 MATCHOUI(mconf->conf_ccid, null, "NULL"); 2640 printf(" SYNC:"); 2641 MATCHOUI(mconf->conf_syncid, neighoff, "NEIGHOFF"); 2642 MATCHOUI(mconf->conf_syncid, null, "NULL"); 2643 printf(" AUTH:"); 2644 MATCHOUI(mconf->conf_authid, sae, "SAE"); 2645 MATCHOUI(mconf->conf_authid, null, "NULL"); 2646 printf(" FORM:0x%x CAPS:0x%x>", mconf->conf_form, 2647 mconf->conf_cap); 2648 } 2649#undef MATCHOUI 2650} 2651 |
|
2501static const char * 2502wpa_cipher(const u_int8_t *sel) 2503{ 2504#define WPA_SEL(x) (((x)<<24)|WPA_OUI) 2505 u_int32_t w = LE_READ_4(sel); 2506 2507 switch (w) { 2508 case WPA_SEL(WPA_CSE_NULL): --- 454 unchanged lines hidden (view full) --- 2963 break; 2964 case IEEE80211_ELEMID_HTCAP: 2965 printhtcap(" HTCAP", vp, 2+vp[1], maxcols); 2966 break; 2967 case IEEE80211_ELEMID_HTINFO: 2968 if (verbose) 2969 printhtinfo(" HTINFO", vp, 2+vp[1], maxcols); 2970 break; | 2652static const char * 2653wpa_cipher(const u_int8_t *sel) 2654{ 2655#define WPA_SEL(x) (((x)<<24)|WPA_OUI) 2656 u_int32_t w = LE_READ_4(sel); 2657 2658 switch (w) { 2659 case WPA_SEL(WPA_CSE_NULL): --- 454 unchanged lines hidden (view full) --- 3114 break; 3115 case IEEE80211_ELEMID_HTCAP: 3116 printhtcap(" HTCAP", vp, 2+vp[1], maxcols); 3117 break; 3118 case IEEE80211_ELEMID_HTINFO: 3119 if (verbose) 3120 printhtinfo(" HTINFO", vp, 2+vp[1], maxcols); 3121 break; |
3122 case IEEE80211_ELEMID_MESHID: 3123 if (verbose) 3124 printssid(" MESHID", vp, 2+vp[1], maxcols); 3125 break; 3126 case IEEE80211_ELEMID_MESHCONF: 3127 printmeshconf(" MESHCONF", vp, 2+vp[1], maxcols); 3128 break; |
|
2971 default: 2972 if (verbose) 2973 printie(iename(vp[0]), vp, 2+vp[1], maxcols); 2974 break; 2975 } 2976 ielen -= 2+vp[1]; 2977 vp += 2+vp[1]; 2978 } --- 12 unchanged lines hidden (view full) --- 2991} 2992 2993static void 2994list_scan(int s) 2995{ 2996 uint8_t buf[24*1024]; 2997 char ssid[IEEE80211_NWID_LEN+1]; 2998 const uint8_t *cp; | 3129 default: 3130 if (verbose) 3131 printie(iename(vp[0]), vp, 2+vp[1], maxcols); 3132 break; 3133 } 3134 ielen -= 2+vp[1]; 3135 vp += 2+vp[1]; 3136 } --- 12 unchanged lines hidden (view full) --- 3149} 3150 3151static void 3152list_scan(int s) 3153{ 3154 uint8_t buf[24*1024]; 3155 char ssid[IEEE80211_NWID_LEN+1]; 3156 const uint8_t *cp; |
2999 int len, ssidmax; | 3157 int len, ssidmax, idlen; |
3000 3001 if (get80211len(s, IEEE80211_IOC_SCAN_RESULTS, buf, sizeof(buf), &len) < 0) 3002 errx(1, "unable to get scan results"); 3003 if (len < sizeof(struct ieee80211req_scan_result)) 3004 return; 3005 3006 getchaninfo(s); 3007 | 3158 3159 if (get80211len(s, IEEE80211_IOC_SCAN_RESULTS, buf, sizeof(buf), &len) < 0) 3160 errx(1, "unable to get scan results"); 3161 if (len < sizeof(struct ieee80211req_scan_result)) 3162 return; 3163 3164 getchaninfo(s); 3165 |
3008 ssidmax = verbose ? IEEE80211_NWID_LEN : 14; | 3166 ssidmax = verbose ? IEEE80211_NWID_LEN - 1 : 14; |
3009 printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n" | 3167 printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n" |
3010 , ssidmax, ssidmax, "SSID" | 3168 , ssidmax, ssidmax, "SSID/MESH ID" |
3011 , "BSSID" 3012 , "CHAN" 3013 , "RATE" 3014 , " S:N" 3015 , "INT" 3016 , "CAPS" 3017 ); 3018 cp = buf; 3019 do { 3020 const struct ieee80211req_scan_result *sr; | 3169 , "BSSID" 3170 , "CHAN" 3171 , "RATE" 3172 , " S:N" 3173 , "INT" 3174 , "CAPS" 3175 ); 3176 cp = buf; 3177 do { 3178 const struct ieee80211req_scan_result *sr; |
3021 const uint8_t *vp; | 3179 const uint8_t *vp, *idp; |
3022 3023 sr = (const struct ieee80211req_scan_result *) cp; 3024 vp = cp + sr->isr_ie_off; | 3180 3181 sr = (const struct ieee80211req_scan_result *) cp; 3182 vp = cp + sr->isr_ie_off; |
3183 if (sr->isr_meshid_len) { 3184 idp = vp + sr->isr_ssid_len; 3185 idlen = sr->isr_meshid_len; 3186 } else { 3187 idp = vp; 3188 idlen = sr->isr_ssid_len; 3189 } |
|
3025 printf("%-*.*s %s %3d %3dM %3d:%-3d %3d %-4.4s" 3026 , ssidmax | 3190 printf("%-*.*s %s %3d %3dM %3d:%-3d %3d %-4.4s" 3191 , ssidmax |
3027 , copy_essid(ssid, ssidmax, vp, sr->isr_ssid_len) | 3192 , copy_essid(ssid, ssidmax, idp, idlen) |
3028 , ssid 3029 , ether_ntoa((const struct ether_addr *) sr->isr_bssid) 3030 , ieee80211_mhz2ieee(sr->isr_freq, sr->isr_flags) 3031 , getmaxrate(sr->isr_rates, sr->isr_nrates) 3032 , (sr->isr_rssi/2)+sr->isr_noise, sr->isr_noise 3033 , sr->isr_intval 3034 , getcaps(sr->isr_capinfo) 3035 ); | 3193 , ssid 3194 , ether_ntoa((const struct ether_addr *) sr->isr_bssid) 3195 , ieee80211_mhz2ieee(sr->isr_freq, sr->isr_flags) 3196 , getmaxrate(sr->isr_rates, sr->isr_nrates) 3197 , (sr->isr_rssi/2)+sr->isr_noise, sr->isr_noise 3198 , sr->isr_intval 3199 , getcaps(sr->isr_capinfo) 3200 ); |
3036 printies(vp + sr->isr_ssid_len, sr->isr_ie_len, 24); | 3201 printies(vp + sr->isr_ssid_len + sr->isr_meshid_len, 3202 sr->isr_ie_len, 24); |
3037 printf("\n"); 3038 cp += sr->isr_len, len -= sr->isr_len; 3039 } while (len >= sizeof(struct ieee80211req_scan_result)); 3040} 3041 3042static void 3043scan_and_wait(int s) 3044{ --- 101 unchanged lines hidden (view full) --- 3146 } 3147 if (get80211len(s, IEEE80211_IOC_STA_INFO, &u, sizeof(u), &len) < 0) 3148 errx(1, "unable to get station information"); 3149 if (len < sizeof(struct ieee80211req_sta_info)) 3150 return; 3151 3152 getchaninfo(s); 3153 | 3203 printf("\n"); 3204 cp += sr->isr_len, len -= sr->isr_len; 3205 } while (len >= sizeof(struct ieee80211req_scan_result)); 3206} 3207 3208static void 3209scan_and_wait(int s) 3210{ --- 101 unchanged lines hidden (view full) --- 3312 } 3313 if (get80211len(s, IEEE80211_IOC_STA_INFO, &u, sizeof(u), &len) < 0) 3314 errx(1, "unable to get station information"); 3315 if (len < sizeof(struct ieee80211req_sta_info)) 3316 return; 3317 3318 getchaninfo(s); 3319 |
3154 printf("%-17.17s %4s %4s %4s %4s %4s %6s %6s %4s %-7s\n" 3155 , "ADDR" 3156 , "AID" 3157 , "CHAN" 3158 , "RATE" 3159 , "RSSI" 3160 , "IDLE" 3161 , "TXSEQ" 3162 , "RXSEQ" 3163 , "CAPS" 3164 , "FLAG" 3165 ); | 3320 if (opmode == IEEE80211_M_MBSS) 3321 printf("%-17.17s %4s %5s %5s %7s %4s %4s %4s %6s %6s\n" 3322 , "ADDR" 3323 , "CHAN" 3324 , "LOCAL" 3325 , "PEER" 3326 , "STATE" 3327 , "RATE" 3328 , "RSSI" 3329 , "IDLE" 3330 , "TXSEQ" 3331 , "RXSEQ" 3332 ); 3333 else 3334 printf("%-17.17s %4s %4s %4s %4s %4s %6s %6s %4s %-7s\n" 3335 , "ADDR" 3336 , "AID" 3337 , "CHAN" 3338 , "RATE" 3339 , "RSSI" 3340 , "IDLE" 3341 , "TXSEQ" 3342 , "RXSEQ" 3343 , "CAPS" 3344 , "FLAG" 3345 ); |
3166 cp = (const uint8_t *) u.req.info; 3167 do { 3168 const struct ieee80211req_sta_info *si; 3169 3170 si = (const struct ieee80211req_sta_info *) cp; 3171 if (si->isi_len < sizeof(*si)) 3172 break; | 3346 cp = (const uint8_t *) u.req.info; 3347 do { 3348 const struct ieee80211req_sta_info *si; 3349 3350 si = (const struct ieee80211req_sta_info *) cp; 3351 if (si->isi_len < sizeof(*si)) 3352 break; |
3173 printf("%s %4u %4d %3dM %3.1f %4d %6d %6d %-4.4s %-7.7s" 3174 , ether_ntoa((const struct ether_addr*) si->isi_macaddr) 3175 , IEEE80211_AID(si->isi_associd) 3176 , ieee80211_mhz2ieee(si->isi_freq, si->isi_flags) 3177 , si->isi_txmbps/2 3178 , si->isi_rssi/2. 3179 , si->isi_inact 3180 , gettxseq(si) 3181 , getrxseq(si) 3182 , getcaps(si->isi_capinfo) 3183 , getflags(si->isi_state) 3184 ); | 3353 if (opmode == IEEE80211_M_MBSS) 3354 printf("%s %4d %5x %5x %7.7s %3dM %4.1f %4d %6d %6d" 3355 , ether_ntoa((const struct ether_addr*) 3356 si->isi_macaddr) 3357 , ieee80211_mhz2ieee(si->isi_freq, 3358 si->isi_flags) 3359 , si->isi_localid 3360 , si->isi_peerid 3361 , mesh_linkstate_string(si->isi_peerstate) 3362 , si->isi_txmbps/2 3363 , si->isi_rssi/2. 3364 , si->isi_inact 3365 , gettxseq(si) 3366 , getrxseq(si) 3367 ); 3368 else 3369 printf("%s %4u %4d %3dM %4.1f %4d %6d %6d %-4.4s %-7.7s" 3370 , ether_ntoa((const struct ether_addr*) 3371 si->isi_macaddr) 3372 , IEEE80211_AID(si->isi_associd) 3373 , ieee80211_mhz2ieee(si->isi_freq, 3374 si->isi_flags) 3375 , si->isi_txmbps/2 3376 , si->isi_rssi/2. 3377 , si->isi_inact 3378 , gettxseq(si) 3379 , getrxseq(si) 3380 , getcaps(si->isi_capinfo) 3381 , getflags(si->isi_state) 3382 ); |
3185 printies(cp + si->isi_ie_off, si->isi_ie_len, 24); 3186 printmimo(&si->isi_mimo); 3187 printf("\n"); 3188 cp += si->isi_len, len -= si->isi_len; 3189 } while (len >= sizeof(struct ieee80211req_sta_info)); 3190} 3191 3192static const char * | 3383 printies(cp + si->isi_ie_off, si->isi_ie_len, 24); 3384 printmimo(&si->isi_mimo); 3385 printf("\n"); 3386 cp += si->isi_len, len -= si->isi_len; 3387 } while (len >= sizeof(struct ieee80211req_sta_info)); 3388} 3389 3390static const char * |
3391mesh_linkstate_string(uint8_t state) 3392{ 3393#define N(a) (sizeof(a) / sizeof(a[0])) 3394 static const char *state_names[] = { 3395 [0] = "IDLE", 3396 [1] = "OPEN-TX", 3397 [2] = "OPEN-RX", 3398 [3] = "CONF-RX", 3399 [4] = "ESTAB", 3400 [5] = "HOLDING", 3401 }; 3402 3403 if (state >= N(state_names)) { 3404 static char buf[10]; 3405 snprintf(buf, sizeof(buf), "#%u", state); 3406 return buf; 3407 } else 3408 return state_names[state]; 3409#undef N 3410} 3411 3412static const char * |
|
3193get_chaninfo(const struct ieee80211_channel *c, int precise, 3194 char buf[], size_t bsize) 3195{ 3196 buf[0] = '\0'; 3197 if (IEEE80211_IS_CHAN_FHSS(c)) 3198 strlcat(buf, " FHSS", bsize); 3199 if (IEEE80211_IS_CHAN_A(c)) 3200 strlcat(buf, " 11a", bsize); --- 203 unchanged lines hidden (view full) --- 3404} 3405 3406static void 3407list_keys(int s) 3408{ 3409} 3410 3411#define IEEE80211_C_BITS \ | 3413get_chaninfo(const struct ieee80211_channel *c, int precise, 3414 char buf[], size_t bsize) 3415{ 3416 buf[0] = '\0'; 3417 if (IEEE80211_IS_CHAN_FHSS(c)) 3418 strlcat(buf, " FHSS", bsize); 3419 if (IEEE80211_IS_CHAN_A(c)) 3420 strlcat(buf, " 11a", bsize); --- 203 unchanged lines hidden (view full) --- 3624} 3625 3626static void 3627list_keys(int s) 3628{ 3629} 3630 3631#define IEEE80211_C_BITS \ |
3412 "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ | 3632 "\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \ |
3413 "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ | 3633 "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ |
3414 "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ | 3634 "\21MONITOR\22DFS\23MBSS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ |
3415 "\37TXFRAG\40TDMA" 3416 3417static void 3418list_capabilities(int s) 3419{ 3420 struct ieee80211_devcaps_req *dc; 3421 3422 if (verbose) --- 301 unchanged lines hidden (view full) --- 3724 spacer = ':'; 3725 print_regdomain(®domain, 1); 3726 LINE_BREAK(); 3727 print_channels(s, chaninfo, 1/*allchans*/, 1/*verbose*/); 3728 } else 3729 print_regdomain(®domain, verbose); 3730} 3731 | 3635 "\37TXFRAG\40TDMA" 3636 3637static void 3638list_capabilities(int s) 3639{ 3640 struct ieee80211_devcaps_req *dc; 3641 3642 if (verbose) --- 301 unchanged lines hidden (view full) --- 3944 spacer = ':'; 3945 print_regdomain(®domain, 1); 3946 LINE_BREAK(); 3947 print_channels(s, chaninfo, 1/*allchans*/, 1/*verbose*/); 3948 } else 3949 print_regdomain(®domain, verbose); 3950} 3951 |
3952static void 3953list_mesh(int s) 3954{ 3955 int i; 3956 struct ieee80211req ireq; 3957 struct ieee80211req_mesh_route routes[128]; 3958 3959 (void) memset(&ireq, 0, sizeof(ireq)); 3960 (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); 3961 ireq.i_type = IEEE80211_IOC_MESH_RTCMD; 3962 ireq.i_val = IEEE80211_MESH_RTCMD_LIST; 3963 ireq.i_data = &routes; 3964 ireq.i_len = sizeof(routes); 3965 if (ioctl(s, SIOCG80211, &ireq) < 0) 3966 err(1, "unable to get the Mesh routing table"); 3967 3968 printf("%-17.17s %-17.17s %4s %4s %4s\n" 3969 , "DEST" 3970 , "NEXT HOP" 3971 , "HOPS" 3972 , "METRIC" 3973 , "LIFETIME"); 3974 3975 for (i = 0; i < ireq.i_len / sizeof(*routes); i++) { 3976 printf("%s ", 3977 ether_ntoa((const struct ether_addr *)routes[i].imr_dest)); 3978 printf("%s %4u %4d %6d\n", 3979 ether_ntoa((const struct ether_addr *) 3980 routes[i].imr_nexthop), 3981 routes[i].imr_nhops, routes[i].imr_metric, 3982 routes[i].imr_lifetime); 3983 } 3984} 3985 |
|
3732static 3733DECL_CMD_FUNC(set80211list, arg, d) 3734{ 3735#define iseq(a,b) (strncasecmp(a,b,sizeof(b)-1) == 0) 3736 3737 LINE_INIT('\t'); 3738 3739 if (iseq(arg, "sta")) --- 17 unchanged lines hidden (view full) --- 3757 else if (iseq(arg, "roam")) 3758 list_roam(s); 3759 else if (iseq(arg, "txparam") || iseq(arg, "txparm")) 3760 list_txparams(s); 3761 else if (iseq(arg, "regdomain")) 3762 list_regdomain(s, 1); 3763 else if (iseq(arg, "countries")) 3764 list_countries(); | 3986static 3987DECL_CMD_FUNC(set80211list, arg, d) 3988{ 3989#define iseq(a,b) (strncasecmp(a,b,sizeof(b)-1) == 0) 3990 3991 LINE_INIT('\t'); 3992 3993 if (iseq(arg, "sta")) --- 17 unchanged lines hidden (view full) --- 4011 else if (iseq(arg, "roam")) 4012 list_roam(s); 4013 else if (iseq(arg, "txparam") || iseq(arg, "txparm")) 4014 list_txparams(s); 4015 else if (iseq(arg, "regdomain")) 4016 list_regdomain(s, 1); 4017 else if (iseq(arg, "countries")) 4018 list_countries(); |
4019 else if (iseq(arg, "mesh")) 4020 list_mesh(s); |
|
3765 else 3766 errx(1, "Don't know how to list %s for %s", arg, name); 3767 LINE_BREAK(); 3768#undef iseq 3769} 3770 3771static enum ieee80211_opmode 3772get80211opmode(int s) --- 9 unchanged lines hidden (view full) --- 3782 return IEEE80211_M_AHDEMO; 3783 else 3784 return IEEE80211_M_IBSS; 3785 } 3786 if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) 3787 return IEEE80211_M_HOSTAP; 3788 if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) 3789 return IEEE80211_M_MONITOR; | 4021 else 4022 errx(1, "Don't know how to list %s for %s", arg, name); 4023 LINE_BREAK(); 4024#undef iseq 4025} 4026 4027static enum ieee80211_opmode 4028get80211opmode(int s) --- 9 unchanged lines hidden (view full) --- 4038 return IEEE80211_M_AHDEMO; 4039 else 4040 return IEEE80211_M_IBSS; 4041 } 4042 if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) 4043 return IEEE80211_M_HOSTAP; 4044 if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) 4045 return IEEE80211_M_MONITOR; |
4046 if (ifmr.ifm_current & IFM_IEEE80211_MBSS) 4047 return IEEE80211_M_MBSS; |
|
3790 } 3791 return IEEE80211_M_STA; 3792} 3793 3794#if 0 3795static void 3796printcipher(int s, struct ieee80211req *ireq, int keylenop) 3797{ --- 108 unchanged lines hidden (view full) --- 3906 } 3907 } else { 3908 if (v != defmcs) 3909 LINE_CHECK("%s %d", tag, v &~ 0x80); 3910 } 3911} 3912 3913static int | 4048 } 4049 return IEEE80211_M_STA; 4050} 4051 4052#if 0 4053static void 4054printcipher(int s, struct ieee80211req *ireq, int keylenop) 4055{ --- 108 unchanged lines hidden (view full) --- 4164 } 4165 } else { 4166 if (v != defmcs) 4167 LINE_CHECK("%s %d", tag, v &~ 0x80); 4168 } 4169} 4170 4171static int |
3914getssid(int s, int ix, void *data, size_t len, int *plen) | 4172getid(int s, int ix, void *data, size_t len, int *plen, int mesh) |
3915{ 3916 struct ieee80211req ireq; 3917 3918 (void) memset(&ireq, 0, sizeof(ireq)); 3919 (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); | 4173{ 4174 struct ieee80211req ireq; 4175 4176 (void) memset(&ireq, 0, sizeof(ireq)); 4177 (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); |
3920 ireq.i_type = IEEE80211_IOC_SSID; | 4178 ireq.i_type = (!mesh) ? IEEE80211_IOC_SSID : IEEE80211_IOC_MESH_ID; |
3921 ireq.i_val = ix; 3922 ireq.i_data = data; 3923 ireq.i_len = len; 3924 if (ioctl(s, SIOCG80211, &ireq) < 0) 3925 return -1; 3926 *plen = ireq.i_len; 3927 return 0; 3928} --- 4 unchanged lines hidden (view full) --- 3933 static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; 3934 enum ieee80211_opmode opmode = get80211opmode(s); 3935 int i, num, wpa, wme, bgscan, bgscaninterval, val, len, wepmode; 3936 uint8_t data[32]; 3937 const struct ieee80211_channel *c; 3938 const struct ieee80211_roamparam *rp; 3939 const struct ieee80211_txparam *tp; 3940 | 4179 ireq.i_val = ix; 4180 ireq.i_data = data; 4181 ireq.i_len = len; 4182 if (ioctl(s, SIOCG80211, &ireq) < 0) 4183 return -1; 4184 *plen = ireq.i_len; 4185 return 0; 4186} --- 4 unchanged lines hidden (view full) --- 4191 static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; 4192 enum ieee80211_opmode opmode = get80211opmode(s); 4193 int i, num, wpa, wme, bgscan, bgscaninterval, val, len, wepmode; 4194 uint8_t data[32]; 4195 const struct ieee80211_channel *c; 4196 const struct ieee80211_roamparam *rp; 4197 const struct ieee80211_txparam *tp; 4198 |
3941 if (getssid(s, -1, data, sizeof(data), &len) < 0) { | 4199 if (getid(s, -1, data, sizeof(data), &len, 0) < 0) { |
3942 /* If we can't get the SSID, this isn't an 802.11 device. */ 3943 return; 3944 } 3945 3946 /* 3947 * Invalidate cached state so printing status for multiple 3948 * if's doesn't reuse the first interfaces' cached state. 3949 */ 3950 gotcurchan = 0; 3951 gotroam = 0; 3952 gottxparams = 0; 3953 gothtconf = 0; 3954 gotregdomain = 0; 3955 | 4200 /* If we can't get the SSID, this isn't an 802.11 device. */ 4201 return; 4202 } 4203 4204 /* 4205 * Invalidate cached state so printing status for multiple 4206 * if's doesn't reuse the first interfaces' cached state. 4207 */ 4208 gotcurchan = 0; 4209 gotroam = 0; 4210 gottxparams = 0; 4211 gothtconf = 0; 4212 gotregdomain = 0; 4213 |
3956 if (get80211val(s, IEEE80211_IOC_NUMSSIDS, &num) < 0) 3957 num = 0; 3958 printf("\tssid "); 3959 if (num > 1) { 3960 for (i = 0; i < num; i++) { 3961 if (getssid(s, i, data, sizeof(data), &len) >= 0 && len > 0) { 3962 printf(" %d:", i + 1); 3963 print_string(data, len); 3964 } 3965 } 3966 } else | 4214 printf("\t"); 4215 if (opmode == IEEE80211_M_MBSS) { 4216 printf("meshid "); 4217 getid(s, 0, data, sizeof(data), &len, 1); |
3967 print_string(data, len); | 4218 print_string(data, len); |
3968 | 4219 } else { 4220 if (get80211val(s, IEEE80211_IOC_NUMSSIDS, &num) < 0) 4221 num = 0; 4222 printf("ssid "); 4223 if (num > 1) { 4224 for (i = 0; i < num; i++) { 4225 if (getid(s, i, data, sizeof(data), &len, 0) >= 0 && len > 0) { 4226 printf(" %d:", i + 1); 4227 print_string(data, len); 4228 } 4229 } 4230 } else 4231 print_string(data, len); 4232 } |
3969 c = getcurchan(s); 3970 if (c->ic_freq != IEEE80211_CHAN_ANY) { 3971 char buf[14]; 3972 printf(" channel %d (%u Mhz%s)", c->ic_ieee, c->ic_freq, 3973 get_chaninfo(c, 1, buf, sizeof(buf))); 3974 } else if (verbose) 3975 printf(" channel UNDEF"); 3976 --- 533 unchanged lines hidden (view full) --- 4510 if (val != 100 || verbose) 4511 LINE_CHECK("bintval %u", val); 4512 } 4513 4514 if (wme && verbose) { 4515 LINE_BREAK(); 4516 list_wme(s); 4517 } | 4233 c = getcurchan(s); 4234 if (c->ic_freq != IEEE80211_CHAN_ANY) { 4235 char buf[14]; 4236 printf(" channel %d (%u Mhz%s)", c->ic_ieee, c->ic_freq, 4237 get_chaninfo(c, 1, buf, sizeof(buf))); 4238 } else if (verbose) 4239 printf(" channel UNDEF"); 4240 --- 533 unchanged lines hidden (view full) --- 4774 if (val != 100 || verbose) 4775 LINE_CHECK("bintval %u", val); 4776 } 4777 4778 if (wme && verbose) { 4779 LINE_BREAK(); 4780 list_wme(s); 4781 } |
4782 4783 if (opmode == IEEE80211_M_MBSS) { 4784 if (get80211val(s, IEEE80211_IOC_MESH_TTL, &val) != -1) { 4785 LINE_CHECK("meshttl %u", val); 4786 } 4787 if (get80211val(s, IEEE80211_IOC_MESH_AP, &val) != -1) { 4788 if (val) 4789 LINE_CHECK("meshpeering"); 4790 else 4791 LINE_CHECK("-meshpeering"); 4792 } 4793 if (get80211val(s, IEEE80211_IOC_MESH_FWRD, &val) != -1) { 4794 if (val) 4795 LINE_CHECK("meshforward"); 4796 else 4797 LINE_CHECK("-meshforward"); 4798 } 4799 if (get80211len(s, IEEE80211_IOC_MESH_PR_METRIC, data, 12, 4800 &len) != -1) { 4801 data[len] = '\0'; 4802 LINE_CHECK("meshmetric %s", data); 4803 } 4804 if (get80211len(s, IEEE80211_IOC_MESH_PR_PATH, data, 12, 4805 &len) != -1) { 4806 data[len] = '\0'; 4807 LINE_CHECK("meshpath %s", data); 4808 } 4809 if (get80211val(s, IEEE80211_IOC_HWMP_ROOTMODE, &val) != -1) { 4810 switch (val) { 4811 case IEEE80211_HWMP_ROOTMODE_DISABLED: 4812 LINE_CHECK("hwmprootmode DISABLED"); 4813 break; 4814 case IEEE80211_HWMP_ROOTMODE_NORMAL: 4815 LINE_CHECK("hwmprootmode NORMAL"); 4816 break; 4817 case IEEE80211_HWMP_ROOTMODE_PROACTIVE: 4818 LINE_CHECK("hwmprootmode PROACTIVE"); 4819 break; 4820 case IEEE80211_HWMP_ROOTMODE_RANN: 4821 LINE_CHECK("hwmprootmode RANN"); 4822 break; 4823 default: 4824 LINE_CHECK("hwmprootmode UNKNOWN(%d)", val); 4825 break; 4826 } 4827 } 4828 if (get80211val(s, IEEE80211_IOC_HWMP_MAXHOPS, &val) != -1) { 4829 LINE_CHECK("hwmpmaxhops %u", val); 4830 } 4831 } 4832 |
|
4518 LINE_BREAK(); 4519} 4520 4521static int 4522get80211(int s, int type, void *data, int len) 4523{ 4524 struct ieee80211req ireq; 4525 --- 200 unchanged lines hidden (view full) --- 4726 params.icp_opmode = IEEE80211_M_HOSTAP; 4727 else if (iseq(arg, "wds")) 4728 params.icp_opmode = IEEE80211_M_WDS; 4729 else if (iseq(arg, "monitor")) 4730 params.icp_opmode = IEEE80211_M_MONITOR; 4731 else if (iseq(arg, "tdma")) { 4732 params.icp_opmode = IEEE80211_M_AHDEMO; 4733 params.icp_flags |= IEEE80211_CLONE_TDMA; | 4833 LINE_BREAK(); 4834} 4835 4836static int 4837get80211(int s, int type, void *data, int len) 4838{ 4839 struct ieee80211req ireq; 4840 --- 200 unchanged lines hidden (view full) --- 5041 params.icp_opmode = IEEE80211_M_HOSTAP; 5042 else if (iseq(arg, "wds")) 5043 params.icp_opmode = IEEE80211_M_WDS; 5044 else if (iseq(arg, "monitor")) 5045 params.icp_opmode = IEEE80211_M_MONITOR; 5046 else if (iseq(arg, "tdma")) { 5047 params.icp_opmode = IEEE80211_M_AHDEMO; 5048 params.icp_flags |= IEEE80211_CLONE_TDMA; |
4734 } else | 5049 } else if (iseq(arg, "mesh") || iseq(arg, "mp")) /* mesh point */ 5050 params.icp_opmode = IEEE80211_M_MBSS; 5051 else |
4735 errx(1, "Don't know to create %s for %s", arg, name); 4736#undef iseq 4737} 4738 4739static void 4740set80211clone_beacons(const char *val, int d, int s, const struct afswtch *rafp) 4741{ 4742 /* NB: inverted sense */ --- 19 unchanged lines hidden (view full) --- 4762 params.icp_flags |= IEEE80211_CLONE_WDSLEGACY; 4763 else 4764 params.icp_flags &= ~IEEE80211_CLONE_WDSLEGACY; 4765} 4766 4767static struct cmd ieee80211_cmds[] = { 4768 DEF_CMD_ARG("ssid", set80211ssid), 4769 DEF_CMD_ARG("nwid", set80211ssid), | 5052 errx(1, "Don't know to create %s for %s", arg, name); 5053#undef iseq 5054} 5055 5056static void 5057set80211clone_beacons(const char *val, int d, int s, const struct afswtch *rafp) 5058{ 5059 /* NB: inverted sense */ --- 19 unchanged lines hidden (view full) --- 5079 params.icp_flags |= IEEE80211_CLONE_WDSLEGACY; 5080 else 5081 params.icp_flags &= ~IEEE80211_CLONE_WDSLEGACY; 5082} 5083 5084static struct cmd ieee80211_cmds[] = { 5085 DEF_CMD_ARG("ssid", set80211ssid), 5086 DEF_CMD_ARG("nwid", set80211ssid), |
5087 DEF_CMD_ARG("meshid", set80211meshid), |
|
4770 DEF_CMD_ARG("stationname", set80211stationname), 4771 DEF_CMD_ARG("station", set80211stationname), /* BSD/OS */ 4772 DEF_CMD_ARG("channel", set80211channel), 4773 DEF_CMD_ARG("authmode", set80211authmode), 4774 DEF_CMD_ARG("powersavemode", set80211powersavemode), 4775 DEF_CMD("powersave", 1, set80211powersave), 4776 DEF_CMD("-powersave", 0, set80211powersave), 4777 DEF_CMD_ARG("powersavesleep", set80211powersavesleep), --- 125 unchanged lines hidden (view full) --- 4903 /* XXX for testing */ 4904 DEF_CMD_ARG("chanswitch", set80211chanswitch), 4905 4906 DEF_CMD_ARG("tdmaslot", set80211tdmaslot), 4907 DEF_CMD_ARG("tdmaslotcnt", set80211tdmaslotcnt), 4908 DEF_CMD_ARG("tdmaslotlen", set80211tdmaslotlen), 4909 DEF_CMD_ARG("tdmabintval", set80211tdmabintval), 4910 | 5088 DEF_CMD_ARG("stationname", set80211stationname), 5089 DEF_CMD_ARG("station", set80211stationname), /* BSD/OS */ 5090 DEF_CMD_ARG("channel", set80211channel), 5091 DEF_CMD_ARG("authmode", set80211authmode), 5092 DEF_CMD_ARG("powersavemode", set80211powersavemode), 5093 DEF_CMD("powersave", 1, set80211powersave), 5094 DEF_CMD("-powersave", 0, set80211powersave), 5095 DEF_CMD_ARG("powersavesleep", set80211powersavesleep), --- 125 unchanged lines hidden (view full) --- 5221 /* XXX for testing */ 5222 DEF_CMD_ARG("chanswitch", set80211chanswitch), 5223 5224 DEF_CMD_ARG("tdmaslot", set80211tdmaslot), 5225 DEF_CMD_ARG("tdmaslotcnt", set80211tdmaslotcnt), 5226 DEF_CMD_ARG("tdmaslotlen", set80211tdmaslotlen), 5227 DEF_CMD_ARG("tdmabintval", set80211tdmabintval), 5228 |
5229 DEF_CMD_ARG("meshttl", set80211meshttl), 5230 DEF_CMD("meshforward", 1, set80211meshforward), 5231 DEF_CMD("-meshforward", 0, set80211meshforward), 5232 DEF_CMD("meshpeering", 1, set80211meshpeering), 5233 DEF_CMD("-meshpeering", 0, set80211meshpeering), 5234 DEF_CMD_ARG("meshmetric", set80211meshmetric), 5235 DEF_CMD_ARG("meshpath", set80211meshpath), 5236 DEF_CMD("meshrt:flush", IEEE80211_MESH_RTCMD_FLUSH, set80211meshrtcmd), 5237 DEF_CMD_ARG("meshrt:add", set80211addmeshrt), 5238 DEF_CMD_ARG("meshrt:del", set80211delmeshrt), 5239 DEF_CMD_ARG("hwmprootmode", set80211hwmprootmode), 5240 DEF_CMD_ARG("hwmpmaxhops", set80211hwmpmaxhops), 5241 |
|
4911 /* vap cloning support */ 4912 DEF_CLONE_CMD_ARG("wlanaddr", set80211clone_wlanaddr), 4913 DEF_CLONE_CMD_ARG("wlanbssid", set80211clone_wlanbssid), 4914 DEF_CLONE_CMD_ARG("wlandev", set80211clone_wlandev), 4915 DEF_CLONE_CMD_ARG("wlanmode", set80211clone_wlanmode), 4916 DEF_CLONE_CMD("beacons", 1, set80211clone_beacons), 4917 DEF_CLONE_CMD("-beacons", 0, set80211clone_beacons), 4918 DEF_CLONE_CMD("bssid", 1, set80211clone_bssid), --- 22 unchanged lines hidden --- | 5242 /* vap cloning support */ 5243 DEF_CLONE_CMD_ARG("wlanaddr", set80211clone_wlanaddr), 5244 DEF_CLONE_CMD_ARG("wlanbssid", set80211clone_wlanbssid), 5245 DEF_CLONE_CMD_ARG("wlandev", set80211clone_wlandev), 5246 DEF_CLONE_CMD_ARG("wlanmode", set80211clone_wlanmode), 5247 DEF_CLONE_CMD("beacons", 1, set80211clone_beacons), 5248 DEF_CLONE_CMD("-beacons", 0, set80211clone_beacons), 5249 DEF_CLONE_CMD("bssid", 1, set80211clone_bssid), --- 22 unchanged lines hidden --- |