Added support for wlanctl commands that come from multiple categories.

We still need to fix print_allrequests() to display metadata from
categories other than dot11req.
This commit is contained in:
mark 2000-01-12 06:31:02 +00:00
parent 1568e9d2bc
commit 8e67bed9d2
3 changed files with 17 additions and 2 deletions

View file

@ -45,6 +45,7 @@
#include <wlan/p80211meta.h>
#include <wlan/p80211metamsg.h>
#include <wlan/p80211msg.h>
#include "wlanctl.h"
/*================================================================*/
/* Local Constants */
@ -122,6 +123,7 @@ void print_allrequests(void)
int ncmds;
p80211enum_t *enump;
/* TODO: Fix this for multiple message categories */
ncmds = GETMETASIZE(msg_catlist[P80211SEC_DOT11REQ].grplist);

View file

@ -67,6 +67,11 @@
char *devname;
char *cmdcats[] = {
"dot11req",
"lnxreq"
};
/*================================================================*/
/* Local Function Declarations */
@ -95,8 +100,9 @@ void do_ioctl( UINT8 *msg, UINT32 msgcode );
int main ( int argc, char **argv )
{
UINT8 message[MSG_BUFF_LEN];
UINT32 msgcode;
UINT32 msgcode = P80211DID_INVALID;
INT result = 0;
INT i;
if ( argc < 4 && argc >= 2 && strcmp( argv[1], "version") == 0) {
printf("wlanctl: %s\n", WLAN_RELEASE);
@ -111,7 +117,13 @@ int main ( int argc, char **argv )
devname = argv[1];
/* returns P80211DID_INVALID no match */
msgcode = p80211_text2did(msg_catlist, "dot11req", argv[2], NULL);
for ( i = 0; i < sizeof(cmdcats)/sizeof(cmdcats[0]); i++) {
msgcode = p80211_text2did(msg_catlist,
cmdcats[i], argv[2], NULL);
if ( msgcode != P80211DID_INVALID ) {
break;
}
}
if (msgcode != P80211DID_INVALID) { /* msgcode valid */
result = cmdline2requestmsg( message, msgcode, argc, argv );

View file

@ -52,6 +52,7 @@
/*================================================================*/
/* Extern Declarations */
extern char *cmdcats[];
/*================================================================*/
/* Function Declarations */