| Home >> All >> com >> voytechs >> jnetstream |
Package Samples:
com.voytechs.jnetstream.primitive.address: JNetStream primitive (datatypes) objects.
com.voytechs.jnetstream.codec
com.voytechs.jnetstream.io
com.voytechs.jnetstream.npl
com.voytechs.jnetstream.primitive
com.voytechs.jnetstream.protocol.layer2
com.voytechs.jnetstream.protocol.layer3
com.voytechs.jnetstream.protocol.layer4
com.voytechs.jnetstream.protocol.swing
com.voytechs.jnetstream.util
Classes:
ExpressionParser: Express parser. A standard C-Like expression will be parsed into an expression tree. The expression tree then can be traversed and evaluated via a number of methods. The expression parser is called using the parseExpression() method and passing it a String containing the expression to be parsed. The parser has the following operators defined: "+" - class PlusOpNode - NORMAL/BINARY "-" - class MinusOpNode - NORMAL/BINARY "*" - class MultiplyOpNode - HIGH/BINARY "/" - class DivideOpNode - HIGH/BINARY "&" - class AndOpNode - HIGH/BINARY "|" - class OrOpNode - HIGH/BINARY "%" - class ModOpNode - NORMAL/BINARY ...
PacketInputStream: Stream object that reads either an InputStream of bytes and allows access to the byte stream with the following features: 1) data can be read in either bytes or individual bits. 2) position within the stream can be pushed on to a stack 3) position can be poped off of the stack. 4) a packet structure is imposed on the stream so that you can query or be notified when the end of an individual packet byte stream is over and when the next packet byte stream is beginning. 5) data can be read in any binary format (Big Endian or Little Endian) 6) Packet capture information is accessable, such as: a) IP ...
PcapInputStream: Structure of TCPDump file. struct pcap_file_header { bpf_u_int32 magic; u_short version_major; u_short version_minor; bpf_int32 thiszone; // gmt to local correction // bpf_u_int32 sigfigs; // accuracy of timestamps // bpf_u_int32 snaplen; // max length saved portion of each pkt // bpf_u_int32 linktype; // data link type (LINKTYPE_*) // }; Now per each packet: struct pcap_pkthdr { struct timeval ts; // time stamp // bpf_u_int32 caplen; // length of portion present // bpf_u_int32 len; // length this packet (off wire) // };
IpAddress: A Class for storing IP Addresses Currently is only designed to utilize IPv4 (32bit) addresses. Class also contains utility methods for DNS lookups. There are various functions for converting the IP address to a LONG. Why would you want to use a long for storage of an IP address, in my case I store IP address in a database as an UNSIGNED INT, java does not have unsigned numbers so you have to go to next bigger primitive type to store it or do like other implementations do store the address in a byte array.
IpNumber: A Class for storing IP Addresses Currently is only designed to utilize IPv4 (32bit) byteArrayAddresses. There are various functions for converting the IP byteArrayAddress to a LONG. Why would you want to use a long for storage of an IP byteArrayAddress, in my case I store IP byteArrayAddress in a database as an UNSIGNED INT, java does not have unsigned numbers so you have to go to next bigger primitive type to store it or do like other implementations do store the byteArrayAddress in a byte array.
Address: A Class for storing IP Addresses Currently is only designed to utilize IPv4 (32bit) addresses. There are various functions for converting the IP address to a LONG. Why would you want to use a long for storage of an IP address, in my case I store IP address in a database as an UNSIGNED INT, java does not have unsigned numbers so you have to go to next bigger primitive type to store it or do like other implementations do store the address in a byte array.
ArrayDimensionNode: Support class that allows muti-dimensional array manipulation. Since array references can have dynamic code associated with array lookup, a number of convenience functions are performed by the class. 1) Bounds checking for MAX and MIN bounds for all dimensions. 2) Node traversal for each dimension 3) Scalar array size computation which also needs to be done at run time because of dynamic code.
FilterDecoder: Decoder which allows filtering on packets as they are proccessed. Appropriate filters can be defined and are immediately applied and checked as packet input stream is being decoded. Minimum amount of data is decoded until a filter hit is achieved. Appropriate permit or deny action is taken. In deny case, the packet processing is stopped with no further processing.
ProtocolDataInputStream: This stream object extends the DataInputStream which defines how to read basic data types from a binary stream. This stream in addition to the Java native primitives that DataInput defines, add ability to read on a variable bit boundry. Any subset of bits can be read and returned in 'int' data type.
Header: Protocol Header definition interface. This interface allows access to get various properties of a created run-time instance of header object. This object is created based on the HeaderFactory definition object which contains various global and instance specific parameters.
MutableField: public interface for setting values of the "header" field. This interface should be used to initialized a "field template" from which actual field instances are build when a packet arrives and a header is parsed.
IpNetwork: This class manipulates a IP address as a network address it requires 2 values, address and netmask. Netmask is applied to the various operations that this class supports such as comparisons and sorting.
ExpInternalException: Exception used to handle all internall code errors such illegal cardinality or unknow token types. This should not happen and is a INTERNAL bug thus is assigned its own class of exceptions.
Field: public interface for accessing values of the "header" field. This interface should be used after the header and fields have been applied to a packet in the buffer.
HexdumpEnumerator: Supporting top-level class to do Enumeration Enumerating through long lists of byte[] prevents huge strings since formated data is returned as strings.
PrimitiveDisplay: This interface deals with setting and getting properties that affect the display of the object.
SnoopInputStream: For structure of the Snoop file see RFC1761 http://www.faqs.org/rfcs/rfc1761.html
OutputBuffer: A specialized buffer that can either work in String or stream mode.
MutableNode: A marker interface to indicate that a node is mutable.
MutableArrayReferenceNode: Allows modification to value of the node at run time.
MutableReferenceNode: Allows modification to value of the node at run time.
NumberUtils: Utility class with various number formating routines.
ProtocolStreamException: Base class for Protocol Stream exceptions.
MacAddress: A Class for storing MAC Addresses
| Home | Contact Us | Privacy Policy | Terms of Service |