IPsec policies can be looked up based on an IP packet

This commit is contained in:
Tobias Brunner
2012-08-08 15:41:03 +02:00
parent 2dd47c2442
commit 2e1a19136d
4 changed files with 62 additions and 1 deletions
+10
View File
@@ -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>
@@ -99,6 +101,14 @@ struct ipsec_policy_t {
traffic_selector_t *dst_ts, policy_dir_t direction,
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
*/