diff --git a/CHANGELOG b/CHANGELOG index 87c6bd688..37f5fc22f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ # Nmap Changelog ($Id$); -*-text-*- +o [NSE] Removed the nmap.get_interface_link function, which was + deprecated by the new nmap.get_interface_info. The sniffer-detect + script now calls the nmap.get_interface_info function to retrieve + the network interface link type. [Djalal] + o [NSE] Fixed a bug reported by Daniel Miller that was causing the nfs-ls script to ignore NFS mounts when the Mount version is 1. [Djalal] diff --git a/nse_dnet.cc b/nse_dnet.cc index 1015436a6..1c1cbbaa3 100644 --- a/nse_dnet.cc +++ b/nse_dnet.cc @@ -113,31 +113,6 @@ LUALIB_API int l_dnet_get_interface_info (lua_State *L) return 1; } -LUALIB_API int l_dnet_get_interface_link (lua_State *L) -{ - struct interface_info *ii = getInterfaceByName(luaL_checkstring(L, 1)); - - if (ii == NULL) - return luaL_argerror(L, 1, "bad interface"); - - switch (ii->device_type) - { - case devt_ethernet: - lua_pushliteral(L, "ethernet"); - return 1; - case devt_loopback: - lua_pushliteral(L, "loopback"); - return 1; - case devt_p2p: - lua_pushliteral(L, "p2p"); - return 1; - case devt_other: - default: - lua_pushnil(L); - return 1; - } -} - static int close_eth (lua_State *L) { eth_t **eth = (eth_t **) luaL_checkudata(L, 1, DNET_ETH_METATABLE); diff --git a/nse_dnet.h b/nse_dnet.h index 5f0a216b4..588702a7f 100644 --- a/nse_dnet.h +++ b/nse_dnet.h @@ -2,7 +2,6 @@ #define NMAP_LUA_DNET_H LUALIB_API int l_dnet_new (lua_State *); -LUALIB_API int l_dnet_get_interface_link (lua_State *); LUALIB_API int l_dnet_get_interface_info (lua_State *); LUALIB_API int luaopen_dnet (lua_State *L); diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index e2d6ecb56..31333845b 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -763,7 +763,6 @@ int luaopen_nmap (lua_State *L) {"port_is_excluded", l_port_is_excluded}, {"new_socket", l_nsock_new}, {"new_dnet", l_dnet_new}, - {"get_interface_link", l_dnet_get_interface_link}, {"clock_ms", l_clock_ms}, {"clock", l_clock}, {"log_write", l_log_write}, diff --git a/nselib/nmap.luadoc b/nselib/nmap.luadoc index ca43677ca..8de73e4c4 100644 --- a/nselib/nmap.luadoc +++ b/nselib/nmap.luadoc @@ -230,18 +230,6 @@ function clock() -- @usage local now = nmap.clock_ms() function clock_ms() ---- Gets the link-level hardware type of an interface. --- --- This function takes a dnet-style interface name and returns a string --- representing the hardware type of the interface. Possible return values are --- "ethernet", "loopback", "p2p", or --- nil if none of the other types apply. --- @param interface_name The name of the interface. --- @return "ethernet", "loopback", --- "p2p", or nil. --- @usage iface_type = nmap.get_interface_link("eth0") -function get_interface_link(interface_name) - --- Create a mutex on an object. -- -- This function returns another function that works as a mutex on the object