net.clackrouter.netutils
Class FilterEntry
java.lang.Object
net.clackrouter.netutils.FilterEntry
public class FilterEntry
- extends java.lang.Object
Constructor Summary |
FilterEntry(java.net.InetAddress a,
int port,
int proto,
java.lang.String vhostname)
|
FilterEntry(java.net.InetAddress a,
java.lang.String iface,
int port,
int proto,
java.lang.String vhostname)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ANY_PORT
public static int ANY_PORT
PROTO_TCP
public static int PROTO_TCP
PROTO_UDP
public static int PROTO_UDP
PROTO_ANY
public static int PROTO_ANY
FilterEntry
public FilterEntry(java.net.InetAddress a,
int port,
int proto,
java.lang.String vhostname)
FilterEntry
public FilterEntry(java.net.InetAddress a,
java.lang.String iface,
int port,
int proto,
java.lang.String vhostname)
matches
public boolean matches(FilterEntry.PacketInfo info)
toString
public java.lang.String toString()
- Return this filter as a configuration string (used for serialization)
Note: the IP address is not saved, since this is topology dependent
- Overrides:
toString
in class java.lang.Object
createFromTopoName
public static FilterEntry createFromTopoName(java.lang.String s,
TopologyModel topo_model)
throws java.lang.Exception
- Creates a Filter entry from a configuration string. String format for a filter entry is:
[vhost name]:[iface name]:[port]:[proto]
port should be any integer (-1 means any port)
proto should be either "tcp", "udp", or "any"
- Throws:
java.lang.Exception
getPacketInfo
public static FilterEntry.PacketInfo getPacketInfo(VNSPacket p)