short ap_type;
char *community = NULL;
-int sockfd;
struct in_addr ap_ip;
void usage()
int i, reset_flag=0;
char message[12], bssid_flag, stat_type = 0, *ERR_STR =
ERR_STR_N, *bssid = NULL, *name = NULL, *cp;
- struct sockaddr_in client;
#ifdef HAVE_GETTEXT
setlocale(LC_ALL, "");
textdomain("ap-utils");
#endif
- memset(&client, 0, sizeof client);
- client.sin_family = AF_INET;
- client.sin_port = INADDR_ANY;
- client.sin_addr.s_addr = INADDR_ANY;
-
if (argc < 4) {
usage();
exit(0);
goto quit;
}
- if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
- perror(_("Create socket error"));
- return 1;
- }
- if (bind(sockfd, (struct sockaddr *) &client, SIZE) == -1) {
- perror(_("Bind socket error"));
- return 1;
- }
-
/*
* Part detecting ap_type (ATMEL AP MIB type) follows.
* We could use get_mib_details() here with advantage, but it would
printf("-\n");
}
- close(sockfd);
-
-
quit:
if (community)
free(community);
free(name);
return 0;
}
-