Azinix

evl.c File Reference

Rule evaluation code. More...

#include "evl.h"

Go to the source code of this file.

Functions

int Evl_ComputeL7RuleSet (Evl_L4LookupTable_t *aRuleTable, Evl_L4Flow_t *aFlow)
 Core evaluation function - takes a flow, returns set of applicable L7 rules.
util_int_array_tEvl_ComputeL7RuleArray (Evl_L4LookupTable_t *aRuleTable, Evl_L4Flow_t *aFlow)
 Core evaluation function - takes a flow, returns array of applicable L7 rules.
void Evl_ComputeRuleSetForEth (Pkt_ProcessPkt_t *pp, Evl_Manager_t *globalMgr)
 Given an ethernet packet and Evl_Manager_t encoding a set of rules, determine all rules applicable to the packet.
void Evl_L4ComputeRuleSetForEth (Pkt_ProcessPkt_t *pp, Evl_L4Manager_t *l4mgr, array_t *result)
 Compute rules for an ip packet based on the L4 structure.
int Evl_EthEvalL7RuleContentCheck (Pkt_EthernetHdr_t *anEth, array_t *aL7CheckArray)
 Check content of an Eth packet. aL7CheckArray is an array of Rlp_L7Check_t *.
void Evl_EvalRuleArray (Evl_L4Manager_t *mgr, Pkt_ProcessPkt_t *pp, array_t *ruleArray, util_int_array_t *ruleIntArray, array_t *result)
 Given an array_t or util_int_array_t of rules, return the subset that is applicable of the given packet.
bool Evl_EthEvalL7Rule (Pkt_ProcessPkt_t *pp, Rlp_Formula_t *aL7Formula, array_t *aL7CheckArray)
 Given an ethernet packet and a layer 7 rule, determine if the rule holds of the packet.
int Evl_Preprocess (Evl_L4Manager_t *preprocessorMgr, Pkt_ProcessPkt_t *pp)
 Perform preprocessing actions.


Detailed Description

Rule evaluation code.

Definition in file evl.c.


Function Documentation

util_int_array_t* Evl_ComputeL7RuleArray ( Evl_L4LookupTable_t aRuleTable,
Evl_L4Flow_t aFlow 
)

Core evaluation function - takes a flow, returns array of applicable L7 rules.

Definition at line 94 of file evl.c.

int Evl_ComputeL7RuleSet ( Evl_L4LookupTable_t aRuleTable,
Evl_L4Flow_t aFlow 
)

Core evaluation function - takes a flow, returns set of applicable L7 rules.

Definition at line 74 of file evl.c.

void Evl_ComputeRuleSetForEth ( Pkt_ProcessPkt_t pp,
Evl_Manager_t globalMgr 
)

Given an ethernet packet and Evl_Manager_t encoding a set of rules, determine all rules applicable to the packet.

Packet is assumed to be in host order. Caller must pass in the array_t into which results are written.

Not handling icmp, just tcp, udp, ip

Definition at line 167 of file evl.c.

bool Evl_EthEvalL7Rule ( Pkt_ProcessPkt_t pp,
Rlp_Formula_t aL7Formula,
array_t aL7CheckArray 
)

Given an ethernet packet and a layer 7 rule, determine if the rule holds of the packet.

Pass in an array of Rlp_L7Check_t for the content check; if it's NIL there are no content checks.

Definition at line 1379 of file evl.c.

int Evl_EthEvalL7RuleContentCheck ( Pkt_EthernetHdr_t anEth,
array_t aL7CheckArray 
)

Check content of an Eth packet. aL7CheckArray is an array of Rlp_L7Check_t *.

Definition at line 403 of file evl.c.

void Evl_EvalRuleArray ( Evl_L4Manager_t mgr,
Pkt_ProcessPkt_t pp,
array_t ruleArray,
util_int_array_t ruleIntArray,
array_t result 
)

Given an array_t or util_int_array_t of rules, return the subset that is applicable of the given packet.

Result must be passed in, and be as long as there are rules in the mgr.

Definition at line 969 of file evl.c.

void Evl_L4ComputeRuleSetForEth ( Pkt_ProcessPkt_t pp,
Evl_L4Manager_t l4mgr,
array_t result 
)

Compute rules for an ip packet based on the L4 structure.

This only works for certain l4 protocols, such as tcp, udp, icmp (Currently, we use it for ip too)

Definition at line 244 of file evl.c.

int Evl_Preprocess ( Evl_L4Manager_t preprocessorMgr,
Pkt_ProcessPkt_t pp 
)

Perform preprocessing actions.

Definition at line 1696 of file evl.c.