tun_device: add a getter for the address previously passed to set_address()
This commit is contained in:
@@ -65,6 +65,14 @@ struct tun_device_t {
|
||||
*/
|
||||
bool (*set_address)(tun_device_t *this, host_t *addr, u_int8_t netmask);
|
||||
|
||||
/**
|
||||
* Get the IP address previously assigned to using set_address().
|
||||
*
|
||||
* @param netmask pointer receiving the configured netmask, or NULL
|
||||
* @return address previously set, NULL if none
|
||||
*/
|
||||
host_t* (*get_address)(tun_device_t *this, u_int8_t *netmask);
|
||||
|
||||
/**
|
||||
* Bring the TUN device up
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user