socket: SIOCGIFINDEX

This commit is contained in:
Matheus
2026-09-10 23:52:48 -03:00
parent 485cf616b2
commit 5aca46e22c
4 changed files with 9 additions and 0 deletions
+2
View File
@@ -184,6 +184,7 @@ typedef struct {
#define SIOCSIFADDR 0x8916
#define SIOCGIFMTU 0x8921
#define SIOCGIFHWADDR 0x8927
#define SIOCGIFINDEX 0x8933
#define SIOCADDRT 0x890b
#define FIONREAD 0x541B
#define FIONBIO 0x5421
@@ -193,6 +194,7 @@ typedef struct {
union {
abisockaddr_t addr;
int mtu;
int ifindex;
short flags;
};
} ifreq_t;
+1
View File
@@ -37,6 +37,7 @@ typedef struct {
typedef struct netdev_t {
mac_t mac;
int ifindex;
size_t mtu;
uint32_t ip;
int ipcurrid; // XXX This is defined as something per peer. However, having only one of these *should* work for most cases