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
+13
View File
@@ -23,6 +23,9 @@
#ifndef IPSEC_POLICY_MGR_H_
#define IPSEC_POLICY_MGR_H_
#include "ipsec_policy.h"
#include "ip_packet.h"
#include <library.h>
#include <utils/host.h>
#include <utils/linked_list.h>
@@ -89,6 +92,16 @@ struct ipsec_policy_mgr_t {
*/
status_t (*flush_policies)(ipsec_policy_mgr_t *this);
/**
* Find the policy that matches the given IP packet best
*
* @param packet IP packet to match
* @param inbound TRUE for an inbound packet
* @return reference to the policy, or NULL if none found
*/
ipsec_policy_t *(*find_by_packet)(ipsec_policy_mgr_t *this,
ip_packet_t *packet, bool inbound);
/**
* Destroy an ipsec_policy_mgr_t
*/