diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-07-13 15:18:07 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-08 15:41:03 +0200 |
commit | 2e1a19136d8123e5a8c9aa99afbb4a51d92ec2a6 (patch) | |
tree | 9488d7e0e43cafe3bd7aa5a9f93af9f88eca7244 /src/libipsec/ipsec_policy.h | |
parent | 2dd47c244275abc43a597b50b95a792d1aecc3cd (diff) | |
download | strongswan-2e1a19136d8123e5a8c9aa99afbb4a51d92ec2a6.tar.bz2 strongswan-2e1a19136d8123e5a8c9aa99afbb4a51d92ec2a6.tar.xz |
IPsec policies can be looked up based on an IP packet
Diffstat (limited to 'src/libipsec/ipsec_policy.h')
-rw-r--r-- | src/libipsec/ipsec_policy.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libipsec/ipsec_policy.h b/src/libipsec/ipsec_policy.h index 08069307a..67ad0b0ed 100644 --- a/src/libipsec/ipsec_policy.h +++ b/src/libipsec/ipsec_policy.h @@ -23,6 +23,8 @@ #ifndef IPSEC_POLICY_H #define IPSEC_POLICY_H +#include "ip_packet.h" + #include <library.h> #include <utils/host.h> #include <ipsec/ipsec_types.h> @@ -100,6 +102,14 @@ struct ipsec_policy_t { u_int32_t reqid, mark_t mark, policy_priority_t priority); /** + * Check if this policy matches the given IP packet + * + * @param packet IP packet + * @return TRUE if policy matches the packet + */ + bool (*match_packet)(ipsec_policy_t *this, ip_packet_t *packet); + + /** * Destroy an ipsec_policy_t */ void (*destroy)(ipsec_policy_t *this); |