]> git.decadent.org.uk Git - ap-utils.git/blobdiff - src/ap-mrtg.c
Imported Upstream version 1.5
[ap-utils.git] / src / ap-mrtg.c
index b64a4e8582e5a1be247a134149844d0c0c22f962..7dec50ace31fcf7d28dfc20e701c1777a432dc14 100644 (file)
@@ -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;
 }
-