we don't handle; there's no need to print "Unknown subtype N" as well.
Revert to using null strings for the unknown management frame types -
that way we don't have to check for a null pointer.
#ifndef lint
static const char rcsid[] _U_ =
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.34 2005-07-30 00:05:32 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.35 2005-07-30 18:48:35 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#endif
#ifdef HAVE_CONFIG_H
"ReAssoc Response",
"Probe Request",
"Probe Response",
"ReAssoc Response",
"Probe Request",
"Probe Response",
"Beacon",
"ATIM",
"Disassociation",
"Authentication",
"DeAuthentication",
"Beacon",
"ATIM",
"Disassociation",
"Authentication",
"DeAuthentication",
};
static const char *status_text[] = {
};
static const char *status_text[] = {
mgmt_body_print(u_int16_t fc, const struct mgmt_header_t *pmh,
const u_char *p)
{
mgmt_body_print(u_int16_t fc, const struct mgmt_header_t *pmh,
const u_char *p)
{
- if (subtype_text[FC_SUBTYPE(fc)] != NULL)
- printf("%s", subtype_text[FC_SUBTYPE(fc)]);
- else
- printf("Unknown subtype %u", FC_SUBTYPE(fc));
+ printf("%s", subtype_text[FC_SUBTYPE(fc)]);
switch (FC_SUBTYPE(fc)) {
case ST_ASSOC_REQUEST:
switch (FC_SUBTYPE(fc)) {
case ST_ASSOC_REQUEST: