Class ValidateChecksum

  extended by net.clackrouter.component.base.ClackComponent
      extended by net.clackrouter.component.tcp.ValidateChecksum
All Implemented Interfaces:

public class ValidateChecksum
extends ClackComponent

TCP Subcomponent used to validate the checksum of an incoming TCP segment.

Segments with valid checksums are sent to one output port, and packets with invalid checksums are sent to the other.

Nested Class Summary
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent
Field Summary
static int NUM_PORTS
static int PORT_IP_IN
static int PORT_IP_INVALID
static int PORT_TCP_VALID
Fields inherited from class net.clackrouter.component.base.ClackComponent
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT, view
Constructor Summary
ValidateChecksum(TCB tcb, Router router, java.lang.String name)
Method Summary
 void acceptPacket(VNSPacket packet, int port_num)
          The starting point for packet-processing when packets are "pushed" to this component.
protected  void setupPorts(int numports)
          Allocates an array of ClackPort objects to be used by this component
Methods inherited from class net.clackrouter.component.base.ClackComponent
createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getColor, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getPropertiesView, getRouter, getSerializableProperties, getTime, getTypeName, getUniqueCount, getView, handlePullRequest, hasError, initializeProperties, isHierarchical, isModifying, log, notifyAlarm, poll, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static int PORT_IP_IN


public static int PORT_IP_INVALID


public static int PORT_TCP_VALID


public static int NUM_PORTS
Constructor Detail


public ValidateChecksum(TCB tcb,
                        Router router,
                        java.lang.String name)
Method Detail


protected void setupPorts(int numports)
Description copied from class: ClackComponent
Allocates an array of ClackPort objects to be used by this component

setupPorts in class ClackComponent
numports - the number of ports to create


public void acceptPacket(VNSPacket packet,
                         int port_num)
Description copied from class: ClackComponent

The starting point for packet-processing when packets are "pushed" to this component.

The default implementation warns that the packet is being ignored.

acceptPacket in class ClackComponent
packet - The pushed packet
port_num - The number of the port that this packet is arriving on