All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----edu.utah.janos.nodeos.DemultiplexKey
Summary |
public class DemultiplexKey extends java.lang.Object { // Fields 2 private Vector segments; private int totalLength; // Constructors 1 public DemultiplexKey(Flow); // Methods 8 int length(); public void match(int, int, byte[], boolean[]); public void matchANEP(int, byte, boolean, short); public void matchIPv4(int, int, int, int); public void matchTCP(int, int, int); public void matchUDP(int, int, int); public final int matches(byte[], int, int); public String toString(); // Inner Classes 3 private abstract static class DemultiplexKey.KeySegment protected static class DemultiplexKey.ByteMask private static class DemultiplexKey.ANEPHeader }
A key for matching incoming packets.
Cross Reference |
Fields |
· segments | Summary | Top |
private Vector segments
The set of segments that make up this key. The are matched based on their ordering.
· totalLength | Summary | Top |
private int totalLength
The approximate length of data that this key will match.
Constructors |
· DemultiplexKey | Summary | Top |
public DemultiplexKey(Flow flow)
Methods |
· match | Summary | Top |
public void match(int offset, int length, byte[] sequence, boolean[] mask)
Add a segment that matches the given sequence of bytes.
Parameter Description offset The offset from the previous segment to start matching length The length of the bytes to match sequence The sequence of bytes to match mask If non-null, its a bit mask that indicates which bytes in `sequence' should be matched.
· matchIPv4 | Summary | Top |
public void matchIPv4(int offset, int source, int dest, int protocol)
Add a segment to match an IPv4 header
· matchUDP | Summary | Top |
public void matchUDP(int offset, int srcPort, int destPort)
Add a segment to match a UDP header, needs to be preceded by an IPv4 segment
· matchTCP | Summary | Top |
public void matchTCP(int offset, int srcPort, int destPort)
Add a segment to match a TCP header, needs to be preceded by an IPv4 segment
· matchANEP | Summary | Top |
public void matchANEP(int offset, byte version, boolean allVersions, short protocolID)
Add a segment that matches an ANEP header
Parameter Description offset The offset from the previous segment version The ANEP version number to match allVersions Match any version of ANEP protocolID The protocolID to match
· length | Summary | Top |
int length()
Get the approximate length of the bytes that the can matches on.
· matches | Summary | Top |
public final int matches(byte[] payload, int payloadStart, int payloadLength)
Test a packet to see if this key matches
Parameter Description payload The packet data payloadStart The place to start matching in `payload' payloadLength The length of data in payload, including bytes up to payloadStart.
- Returns:
- 0 if there was an error; The index of the end of the key.
· toString | Summary | Top |
public String toString()
- Overrides:
- toString in class Object
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7