verinec.netsim.firewall
Interface IFirewall

All Known Implementing Classes:
Firewall

public interface IFirewall

Version:
$Revision: 825 $
Author:
jason.hug@unifr.ch

Field Summary
static String FORWARD
          Specifies the direction of the traffic.
static String IN
          Specifies the direction of the traffic.
static String OUT
          Specifies the direction of the traffic.
 
Method Summary
 IPacketAction evalPacket(Packet packet, String interfaceRef, String direction, Node node, String simTime, ILogger eventsLog)
          Runs a packet through the packet-filter which determines what to do with the packet.
 String toString()
          This returns a String representation of the Firewall
 

Field Detail

OUT

static final String OUT
Specifies the direction of the traffic. Out meaning that the packet is being sent by a process. "out"

See Also:
Constant Field Values

IN

static final String IN
Specifies the direction of the traffic. In meaning the packet was received and should get relayed to a process. "in"

See Also:
Constant Field Values

FORWARD

static final String FORWARD
Specifies the direction of the traffic. Forward meaning that the packet will be forwarded to another interface. "forward"

See Also:
Constant Field Values
Method Detail

evalPacket

IPacketAction evalPacket(Packet packet,
                         String interfaceRef,
                         String direction,
                         Node node,
                         String simTime,
                         ILogger eventsLog)
                         throws DirectionException
Runs a packet through the packet-filter which determines what to do with the packet. This method receives a packet and checks in the defined packet-filter if there are any rules that match. If so the defined action is returned. If no match was observed the default policy of the packet-filter is returned.

Parameters:
packet - Packet to be inspected by the packet-filter.
interfaceRef - Specifies from which interface the packet came from. Here the ID-REF attribute of the ethernet-binding element is expected.
direction - Specifies in which direction the packet is going. Use FORWARD, IN OUT.
node - Node needed to find out in which state a tcp connection is in for stateful inspection.
simTime - Simulation time for stateful inspection. Needed to determine when a connection entry timesout.
eventsLog - The Verinec Simulator Event logger instance.
Returns:
The corresponding Action
Throws:
DirectionException - Throws this Exception if the direction specifies does not exist. Use FORWARD, IN OUT.

toString

String toString()
This returns a String representation of the Firewall

Overrides:
toString in class Object
Returns:
the a String representation of the Firewall

Copyright © 2005 Verinec, DIUF