Azinix

evlMain.c File Reference

Routines for implementing the overall architecture of Narya firewalling, also some test routines. More...

#include "evl.h"

Go to the source code of this file.

Functions

int Evl_Route (Evl_Manager_t *aMgr, array_t *pktArray, int iBufSize, int ppCacheSize, int oBufSize, int actionBufSize, int maxNumPktsToRead, int numIterations, bool useSynthetic, array_t *inArray, array_t *outArray, double basicSlice, int getPacketsWeight, int computeActionsWeight, int performActionsWeight, int queuingWeight, int writePacketsWeight, array_t *ackSeqArray, Evl_BridgeStats_t **statsPtr)
 Actual firewall code. Has synthetic input mode for testing.
int Evl_InsertPacketInQueue (Evl_Manager_t *aMgr, Q_Q_t *aQ, Pkt_ProcessPkt_t *pp, Evl_Action_t *action)
 Add a packet (actually Pkt_ProcessPkt_t *) to a q - may drop if resources are overused.
int Evl_TestManager (Evl_Manager_t *aMgr)
 Routine for testing the manager structure built by Evl_BuildManager.
bool Evl_DoAction (Evl_Action_t *action, Evl_Manager_t *mgr, Evl_Bridge_t *bridge, Pkt_ProcessPkt_t *pp)
 Perform action on packet. Return 1 if packet is to be dropped, 0 otherwise.
void Evl_BridgeInsertPktInIbuf (Evl_Bridge_t *aBridge, Pkt_EthernetHdr_t *aPkt)
 Insert a packet into the bridge iBuf, meant to support scripts/code adding control/reset packets.


Detailed Description

Routines for implementing the overall architecture of Narya firewalling, also some test routines.

Definition in file evlMain.c.


Function Documentation

void Evl_BridgeInsertPktInIbuf ( Evl_Bridge_t aBridge,
Pkt_EthernetHdr_t aPkt 
)

Insert a packet into the bridge iBuf, meant to support scripts/code adding control/reset packets.

Definition at line 1472 of file evlMain.c.

bool Evl_DoAction ( Evl_Action_t action,
Evl_Manager_t mgr,
Evl_Bridge_t bridge,
Pkt_ProcessPkt_t pp 
)

Perform action on packet. Return 1 if packet is to be dropped, 0 otherwise.

Must not be called with queuing actions.

Definition at line 1064 of file evlMain.c.

int Evl_InsertPacketInQueue ( Evl_Manager_t aMgr,
Q_Q_t aQ,
Pkt_ProcessPkt_t pp,
Evl_Action_t action 
)

Add a packet (actually Pkt_ProcessPkt_t *) to a q - may drop if resources are overused.

Return 1 if succ, 0 if dropped.

Definition at line 796 of file evlMain.c.

int Evl_Route ( Evl_Manager_t aMgr,
array_t pktArray,
int  iBufSize,
int  ppCacheSize,
int  oBufSize,
int  actionBufSize,
int  maxNumPktsToRead,
int  numIterations,
bool  useSynthetic,
array_t inArray,
array_t outArray,
double  basicSlice,
int  getPacketsWeight,
int  computeActionsWeight,
int  performActionsWeight,
int  queuingWeight,
int  writePacketsWeight,
array_t ackSeqArray,
Evl_BridgeStats_t **  statsPtr 
)

Actual firewall code. Has synthetic input mode for testing.

Definition at line 81 of file evlMain.c.

int Evl_TestManager ( Evl_Manager_t aMgr  ) 

Routine for testing the manager structure built by Evl_BuildManager.

Definition at line 972 of file evlMain.c.