J-Sim v1.2.1-p7 API

drcl.inet.contract
Class RTLookup

java.lang.Object
  extended bydrcl.comp.Contract
      extended bydrcl.inet.contract.RTLookup

public class RTLookup
extends Contract

The RouteLookup contract. This contract defines the following service at the reactor:

RouteLookup
The initiator sends a key (RTKey), an InetPacket, or a message that consists of an InetPacket and the incoming interface (int), and the reactor returns the outgoing interfaces (int[]) of the correspoding routing entry, the key of which has the longest match to the given key/packet.
This class also provides the static methods (lookup(RTKey, Port)), (lookup(InetPacket, Port)), and (lookup(InetPacket, incomingIf, Port)) to facilitate conducting the above service from the specified port. The method is particularly useful in implementing a protocol that needs to look up the outgoing ports of a routing entry.

See Also:
for the description of the longest match., RTKey, RTEntry, InetPacket

Nested Class Summary
static class RTLookup.Message
           
 
Field Summary
static RTLookup INSTANCE
           
 
Fields inherited from class drcl.comp.Contract
Role_INITIATOR, Role_PEER, Role_REACTOR
 
Constructor Summary
RTLookup()
           
RTLookup(int role_)
           
 
Method Summary
 java.lang.Object getContractContent()
          Returns the content of this contract (format?).
 java.lang.String getName()
           
static int[] lookup(InetPacket ipkt_, int incomingIf_, Port out_)
           
static int[] lookup(InetPacket ipkt_, Port out_)
           
static int[] lookup(RTKey key_, Port out_)
           
 
Methods inherited from class drcl.comp.Contract
getRole, match, setRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final RTLookup INSTANCE
Constructor Detail

RTLookup

public RTLookup()

RTLookup

public RTLookup(int role_)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class Contract

getContractContent

public java.lang.Object getContractContent()
Description copied from class: Contract
Returns the content of this contract (format?).

Specified by:
getContractContent in class Contract

lookup

public static int[] lookup(RTKey key_,
                           Port out_)

lookup

public static int[] lookup(InetPacket ipkt_,
                           Port out_)

lookup

public static int[] lookup(InetPacket ipkt_,
                           int incomingIf_,
                           Port out_)

J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~