DRCL JavaSim API

drcl.inet.data
Class RTKey

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.data.MapKey
              |
              +--drcl.inet.data.RTKey
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, java.io.Serializable

public class RTKey
extends MapKey

The key class to the routing table entry.

Version:
1.0, 10/17/2000
Author:
Hung-ying Tyan
See Also:
RTEntry, Serialized Form

Fields inherited from class drcl.data.MapKey
mask, value
 
Constructor Summary
RTKey()
           
RTKey(long src_, long dest_, int incoming_)
          Creates an RTKey given source, destination and incoming interface.
RTKey(long src_, long srcmask_, long dest_, long destmask_, int incoming_, int incomingmask_)
          Creates an RTKey given source, destination, incoming interface and masks.
 
Method Summary
 long getDestination()
           
 long getDestinationMask()
           
 int getIncomingIf()
           
 int getIncomingIfMask()
           
 long getMaskedDestination()
           
 int getMaskedIncomingIf()
           
 long getMaskedSource()
           
 long getSource()
           
 long getSourceMask()
           
 int hashCode()
           
 java.lang.String print(Address addr_)
           
 void set(long src_, long dest_, int incoming_)
          Set this RTKey with the given source, destination and incoming interface.
 void set(long src_, long srcmask_, long dest_, long destmask_, int incoming_, int incomingmask_)
          Set this RTKey with the given source, destination, incoming interface and masks.
 void setDestination(long g_)
           
 void setDestinationMask(long m_)
           
 void setIncomingIf(int i_)
           
 void setIncomingIfMask(int m_)
           
 void setSource(long s_)
           
 void setSourceMask(long m_)
           
 java.lang.String toString()
          Prints out the value and the mask of this map key by the set of indices of the bits of 1's in the value and the mask.
 
Methods inherited from class drcl.data.MapKey
binaryRepresentation, binaryRepresentation, binaryRepresentation, duplicate, equals, exactMatch, getMask, getValue, hexRepresentation, hexRepresentation, hexRepresentation, match, numberRepresentation, set, setMask, setValue, wildcardMatch
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RTKey

public RTKey(long src_,
             long dest_,
             int incoming_)
Creates an RTKey given source, destination and incoming interface. If source/destination can be ignored, Address.any() or Address.dontcare() is specified. If incoming interface can be ignored, use negative indices. The corresponding masks are set to be all 1's if the arguments are not equal to the above special values, otherwise the masks are set to be 0.
Parameters:
src_ - source.
dest_ - destination.
incoming_ - index of incoming interface.

RTKey

public RTKey(long src_,
             long srcmask_,
             long dest_,
             long destmask_,
             int incoming_,
             int incomingmask_)
Creates an RTKey given source, destination, incoming interface and masks. If source/destination can be ignored, Address.any() or Address.dontcare() is specified. If incoming interface can be ignored, use negative indices. The corresponding masks are set to be the argument masks if the arguments are not equal to the above special values, otherwise the masks are set to be 0.
Parameters:
src_ - source.
srcmask_ - source mask.
dest_ - destination.
destmask_ - destination mask.
incoming_ - index of incoming interface.
incomingmask_ - mask for the incoming interface index.

RTKey

public RTKey()
Method Detail

getSource

public long getSource()

setSource

public void setSource(long s_)

getDestination

public long getDestination()

setDestination

public void setDestination(long g_)

getIncomingIf

public int getIncomingIf()

setIncomingIf

public void setIncomingIf(int i_)

getSourceMask

public long getSourceMask()

setSourceMask

public void setSourceMask(long m_)

getMaskedSource

public long getMaskedSource()

getDestinationMask

public long getDestinationMask()

setDestinationMask

public void setDestinationMask(long m_)

getMaskedDestination

public long getMaskedDestination()

getIncomingIfMask

public int getIncomingIfMask()

setIncomingIfMask

public void setIncomingIfMask(int m_)

getMaskedIncomingIf

public int getMaskedIncomingIf()

set

public void set(long src_,
                long dest_,
                int incoming_)
Set this RTKey with the given source, destination and incoming interface. The corresponding masks are set to be all 1's.
Parameters:
src_ - source.
dest_ - destination.
incoming_ - index of incoming interface.

set

public void set(long src_,
                long srcmask_,
                long dest_,
                long destmask_,
                int incoming_,
                int incomingmask_)
Set this RTKey with the given source, destination, incoming interface and masks.
Parameters:
src_ - source.
srcmask_ - source mask.
dest_ - destination.
destmask_ - destination mask.
incoming_ - index of incoming interface.
incomingmask_ - mask for the incoming interface index.

hashCode

public int hashCode()
Overrides:
hashCode in class MapKey

toString

public java.lang.String toString()
Description copied from class: MapKey
Prints out the value and the mask of this map key by the set of indices of the bits of 1's in the value and the mask.
Overrides:
toString in class MapKey
Following copied from class: drcl.data.MapKey
See Also:
BitSet.toString().

print

public java.lang.String print(Address addr_)

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~