|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.netsim.firewall.packetFilter.PacketFilterChain
public class PacketFilterChain
| Field Summary | |
|---|---|
private DefaultPolicy |
defaultPolicy
Default Policy of the chain. |
private String |
id
ID of the chain. |
private Logger |
logger
|
private String |
name
Name of the chain. |
private Vector |
packetFilterRules
Packet Filter Rules of the chain. |
private int |
rulePosition
What rule positon the chain jumped from. |
| Constructor Summary | |
|---|---|
PacketFilterChain(Element node)
Creates a new Packet Filter Chain and configures the default policy and the packet filter rules which are specified in the node Element. |
|
PacketFilterChain(String name)
Creates a Packet Filter Chain with an empty rule-set and with an ACCEPT Default Policy. |
|
| Method Summary | |
|---|---|
DefaultPolicy |
getDefaultPolicy()
|
String |
getId()
|
String |
getName()
|
Vector |
getPacketFilterRules()
|
int |
getRulePosition()
|
private void |
initPacketFilterRules(List rules)
|
IPacketAction |
matchAction(Packet packet,
String interfaceRef,
String direction,
String hostname,
String simTime,
ILogger eventsLog)
This method receives a packet and checks in the defined packet-filter-chains if there are any rules that match. |
boolean |
matchId(String id)
Checks if a specified id matches this packet filter chains id. |
void |
setDefaultPolicy(DefaultPolicy defaultPolicy)
|
void |
setId(String id)
|
void |
setName(String name)
|
void |
setPacketFilterRules(Vector packetFilterRules)
|
void |
setRulePosition(int rulePosition)
|
String |
toString()
This returns a String representation of the Packet Filter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Logger logger
private String name
private String id
private int rulePosition
private DefaultPolicy defaultPolicy
private Vector packetFilterRules
| Constructor Detail |
|---|
public PacketFilterChain(Element node)
node - Element which specifies the configs for the default policy and packet filter rules.public PacketFilterChain(String name)
name - Name of the chain.| Method Detail |
|---|
public IPacketAction matchAction(Packet packet,
String interfaceRef,
String direction,
String hostname,
String simTime,
ILogger eventsLog)
IPacketFilter
matchAction in interface IPacketFilterpacket - Packet that should be inspected.interfaceRef - From which interface the packet came from.direction - In which direction the packet is heading. Use @link verinec.netsim.firewall.IFirewall#IN IN, @link verinec.netsim.firewall.IFirewall#OUT OUT or @link verinec.netsim.firewall.IFirewall#FORWARD FORWARD.hostname - The hostname of the node for which the firewall is checking for.simTime - Simulation time at which the firewall is being consulted.eventsLog - The Verinec Simulator Event logger instance.
IPacketFilter.matchAction(verinec.netsim.entities.packets.Packet, java.lang.String, java.lang.String, java.lang.String, java.lang.String, verinec.netsim.loggers.ILogger)public boolean matchId(String id)
id - The ID to match
private void initPacketFilterRules(List rules)
public DefaultPolicy getDefaultPolicy()
public void setDefaultPolicy(DefaultPolicy defaultPolicy)
defaultPolicy - The defaultPolicy to set.public String getId()
public void setId(String id)
id - The id to set.public String getName()
public void setName(String name)
name - The name to set.public Vector getPacketFilterRules()
public void setPacketFilterRules(Vector packetFilterRules)
packetFilterRules - The packetFilterRules to set.public String toString()
IPacketFilter
toString in interface IPacketFiltertoString in class ObjectIPacketFilter.toString()public int getRulePosition()
public void setRulePosition(int rulePosition)
rulePosition - The rulePosition to set.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||