gov.nist.antd.mpls.mgmt.forwarding
Class MPLSForwarding

java.lang.Object
  |
  +--gov.nist.antd.mpls.mgmt.forwarding.MPLSForwarding

public class MPLSForwarding
extends java.lang.Object

Class MPLSForwarding

 The MPLSForwarding calss has label swapping, poping and 
 forwarding functions to forwarding incoming packets to the next hop

 The MPLSForwarding module could handle 3 kind of packet format.
  - IP packet(SSF.OS.IpHeader.java)
       Reference functions
         forwardDiffServPacket()  - MPLSForwarding.java
         forwardUnLabeledPacket() - MPLSForwarding.java
  - Labeled Packet(gov.nist.antd.mpls.mgmt.forwarding.ShimMessage.java)
       Reference function
         forwardLabeledPacket()   - MPLSForwarding.java
  - Optical Frame(gov.nist.antd.optical.OpticalFrame.java)
       Reference function
         forwardOpticalFrame()    - MPLSForwarding.java


  ForwardingTable and Forwarding functions
                                 +----------------------+
                                 | MPLSForwadingTable   |
                                 |  (3) finds a proper  |
                                 |      LSP information |
                                 |      in the table    |
                                 +------+--------+------+
       (2) The MPLSForwarding module    |        | (4) MPLSForwardingTable returns the outgoing interface
           requestes the outgoing       |        |     and label value to the MPLSForwarding
           interface and label   +======+========+==========+
                                 | MPLSForwarding           |
       +----------------+        |                          |
       | IP Packet      |        |   (5) Label swapping or  |
       +----------------+  (1)   |       Label stacking or  |  (6)  +----------------+
             or           =====> |       Pop operation..    | =====>| Labeled Packet |
       +----------------+        |                          |       +----------------+ 
       | Labeled Packet |        |                          |
       +----------------+        +==========================+

 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:
EunHyuk Lim (ehlim@antd.nist.gov, othree28@hotmail.com)
, borchert , chulkim

Nested Class Summary
 class MPLSForwarding.EgressInfo
          Class EgressInfo This class models the LSP's egress information and it also supports the monitoring function
 
Field Summary
 java.util.Vector EgressLSPTable
          Field EgressLSPTable - Egress LSP Table
 MPLSForwardingTable forwardingtable
          Field forwardingtable - MPLSForwarding module
 MPLSInterfaceMgmt interfacemgmt
          Field interfacemgmt - MPLSInterfaceMgmt module
 ProtocolMonitor monitor
          Field monitor - MPLSMonitor module
 boolean monitorON
          Field monitorON - Monitor Flag
 MPLSMgmt mplsmgmt
          Field mplsmgmt - MPLSMgmt modu;e
 int recvPktCount
          Field recvPktCount - Received packet count
 
Constructor Summary
MPLSForwarding(MPLSMgmt info)
          Constructor MPLSForwarding
 
Method Summary
 boolean forwardDiffServPacket(ProtocolMessage message, ProtocolSession fromSession)
          Method forwardDiffServPacket Forward the packet that is related to differentiated service
 boolean forwardingPacket(java.util.Vector nhlfelist, ProtocolMessage message, ProtocolSession fromSession)
          Method forwardingPacket Common method that forwards the any received packet to the proper interface
 boolean forwardLabeledPacket(ProtocolMessage message, ProtocolSession fromSession)
          Method forwardLabeledPacket Foward the Labeled Packet
 boolean forwardOpticalFrame(ProtocolMessage message, ProtocolSession fromSession)
          Method forwardOpticalFrame Forward the optical fram
 boolean forwardUnLabeledPacket(ProtocolMessage message, ProtocolSession fromSession)
          Method forwardUnLabeledPacket Forward the Un-labeled packet
 double getBlockBytes(int ingresslsrid, int locallspid)
          Method getBlockBytes Return the received block bytes
 long getBlockCounts(int ingresslsrid, int locallspid)
          Method getBlockCounts Return the received block count
 double getRecvBytes(int ingresslsrid, int locallspid)
          Method getRecvBytes Recored the received Bytes
 void init()
          Method init
 boolean mplsPacketForwarding(ProtocolMessage message, ProtocolSession fromSession)
          Method mplsPacketForwarding Forward the received packet that may be Shim Message, Optical Frame or IP Message According to the packet type it calls other member function(forwardLabeledPacket, forwardOpticalFrame, or forwardUnlabeledPacket
 ProtocolMessage packetCopy(ProtocolMessage message)
          Method packetCopy Packet copy method
 void removeEgressMonitor(MPLSSignalingInfo sinfo)
          Method removeEgressMonitor Remove the LSP monitor at Egress LSR
 void setupEgressMonitor(MPLSSignalingInfo sinfo)
          Method setupEgressMonitor Setup and add the LSP monitor at Egress LSR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mplsmgmt

public MPLSMgmt mplsmgmt
Field mplsmgmt - MPLSMgmt modu;e


forwardingtable

public MPLSForwardingTable forwardingtable
Field forwardingtable - MPLSForwarding module


interfacemgmt

public MPLSInterfaceMgmt interfacemgmt
Field interfacemgmt - MPLSInterfaceMgmt module


monitor

public ProtocolMonitor monitor
Field monitor - MPLSMonitor module


recvPktCount

public int recvPktCount
Field recvPktCount - Received packet count


monitorON

public boolean monitorON
Field monitorON - Monitor Flag


EgressLSPTable

public java.util.Vector EgressLSPTable
Field EgressLSPTable - Egress LSP Table

Constructor Detail

MPLSForwarding

public MPLSForwarding(MPLSMgmt info)
Constructor MPLSForwarding

Parameters:
info - - MPLSMgmt object
Method Detail

init

public void init()
Method init


mplsPacketForwarding

public boolean mplsPacketForwarding(ProtocolMessage message,
                                    ProtocolSession fromSession)
Method mplsPacketForwarding Forward the received packet that may be Shim Message, Optical Frame or IP Message According to the packet type it calls other member function(forwardLabeledPacket, forwardOpticalFrame, or forwardUnlabeledPacket

Parameters:
message - - ProtocolMessage; ShimMessage, OpticalFrame, or IP Message
fromSession - - ProtocolSession that send this message
Returns:
boolean - Return ture if the received message is forwarded

forwardDiffServPacket

public boolean forwardDiffServPacket(ProtocolMessage message,
                                     ProtocolSession fromSession)
Method forwardDiffServPacket Forward the packet that is related to differentiated service

Parameters:
message - - Received Packet
fromSession - - Session that send the packet
Returns:
boolean - Return ture if the received message is forwarded

forwardUnLabeledPacket

public boolean forwardUnLabeledPacket(ProtocolMessage message,
                                      ProtocolSession fromSession)
Method forwardUnLabeledPacket Forward the Un-labeled packet

Parameters:
message - - Unlabeled packet
fromSession - - Session that send the packet
Returns:
boolean - Return ture if the received message is forwarded

forwardOpticalFrame

public boolean forwardOpticalFrame(ProtocolMessage message,
                                   ProtocolSession fromSession)
Method forwardOpticalFrame Forward the optical fram

Parameters:
message - - optical frame
fromSession - - the session that send this packet
Returns:
boolean - Return ture if the received message is forwarded

forwardLabeledPacket

public boolean forwardLabeledPacket(ProtocolMessage message,
                                    ProtocolSession fromSession)
Method forwardLabeledPacket Foward the Labeled Packet

Parameters:
message - - Labeled Packet
fromSession - - Sessoin that send the packet
Returns:
boolean - Return true if the received packet is forwarded

forwardingPacket

public boolean forwardingPacket(java.util.Vector nhlfelist,
                                ProtocolMessage message,
                                ProtocolSession fromSession)
Method forwardingPacket Common method that forwards the any received packet to the proper interface

Parameters:
nhlfelist - - NHLFE List
message - - Received Message
fromSession - - Session that send the packet
Returns:
boolean - Return ture if the packet is pushed to the proper interface

packetCopy

public ProtocolMessage packetCopy(ProtocolMessage message)
Method packetCopy Packet copy method

Parameters:
message - - XXX
Returns:
ProtocolMessage - XXX

setupEgressMonitor

public void setupEgressMonitor(MPLSSignalingInfo sinfo)
Method setupEgressMonitor Setup and add the LSP monitor at Egress LSR

Parameters:
sinfo - - LSP Signaling information

removeEgressMonitor

public void removeEgressMonitor(MPLSSignalingInfo sinfo)
Method removeEgressMonitor Remove the LSP monitor at Egress LSR

Parameters:
sinfo - - LSP Signaling information

getRecvBytes

public double getRecvBytes(int ingresslsrid,
                           int locallspid)
Method getRecvBytes Recored the received Bytes

Parameters:
ingresslsrid - - Ingress LSR ID
locallspid - - Local LSP ID
Returns:
double - The received Packet bytes

getBlockBytes

public double getBlockBytes(int ingresslsrid,
                            int locallspid)
Method getBlockBytes Return the received block bytes

Parameters:
ingresslsrid - - Ingress LSR ID
locallspid - - Local LSP Id
Returns:
double - Block Bytes

getBlockCounts

public long getBlockCounts(int ingresslsrid,
                           int locallspid)
Method getBlockCounts Return the received block count

Parameters:
ingresslsrid - - Ingress LSR ID
locallspid - - Local LSP ID
Returns:
long - XXX