mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Add an ifindex member to interface_info.
This is a copy of intf_index from libdnet.
This commit is contained in:
parent
4f454a29d2
commit
77204b9d43
2 changed files with 3 additions and 0 deletions
|
|
@ -1204,6 +1204,8 @@ static int collect_dnet_interfaces(const struct intf_entry *entry, void *arg) {
|
|||
dcrn->ifaces[dcrn->numifaces].device_type = devt_other;
|
||||
}
|
||||
|
||||
dcrn->ifaces[dcrn->numifaces].ifindex = entry->intf_index;
|
||||
|
||||
dcrn->ifaces[dcrn->numifaces].mtu = entry->intf_mtu;
|
||||
|
||||
/* Is the interface up and running? */
|
||||
|
|
|
|||
|
|
@ -259,6 +259,7 @@ struct interface_info {
|
|||
struct sockaddr_storage addr;
|
||||
u16 netmask_bits; /* CIDR-style. So 24 means class C (255.255.255.0)*/
|
||||
devtype device_type; /* devt_ethernet, devt_loopback, devt_p2p, devt_other */
|
||||
unsigned int ifindex; /* index (as used by if_indextoname and sin6_scope_id) */
|
||||
int device_up; /* True if the device is up (enabled) */
|
||||
int mtu; /* Interface's MTU size */
|
||||
u8 mac[6]; /* Interface MAC address if device_type is devt_ethernet */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue