mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 18:39:03 +00:00
List formatting for get_interface_info NSEDoc.
This commit is contained in:
@@ -84,29 +84,21 @@ function get_interface()
|
||||
-- This function takes a dnet-style interface name and returns a table
|
||||
-- containing the network information of the interface.
|
||||
--
|
||||
-- Keys of the returned table:
|
||||
-- * <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>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>.
|
||||
-- * <code>up</code> The state of the interface, possible values are <code>"up"</code> or <code>"down"</code>.
|
||||
-- * <code>mtu</code> The MTU size of the interface.
|
||||
--
|
||||
-- @param interface_name The name of the interface.
|
||||
-- @return Table containing the network information of the interface on
|
||||
-- success, or nil and an error message on failures.
|
||||
-- @usage local iface, err = nmap.get_interface_info("eth0")
|
||||
--
|
||||
-- Keys of the returned table:
|
||||
-- <code>device</code> The interface name, can be an interface aliase.
|
||||
-- <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>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 nil.
|
||||
-- <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 nil.
|
||||
-- <code>up</code> The state of the interface, possible values are:
|
||||
-- <code>"up"</code> or <code>"down"</code>.
|
||||
-- <code>mtu</code> The MTU size of the interface.
|
||||
function get_interface_info(interface_name)
|
||||
|
||||
--- Searches for the specified file and returns a string containing its path if
|
||||
|
||||
Reference in New Issue
Block a user