|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimnet.IPFilter
Maintain a set of Rules and BPF Filters for a link.
| Field Summary | |
int |
id
Filter ID |
| Constructor Summary | |
IPFilter()
|
|
| Method Summary | |
abstract void |
addBPF(BPF bpf)
Adds the specified BPF rule to this IPFilter. |
abstract void |
addRule(int rule_id,
int action,
int protocol,
int src_id,
int dest_id,
int dest_port)
Adds a firewall rule matching the specified criterias to this IPFilter. |
abstract void |
addRule(Rule rule)
Adds the specified firewall rule to this IPFilter. |
protected void |
finalize()
For debugging |
abstract boolean |
in(IP_Packet ipp)
Processes incoming IP packets from the IP stack This is an abstract class that must be implemented by every IPFilter. |
abstract void |
initialize(int filter_id)
Initializes a new IPFilter by setting its ID. |
abstract void |
removeBPF(BPF bpf)
Removes the specified BPF rule from this IPFilter. |
abstract void |
removeRule(int rid)
Removes the firewall rule with the specified ID from this IPFilter. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int id
| Constructor Detail |
public IPFilter()
| Method Detail |
public abstract void initialize(int filter_id)
filter_id - the filter' s IDpublic abstract boolean in(IP_Packet ipp)
ipp - incoming datapublic abstract void addRule(Rule rule)
rule - the firewall rule to add
public abstract void addRule(int rule_id,
int action,
int protocol,
int src_id,
int dest_id,
int dest_port)
rule_id - the ID of the firewall rule to addaction - the action to take on a matching packet. Either
Simnet.DENY or Simnet.ALLOWprotocol - the protocol to matchsrc_id - the source ID to matchdest_id - the destination ID to matchdest_port - the destination port to matchpublic abstract void removeRule(int rid)
rid - ID of the firewall rulee to addpublic abstract void addBPF(BPF bpf)
bpf - the bpf rule to addpublic abstract void removeBPF(BPF bpf)
bpf - the bpf rule to addprotected void finalize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||