tun_device: add a getter for the address previously passed to set_address()

This commit is contained in:
Martin Willi
2013-05-06 16:10:11 +02:00
parent 60babe0236
commit 2af65b26d9
2 changed files with 32 additions and 0 deletions
@@ -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
*