From c60c7694d2d8925c5d93ff33d132f561ad89e071 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 28 Feb 2007 14:04:36 +0000 Subject: merged tasking branch into trunk --- src/charon/threads/kernel_interface.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/charon/threads/kernel_interface.h') 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 @@ -263,6 +263,40 @@ struct kernel_interface_t { traffic_selector_t *dst_ts, 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. * -- cgit v1.2.3