X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=src%2Fap-mrtg.c;h=7dec50ace31fcf7d28dfc20e701c1777a432dc14;hb=da79bf227b1bf56497247d54d07d14798d0e2f29;hp=b64a4e8582e5a1be247a134149844d0c0c22f962;hpb=16204dfc7715783c2ebdfb55fc44fb9344613a76;p=ap-utils.git diff --git a/src/ap-mrtg.c b/src/ap-mrtg.c index b64a4e8..7dec50a 100644 --- a/src/ap-mrtg.c +++ b/src/ap-mrtg.c @@ -34,7 +34,6 @@ short ap_type; char *community = NULL; -int sockfd; struct in_addr ap_ip; void usage() @@ -112,7 +111,6 @@ int main(int argc, char **argv) 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, ""); @@ -120,11 +118,6 @@ int main(int argc, char **argv) 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); @@ -174,15 +167,6 @@ int main(int argc, char **argv) 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 @@ -429,9 +413,6 @@ int main(int argc, char **argv) printf("-\n"); } - close(sockfd); - - quit: if (community) free(community); @@ -443,4 +424,3 @@ int main(int argc, char **argv) free(name); return 0; } -