source address lookup in kernel interface

use it for NAT detection if no source address known from config
  support for %any...%any connections
This commit is contained in:
Martin Willi
2007-06-18 07:25:58 +00:00
parent 209c2e9049
commit 7068410b6f
4 changed files with 127 additions and 21 deletions
+12
View File
@@ -267,6 +267,18 @@ struct kernel_interface_t {
traffic_selector_t *dst_ts,
policy_dir_t direction);
/**
* @brief Get our outgoing source address for a destination.
*
* Does a route lookup to get the source address used to reach dest.
* The returned host is allocated and must be destroyed.
*
* @param this calling object
* @param dest target destination address
* @return outgoing source address, NULL if unreachable
*/
host_t* (*get_source_addr)(kernel_interface_t *this, host_t *dest);
/**
* @brief Get the interface name of a local address.
*