Exemplo n.º 1
0
static void
printrsnie(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
{
	const char *sep;
	int n;

	printf("%s", tag);
	if (!vflag)
		return;

	ie += 2, ielen -= 2;

	printf("<v%u", LE_READ_2(ie));
	ie += 2, ielen -= 2;

	printf(" mc:%s", rsn_cipher(ie));
	ie += 4, ielen -= 4;

	/* unicast ciphers */
	n = LE_READ_2(ie);
	ie += 2, ielen -= 2;
	sep = " uc:";
	for (; n > 0; n--) {
		printf("%s%s", sep, rsn_cipher(ie));
		ie += 4, ielen -= 4;
		sep = "+";
	}

	/* key management algorithms */
	n = LE_READ_2(ie);
	ie += 2, ielen -= 2;
	sep = " km:";
	for (; n > 0; n--) {
		printf("%s%s", sep, rsn_keymgmt(ie));
		ie += 4, ielen -= 4;
		sep = "+";
	}

	if (ielen > 2)		/* optional capabilities */
		printf(", caps 0x%x", LE_READ_2(ie));
	/* XXXPMKID */
	printf(">");
}
Exemplo n.º 2
0
bool
BCMROMFN(wpa2_cipher)(wpa_suite_t *suite, ushort *cipher, bool wep_ok)
{
	return rsn_cipher(suite, cipher, (const uchar*)WPA2_OUI, wep_ok);
}