mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Fix inaccuracies in NSEdoc for get_interface() and get_interface_info()
This commit is contained in:
@@ -82,12 +82,11 @@ function resolve(host, family)
|
||||
-- @usage local family = nmap.address_family()
|
||||
function address_family()
|
||||
|
||||
--- Returns the interface name (dnet-style) that Nmap is using.
|
||||
--- Returns the interface name provided via the <code>-e</code> option.
|
||||
--
|
||||
-- For example in the pre-scanning (<code>"prerule"</code> scripts) phase
|
||||
-- if Nmap is run with the <code>-e eth0</code>, then "eth0" can be
|
||||
-- returned, however Nmap can return an other interface name since it
|
||||
-- can determine the best interface suited for the job.
|
||||
-- if Nmap is run with the <code>-e eth0</code>, then "eth0" will be
|
||||
-- returned.
|
||||
-- Other <code>"hostrule"</code> and <code>"portrule"</code> scripts
|
||||
-- should use the interface field of the <code>host</code> table:
|
||||
-- <code>host.interface</code>.
|
||||
@@ -96,7 +95,7 @@ function address_family()
|
||||
-- table, example: <code>nmap.get_interface_info("eth0")</code>.
|
||||
--
|
||||
-- @return A string containing the interface name (dnet-style) on
|
||||
-- success, or a nil value on failures.
|
||||
-- success, or a nil value if the <code>-e</code> option was not used.
|
||||
-- @usage local interface_name = nmap.get_interface()
|
||||
function get_interface()
|
||||
|
||||
@@ -109,7 +108,7 @@ function get_interface()
|
||||
-- * <code>device</code> The interface name, can be an interface alias.
|
||||
-- * <code>shortname</code> A simple short name of the device.
|
||||
-- * <code>netmask</code> The netmask bits (CIDR) of the interface.
|
||||
-- * <code>address</code> The string representing the IP address assigned to the interface.
|
||||
-- * <code>address</code> The string representing the first IP address (of the family <code>nmap.address_family()</code>) assigned to the interface.
|
||||
-- * <code>link</code> The string representing the hardware type of the interface. Possible values are: <code>"ethernet"</code>, <code>"loopback"</code>, <code>"p2p"</code> or <code>"other"</code>.
|
||||
-- * <code>mac</code> MAC address (six-byte-long binary string) of the interface if the type of the interface is <code>"ethernet"</code>, otherwise it is <code>nil</code>.
|
||||
-- * <code>broadcast</code> The string representing the broadcast address assigned to the interface if the interface type is <code>"ethernet"</code> and if the used address is IPv4, otherwise it is <code>nil</code>.
|
||||
|
||||
Reference in New Issue
Block a user