diff --git a/libdnet-stripped/NMAP_MODIFICATIONS b/libdnet-stripped/NMAP_MODIFICATIONS index 1fa230aa2..1707c7e1f 100644 --- a/libdnet-stripped/NMAP_MODIFICATIONS +++ b/libdnet-stripped/NMAP_MODIFICATIONS @@ -346,3 +346,37 @@ Index: src/intf-win32.c for (i = 0; i < intf->ifcombo[ifrow->dwType].cnt; i++) { if (intf->ifcombo[ifrow->dwType].idx[i] == ifrow->dwIndex) + +o Show a warning whenever a Windows interface type is unrecognized. +Index: src/intf-win32.c +=================================================================== +--- src/intf-win32.c (revision 6321) ++++ src/intf-win32.c (working copy) +@@ -23,6 +23,8 @@ + #include + #include + ++#include "err.h" ++ + #include "pcap.h" + + struct ifcombo { +@@ -42,7 +44,7 @@ + static char * + _ifcombo_name(int type) + { +- char *name = "net"; /* XXX */ ++ char *name; + + if (type == MIB_IF_TYPE_ETHERNET) { + name = "eth"; +@@ -56,6 +58,9 @@ + name = "lo"; + } else if (type == MIB_IF_TYPE_SLIP) { + name = "sl"; ++ } else { ++ name = "net"; ++ warnx("_ifcombo_name: Mapping unknown interface type %d to \"%s\".\n", type, name); + } + return (name); + } diff --git a/libdnet-stripped/src/intf-win32.c b/libdnet-stripped/src/intf-win32.c index 367b5ccfc..184a636f9 100644 --- a/libdnet-stripped/src/intf-win32.c +++ b/libdnet-stripped/src/intf-win32.c @@ -23,6 +23,8 @@ #include #include +#include "err.h" + #include "pcap.h" struct ifcombo { @@ -42,7 +44,7 @@ struct intf_handle { static char * _ifcombo_name(int type) { - char *name = "net"; /* XXX */ + char *name; if (type == MIB_IF_TYPE_ETHERNET) { name = "eth"; @@ -56,6 +58,9 @@ _ifcombo_name(int type) name = "lo"; } else if (type == MIB_IF_TYPE_SLIP) { name = "sl"; + } else { + name = "net"; + warnx("_ifcombo_name: Mapping unknown interface type %d to \"%s\".\n", type, name); } return (name); }