コード例 #1
0
ファイル: wlantest.c プロジェクト: Hansenq/wifi-goes-to-town
static void wlantest_deinit(struct wlantest *wt)
{
	struct wlantest_passphrase *p, *pn;
	struct wlantest_radius_secret *s, *sn;
	struct wlantest_radius *r, *rn;
	struct wlantest_pmk *pmk, *np;
	struct wlantest_ptk *ptk, *npt;
	struct wlantest_wep *wep, *nw;

	if (wt->ctrl_sock >= 0)
		ctrl_deinit(wt);
	if (wt->monitor_sock >= 0)
		monitor_deinit(wt);
	bss_flush(wt);
	dl_list_for_each_safe(p, pn, &wt->passphrase,
			      struct wlantest_passphrase, list)
		passphrase_deinit(p);
	dl_list_for_each_safe(s, sn, &wt->secret,
			      struct wlantest_radius_secret, list)
		secret_deinit(s);
	dl_list_for_each_safe(r, rn, &wt->radius, struct wlantest_radius, list)
		radius_deinit(r);
	dl_list_for_each_safe(pmk, np, &wt->pmk, struct wlantest_pmk, list)
		pmk_deinit(pmk);
	dl_list_for_each_safe(ptk, npt, &wt->ptk, struct wlantest_ptk, list)
		ptk_deinit(ptk);
	dl_list_for_each_safe(wep, nw, &wt->wep, struct wlantest_wep, list)
		os_free(wep);
	write_pcap_deinit(wt);
	write_pcapng_deinit(wt);
	clear_notes(wt);
	os_free(wt->decrypted);
	wt->decrypted = NULL;
}
コード例 #2
0
static void
bind_keys_azerty(PianoKeyboard *pk)
{
	clear_notes(pk);

	bind_key(pk, "space", 128);

	/* Lower keyboard row - "wxcvbn,". */
	bind_key(pk, "w", 12);	/* C0 */
	bind_key(pk, "s", 13);
	bind_key(pk, "x", 14);
	bind_key(pk, "d", 15);
	bind_key(pk, "c", 16);
	bind_key(pk, "v", 17);
	bind_key(pk, "g", 18);
	bind_key(pk, "b", 19);
	bind_key(pk, "h", 20);
	bind_key(pk, "n", 21);
	bind_key(pk, "j", 22);
	bind_key(pk, "comma", 23);

	/* Upper keyboard row, first octave - "azertyu". */
	bind_key(pk, "a", 24);
	bind_key(pk, "eacute", 25);
	bind_key(pk, "z", 26);
	bind_key(pk, "quotedbl", 27);
	bind_key(pk, "e", 28);
	bind_key(pk, "r", 29);
	bind_key(pk, "parenleft", 30);
	bind_key(pk, "t", 31);
	bind_key(pk, "minus", 32);
	bind_key(pk, "y", 33);
	bind_key(pk, "egrave", 34);
	bind_key(pk, "u", 35);

	/* Upper keyboard row, the rest - "iop". */
	bind_key(pk, "i", 36);
	bind_key(pk, "ccedilla", 37);
	bind_key(pk, "o", 38);
	bind_key(pk, "agrave", 39);
	bind_key(pk, "p", 40);
}
コード例 #3
0
static void
bind_keys_qwerty(PianoKeyboard *pk)
{
	clear_notes(pk);

	bind_key(pk, "space", 128);

	/* Lower keyboard row - "zxcvbnm". */
	bind_key(pk, "z", 12);	/* C0 */
	bind_key(pk, "s", 13);
	bind_key(pk, "x", 14);
	bind_key(pk, "d", 15);
	bind_key(pk, "c", 16);
	bind_key(pk, "v", 17);
	bind_key(pk, "g", 18);
	bind_key(pk, "b", 19);
	bind_key(pk, "h", 20);
	bind_key(pk, "n", 21);
	bind_key(pk, "j", 22);
	bind_key(pk, "m", 23);

	/* Upper keyboard row, first octave - "qwertyu". */
	bind_key(pk, "q", 24);
	bind_key(pk, "2", 25);
	bind_key(pk, "w", 26);
	bind_key(pk, "3", 27);
	bind_key(pk, "e", 28);
	bind_key(pk, "r", 29);
	bind_key(pk, "5", 30);
	bind_key(pk, "t", 31);
	bind_key(pk, "6", 32);
	bind_key(pk, "y", 33);
	bind_key(pk, "7", 34);
	bind_key(pk, "u", 35);

	/* Upper keyboard row, the rest - "iop". */
	bind_key(pk, "i", 36);
	bind_key(pk, "9", 37);
	bind_key(pk, "o", 38);
	bind_key(pk, "0", 39);
	bind_key(pk, "p", 40);
}