Pass sockets to bypass to kernel interface, allowing us to register them dynamically

This commit is contained in:
Martin Willi
2010-02-26 11:44:33 +01:00
parent 3e631491a0
commit 54f818590e
11 changed files with 141 additions and 274 deletions
+9
View File
@@ -332,6 +332,15 @@ struct kernel_interface_t {
status_t (*del_route) (kernel_interface_t *this, chunk_t dst_net, u_int8_t prefixlen,
host_t *gateway, host_t *src_ip, char *if_name);
/**
* Set up a bypass policy for a given socket.
*
* @param fd socket file descriptor to setup policy for
* @param family protocol family of the socket
* @return TRUE of policy set up successfully
*/
bool (*bypass_socket)(kernel_interface_t *this, int fd, int family);
/**
* manager methods
*/