com.voytechs.jnetstream.protocol.layer4
Class TCPProtocol

java.lang.Object
  extended by com.voytechs.jnetstream.protocol.layer4.TCPProtocol
All Implemented Interfaces:
DecoderListener

public class TCPProtocol
extends java.lang.Object
implements DecoderListener

This class implements certain higher functions of the TCP protocol. First it monitors all TCP flows which are comming from FlowDecoder, then it tracks at each stream layer for TCP FIN and closing of the socket. It notifies the FlowDecoder that a TCP stream has ended and that it can expire the flow associated with that stream.

Since:
0.2.3
Author:
Mark Bednarczyk

Nested Class Summary
 class TCPProtocol.StreamState
          Little utility structure
 
Field Summary
static int FLAG_ACK
           
static int FLAG_FIN
           
static int FLAG_PSH
           
static int FLAG_RST
           
static int FLAG_SYN
           
static int FLAG_URG
           
static java.lang.String MODULE
           
 
Constructor Summary
TCPProtocol()
           
 
Method Summary
 void handleExpiredFlowEvent(DecoderFlowEvent event)
           
 void handleLeftPacketEvent(DecoderFlowEvent event)
           
 void handleNewFlowEvent(DecoderFlowEvent event)
           
 void handleRightPacketEvent(DecoderFlowEvent event)
           
static void main(java.lang.String[] args)
           
 void processDecoderEvent(DecoderEvent event)
          Main dispatch interface for Decoder events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODULE

public static final java.lang.String MODULE
See Also:
Constant Field Values

FLAG_URG

public static final int FLAG_URG
See Also:
Constant Field Values

FLAG_ACK

public static final int FLAG_ACK
See Also:
Constant Field Values

FLAG_PSH

public static final int FLAG_PSH
See Also:
Constant Field Values

FLAG_RST

public static final int FLAG_RST
See Also:
Constant Field Values

FLAG_SYN

public static final int FLAG_SYN
See Also:
Constant Field Values

FLAG_FIN

public static final int FLAG_FIN
See Also:
Constant Field Values
Constructor Detail

TCPProtocol

public TCPProtocol()
Parameters:
-
Throws:
Method Detail

processDecoderEvent

public void processDecoderEvent(DecoderEvent event)
Description copied from interface: DecoderListener
Main dispatch interface for Decoder events. See DecoderEvent class for complete details on event types.

Specified by:
processDecoderEvent in interface DecoderListener
Parameters:
event - Event being dispatched.
See Also:
DecoderEvent

handleNewFlowEvent

public void handleNewFlowEvent(DecoderFlowEvent event)

handleRightPacketEvent

public void handleRightPacketEvent(DecoderFlowEvent event)

handleLeftPacketEvent

public void handleLeftPacketEvent(DecoderFlowEvent event)

handleExpiredFlowEvent

public void handleExpiredFlowEvent(DecoderFlowEvent event)

main

public static void main(java.lang.String[] args)