Nmap Development mailing list archives

Fix for compile error in tcpip.cc from r11592


From: jah <jah () zadkiel plus com>
Date: Sun, 04 Jan 2009 14:13:38 +0000

Hi folks,

I'm getting an error compiling r11637 on windows:

..\tcpip.cc(2732) : error C2027: use of undefined type
'collect_dnet_interfaces::dnet_collector_route_nfo'
        ..\tcpip.cc(2724) : see declaration of
'collect_dnet_interfaces::dnet_collector_route_nfo'

which I think is due to the code rearrangement in r11592.  The attached
places the definition of struct dnet_collector_route_nfo before
collect_dnet_interfaces() where it's first used.

Regards,

jah

--- tcpip.cc.orig       2009-01-04 13:59:42.234375000 +0000
+++ tcpip.cc    2009-01-04 14:04:43.125000000 +0000
@@ -2718,6 +2718,13 @@
 return -1;
 }
 
+struct dnet_collector_route_nfo {
+  struct sys_route *routes;
+  int numroutes;
+  int capacity; /* Capacity of routes or ifaces, depending on context */
+  struct interface_info *ifaces;
+  int numifaces;
+};
 
 #if WIN32
 static int collect_dnet_interfaces(const struct intf_entry *entry, void *arg) {
@@ -3098,14 +3105,6 @@
   return routes;
 }
 
-struct dnet_collector_route_nfo {
-  struct sys_route *routes;
-  int numroutes;
-  int capacity; /* Capacity of routes or ifaces, depending on context */
-  struct interface_info *ifaces;
-  int numifaces;
-};
-
 /* This is the callback for the call to route_loop in getsysroutes_dnet. It
    takes a route entry and adds it into the dnet_collector_route_nfo struct. */
 static int collect_dnet_routes(const struct route_entry *entry, void *arg) {

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: