gov.nist.antd.merlin.protocol.signaling
Class DynRecoveryUDPIP

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--gov.nist.antd.merlin.util.AbstractAddDropConfigurator
              |
              +--gov.nist.antd.merlin.util.AutoConfigCtrl
                    |
                    +--gov.nist.antd.merlin.protocol.signaling.DynRecovery
                          |
                          +--gov.nist.antd.merlin.protocol.signaling.DynRecoveryUDPIP
All Implemented Interfaces:
Callback, com.renesys.raceway.DML.Configurable, DMLDump

public class DynRecoveryUDPIP
extends DynRecovery

This class implements an protocol that send a message to an other node (for test only).

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
 NIST assumes no responsibility whatsoever for its use by other parties,
 and makes no guarantees, expressed or implied, about its quality,
 reliability, or any other characteristic.
 
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil , pinel

Nested Class Summary
 
Nested classes inherited from class gov.nist.antd.merlin.protocol.signaling.DynRecovery
DynRecovery.HandledRoutesHTable, DynRecovery.OXCHashTable
 
Field Summary
private  DynRecovery.OXCHashTable answeredOXCs
          The table of OXC that have (or not) answered to the SET_PATH message by an OXC_DONE message.
private  boolean debug
          Indicates if debug information are displayed.
static java.lang.String SESSION_NAME
          The name of this protocolsession in the network.
 
Fields inherited from class gov.nist.antd.merlin.protocol.signaling.DynRecovery
bckupAlgo, defaultBckupAlgo, handledRoutes, net, oxc
 
Fields inherited from class gov.nist.antd.merlin.util.AbstractAddDropConfigurator
addLambdaIDs, addLambdas, dropLambdaIDs, dropLambdas
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
DynRecoveryUDPIP()
          Default constructor
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configuration
 int getNextHopIP(DynRecoveryHeader dynRecoveryHeader)
          getNextHopIP
 OpticalLink getNextOpticalLink(int adlID)
          getNextOpticalLink
 int getSendingONICIP(DynRecoveryHeader dynRecoveryHeader)
          getSendingONICIP
 void init()
          Initialization routine, called by the ProtocolGraph after instantiation.
 IpHeader makeIPhFromDynRecoveryh(DynRecoveryHeader dynRecoveryHeader)
          makeIPhFromDynRecoveryh makes a IP_header using the fields of DynRecovery_header so that DynRecovery_Header can be encapsulated in the IP_Header meaningfully once it has been encapsulated in a UDP_header
 SSF.OS.UDP.UDP_Header makeUDPhFromDynRecoveryh(DynRecoveryHeader dynRecoveryHeader)
          makeUDPhFromDynRecoveryh makes a UDP_header using the fields of DynRecovery_header so that DynRecovery_Header can be encapsulated in the UDP_Header meaningfully
 boolean push(ProtocolMessage message, ProtocolSession fromSession)
          push
 void transmit(DynRecoveryHeader dynRecoveryHeader)
          transmit
 
Methods inherited from class gov.nist.antd.merlin.protocol.signaling.DynRecovery
amIDestination, amISource, callback, getADLDestNodeID, getBackupAlgo, getNextAddLambdaID, getNextHostID, getTargetNode, handleLOL_ADV, handleOXC_DONE, handleSET_PATH_ACK, handleSET_PATH_DONE, handleSET_PATH, isDebug, isDownStreamOfFailure, isMessagesOn, printDynRecoveryMessage, printRoute, process, setBackupAlgo, setDebug, setMessages
 
Methods inherited from class gov.nist.antd.merlin.util.AutoConfigCtrl
 
Methods inherited from class gov.nist.antd.merlin.util.AbstractAddDropConfigurator
configAddDrop, getAddLambdaIDs, getAddLambdas, getDropLambdaIDs, getDropLambdas, setAddLambdas, setDropLambdas, toDML
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_NAME

public static final java.lang.String SESSION_NAME
The name of this protocolsession in the network.

See Also:
Constant Field Values

debug

private boolean debug
Indicates if debug information are displayed.


answeredOXCs

private DynRecovery.OXCHashTable answeredOXCs
The table of OXC that have (or not) answered to the SET_PATH message by an OXC_DONE message. each entry in the hashtable is route ID (new Integer (routeID)) each value in the hashtable is a Vector or Integers representing OXCs IDs

Constructor Detail

DynRecoveryUDPIP

public DynRecoveryUDPIP()
Default constructor

Method Detail

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configuration

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class DynRecovery
Parameters:
cfg - The DML configuration
Throws:
if - a configuration error occurs
com.renesys.raceway.DML.configException

init

public void init()
          throws ProtocolException
Initialization routine, called by the ProtocolGraph after instantiation. The order of initialization of a set of protocols is unspecified, so other methods (like open()) may be called before init(). Resources (like connection tables) that may be needed by open() should therefore be created in the ProtocolSession constructor.

Overrides:
init in class DynRecovery
ProtocolException

makeUDPhFromDynRecoveryh

public SSF.OS.UDP.UDP_Header makeUDPhFromDynRecoveryh(DynRecoveryHeader dynRecoveryHeader)
makeUDPhFromDynRecoveryh makes a UDP_header using the fields of DynRecovery_header so that DynRecovery_Header can be encapsulated in the UDP_Header meaningfully

Parameters:
dynRecoveryHeader - a DynRecovery PDU
Returns:
a UDPHeader whose content matches the DynRecoveryHeader given as argument

getNextOpticalLink

public OpticalLink getNextOpticalLink(int adlID)
getNextOpticalLink

Parameters:
adlID - adddrop lambda ID, unique in the host
Returns:
the Optical link on which this add lambda is connected

getNextHopIP

public int getNextHopIP(DynRecoveryHeader dynRecoveryHeader)
getNextHopIP

Parameters:
dynRecoveryHeader - a DynRecovery PDU
Returns:
the IP adress (of the ONIC) of the next hop for this Header

getSendingONICIP

public int getSendingONICIP(DynRecoveryHeader dynRecoveryHeader)
getSendingONICIP

Parameters:
dynRecoveryHeader - a DynRecovery PDU
Returns:
the IP adress opf the ONIC that is going to send this DynRecovery PDU. (in order to fill in the from field of the IP Header)

makeIPhFromDynRecoveryh

public IpHeader makeIPhFromDynRecoveryh(DynRecoveryHeader dynRecoveryHeader)
makeIPhFromDynRecoveryh makes a IP_header using the fields of DynRecovery_header so that DynRecovery_Header can be encapsulated in the IP_Header meaningfully once it has been encapsulated in a UDP_header

Parameters:
dynRecoveryHeader - a DynRecovery PDU
Returns:
a IP Header matching with the dynRecoveryHeader information

transmit

public void transmit(DynRecoveryHeader dynRecoveryHeader)
transmit

Overrides:
transmit in class DynRecovery
Parameters:
dynRecoveryHeader - a DynRecovery PDU to be transmitted

push

public boolean push(ProtocolMessage message,
                    ProtocolSession fromSession)
             throws ProtocolException
push

Overrides:
push in class DynRecovery
Parameters:
message - The message received.
fromSession - The protocol session which sent the message.
Returns:
True if the message is pushed. False if it is dropped.
Throws:
ProtocolException - If a protocol session exception occurs.