diff options
Diffstat (limited to 'src/charon/threads/kernel_interface.h')
-rw-r--r-- | src/charon/threads/kernel_interface.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/charon/threads/kernel_interface.h b/src/charon/threads/kernel_interface.h index 991d8e17c..805a2b89d 100644 --- a/src/charon/threads/kernel_interface.h +++ b/src/charon/threads/kernel_interface.h @@ -264,6 +264,40 @@ struct kernel_interface_t { policy_dir_t direction); /** + * @brief Add a virtual IP to an interface. + * + * Virtual IPs are attached to an interface. If an IP is added multiple + * times, the IP is refcounted and not removed until del_ip() was called + * as many times as add_ip(). + * The virtual IP is attached to the interface used to reach a specified + * destination host. + * + * @param this calling object + * @param virtual_ip virtual ip address to assign + * @param dst_ip destination host to select outgoing interface + * @return + * - SUCCESS + * - FAILED if kernel comm failed + */ + status_t (*add_ip) (kernel_interface_t *this, host_t *virtual_ip, + host_t *dst_ip); + + /** + * @brief Remove a virtual IP from an interface. + * + * The kernel interface uses refcounting, see add_ip(). + * + * @param this calling object + * @param virtual_ip virtual ip address to assign + * @param dst_ip destination host to select outgoing interface + * @return + * - SUCCESS + * - FAILED if kernel comm failed + */ + status_t (*del_ip) (kernel_interface_t *this, host_t *virtual_ip, + host_t *dst_ip); + + /** * @brief Destroys a kernel_interface object. * * @param kernel_interface_t calling object |