diff options
Diffstat (limited to 'src/dumm/iface.h')
-rw-r--r-- | src/dumm/iface.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/dumm/iface.h b/src/dumm/iface.h index e04fe4ed1..e646724f0 100644 --- a/src/dumm/iface.h +++ b/src/dumm/iface.h @@ -25,6 +25,7 @@ typedef struct iface_t iface_t; #include "mconsole.h" #include "bridge.h" +#include "guest.h" /** * @brief Interface in a guest, connected to a tap device on the host. @@ -52,10 +53,19 @@ struct iface_t { */ void (*set_bridge)(iface_t *this, bridge_t *bridge); - /* - bool (*add_addr) (iface_t *this, host_t *addr); - enumerator_t* (*create_addr_enumerator) (iface_t *this); - */ + /** + * @brief Get the bridge this iface is connected, or NULL. + * + * @return connected bridge, or NULL + */ + bridge_t* (*get_bridge)(iface_t *this); + + /** + * @brief Get the guest this iface belongs to. + * + * @return guest of this iface + */ + guest_t* (*get_guest)(iface_t *this); /** * @brief Destroy an interface @@ -66,12 +76,12 @@ struct iface_t { /** * @brief Create a new interface for a guest * - * @param guest name of the guest for this interface - * @param guestif name of the interface in the guest + * @param name name of the interface in the guest + * @param guest guest this iface is connecting * @param mconsole mconsole of guest * @return interface descriptor, or NULL if failed */ -iface_t *iface_create(char *guest, char *guestif, mconsole_t *mconsole); +iface_t *iface_create(char *name, guest_t *guest, mconsole_t *mconsole); #endif /* IFACE_H */ |