Home | History | Annotate | Download | only in ifconfig

Lines Matching defs:nwkey

150 	, {.k_word = "nwkey", .k_nextparser = &parse_nwkey.ps_parser}
151 , {.k_word = "-nwkey", .k_exec = unsetifnwkey,
188 struct pstr parse_nwkey = PSTR_INITIALIZER1(&parse_nwkey, "nwkey", setifnwkey,
189 "nwkey", false, &command_root.pb_parser);
345 struct ieee80211_nwkey nwkey;
349 if (getargstr(env, "nwkey", buf, sizeof(buf)) == -1)
350 errx(EXIT_FAILURE, "%s: nwkey too long", __func__);
354 nwkey.i_wepon = IEEE80211_NWKEY_WEP;
355 nwkey.i_defkid = 1;
357 nwkey.i_key[i].i_keylen = sizeof(keybuf[i]);
358 nwkey.i_key[i].i_keydat = keybuf[i];
362 nwkey.i_wepon |= IEEE80211_NWKEY_PERSIST;
363 nwkey.i_defkid = 0;
365 nwkey.i_key[i].i_keylen = -1;
369 nwkey.i_wepon |= IEEE80211_NWKEY_PERSIST;
375 nwkey.i_defkid = val[0] - '0';
379 &nwkey.i_key[i].i_keylen, true);
390 &nwkey.i_key[0].i_keylen, true);
399 nwkey.i_key[i].i_keylen = 0;
401 if (direct_ioctl(env, SIOCS80211NWKEY, &nwkey) == -1)
409 struct ieee80211_nwkey nwkey;
412 nwkey.i_wepon = 0;
413 nwkey.i_defkid = 1;
415 nwkey.i_key[i].i_keylen = 0;
416 nwkey.i_key[i].i_keydat = NULL;
419 if (direct_ioctl(env, SIOCS80211NWKEY, &nwkey) == -1)
596 struct ieee80211_nwkey nwkey;
607 memset(&nwkey, 0, sizeof(nwkey));
653 memset(&nwkey, 0, sizeof(nwkey));
654 /* show nwkey only when WEP is enabled */
655 if (direct_ioctl(env, SIOCG80211NWKEY, &nwkey) == -1 ||
656 nwkey.i_wepon == 0) {
661 printf(" nwkey ");
664 nwkey.i_key[i].i_keydat = keybuf[i];
665 nwkey.i_key[i].i_keylen = sizeof(keybuf[i]);
667 if (direct_ioctl(env, SIOCG80211NWKEY, &nwkey) == -1) {
672 if (nwkey.i_defkid != 1) {
676 if (nwkey.i_key[i].i_keylen != 0) {
684 if (nwkey.i_key[0].i_keylen >= 2 &&
685 isdigit(nwkey.i_key[0].i_keydat[0]) &&
686 nwkey.i_key[0].i_keydat[1] == ':')
688 else if (nwkey.i_key[0].i_keylen >= 7 &&
690 (const char *)nwkey.i_key[0].i_keydat, 7) == 0)
694 printf("%d:", nwkey.i_defkid);
698 if (nwkey.i_key[i].i_keylen < 0)
701 print_string(nwkey.i_key[i].i_keydat,
702 nwkey.i_key[i].i_keylen);
1381 "\t[ nwid network_id ] [ nwkey network_key | -nwkey ]\n"