network/netdev: add attach(), detach(), set_ifindex(), and get_ifindex() to netdev vtable
Currently no vtable sets these functions, but will be used later.
This commit is contained in:
@@ -169,6 +169,16 @@ typedef struct NetDevVTable {
|
||||
/* verify that compulsory configuration options were specified */
|
||||
int (*config_verify)(NetDev *netdev, const char *filename);
|
||||
|
||||
/* attach/detach additional interfaces, e.g. veth peer or L2TP sessions. */
|
||||
int (*attach)(NetDev *netdev);
|
||||
void (*detach)(NetDev *netdev);
|
||||
|
||||
/* set ifindex of the created interface. */
|
||||
int (*set_ifindex)(NetDev *netdev, const char *name, int ifindex);
|
||||
|
||||
/* get ifindex of the netdev. */
|
||||
int (*get_ifindex)(NetDev *netdev, const char *name);
|
||||
|
||||
/* expected iftype, e.g. ARPHRD_ETHER. */
|
||||
uint16_t iftype;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user