ike-cfg: add methods to match a host against configured local/remote addresses

This commit is contained in:
Martin Willi
2013-09-04 10:38:37 +02:00
parent 7446fa2860
commit 6f666192bb
2 changed files with 62 additions and 0 deletions
+16
View File
@@ -93,6 +93,22 @@ struct ike_cfg_t {
*/
host_t* (*resolve_other)(ike_cfg_t *this, int family);
/**
* Check how good a host matches to the configured local address.
*
* @param host host to check match quality
* @return quality of the match, 0 if not matching at all
*/
u_int (*match_me)(ike_cfg_t *this, host_t *host);
/**
* Check how good a host matches to the configured remote address.
*
* @param host host to check match quality
* @return quality of the match, 0 if not matching at all
*/
u_int (*match_other)(ike_cfg_t *this, host_t *host);
/**
* Get own address.
*