J-Sim v1.2.1-p7 API

drcl.inet.protocol.ospf
Class OSPF

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.net.Module
              extended bydrcl.inet.Protocol
                  extended bydrcl.inet.protocol.Routing
                      extended bydrcl.inet.protocol.ospf.OSPF
All Implemented Interfaces:
java.lang.Cloneable, InetConstants, ObjectDuplicable, java.io.Serializable, UnicastRouting
Direct Known Subclasses:
OSPF_QoS

public class OSPF
extends Routing
implements UnicastRouting

The package, drcl.inet.protocol.OSPF, implements the link-state routing protocol, OSPF v2, Open Shortest Path First routing protocol and follow the RFC2328. In this implementation, we refered much from OSPF code in GNU Zebra project, especially zebra 0.85.

The general data structure can refer to figure 9 and section 5 RFC2328 (If not specially mentioned, the following sections, figures, and etc. can be found in RFC 2328)

See Also:
OSPF_Area, OSPF_DBdesc, OSPF_Packet, OSPF_Interface, OSPF_LS_Database, OSPF_LSA, OSPF_LSA_Header, OSPF_LSack, OSPF_LSrequest, OSPF_LSupdate, OSPF_Neighbor, OSPF_TimeOut_EVT, Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
protected  java.util.Vector area_list
          The list of OSPF areas to which this router is attached
protected static int DATABASE
          A constant indicating a database description packet.
static boolean debug
           
static int DEBUG_ACK
          Debug level of handling LSA acknowledgement packets.
static int DEBUG_DETAIL
          Debug level of detailed messages for other levels.
static int DEBUG_LSA
          Debug level of handling LSA update packets.
static int DEBUG_NEIGHBOR
          Debug level of neighbor state changes.
static int DEBUG_REFRESH
          Debug level of LSA refresh events.
static int DEBUG_SAMPLE
          Debug level to enable sampled debug messages.
static int DEBUG_SEND
          Debug level of sending ospf packets.
static int DEBUG_SPF
          Debug level of calculating SPF tree and installing route entries.
static int DEBUG_TIMEOUT
          Debug level of handling timeout events.
static boolean debug2
           
protected static int HELLO
          A constant indicating a hello packet.
protected static int LS_ACK
          A constant indicating a link state acknowledge packet.
protected static int LS_REQUEST
          A constant indicating a link state request packet.
protected static int LS_UPDATE
          A constant indicating a link state update packet.
protected  java.util.Vector ospf_if_list
          The list of OSPF Interfaces to which this router is attached
protected  int router_id
          OSPF router ID of this node
 
Fields inherited from class drcl.inet.protocol.Routing
queryPort, rtconfigPort
 
Fields inherited from class drcl.net.Module
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_EXPOSED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_HAS_EXPOSED_CHILD, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Fields inherited from interface drcl.inet.InetConstants
BYTE_MODE, DEFAULT_BANDWIDTH, DEFAULT_BUFFER_SIZE, DEFAULT_MTU, EVENT_ID_CHANGED_PORT_ID, EVENT_IDENTITY_ADDED, EVENT_IDENTITY_REMOVED, EVENT_IF_NEIGHBOR_DOWN, EVENT_IF_NEIGHBOR_UP, EVENT_IF_PORT_ID, EVENT_LINK_BROKEN, EVENT_LINK_BROKEN_PORT_ID, EVENT_MCAST_HOST_PORT_ID, EVENT_PKT_ARRIVAL, EVENT_PKT_ARRIVAL_PORT_ID, EVENT_RT_ENTRY_ADDED, EVENT_RT_ENTRY_MODIFIED, EVENT_RT_ENTRY_REMOVED, EVENT_RT_MCAST_CHANGED_PORT_ID, EVENT_RT_UCAST_CHANGED_PORT_ID, EVENT_VIF_NEIGHBOR_DOWN, EVENT_VIF_NEIGHBOR_UP, EVENT_VIF_PORT_ID, HOST_ENTRY_EXT, ID_CSL, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_AODV, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, PID_UDP, SERVICE_CONFIGSW_PORT_ID, SERVICE_ID_PORT_ID, SERVICE_IF_PORT_ID, SERVICE_MCAST_PORT_ID, SERVICE_RT_PORT_ID, UCAST_QUERY_PORT_ID
 
Constructor Summary
OSPF()
          Constructor.
 
Method Summary
 void dataArriveAtDownPort(java.lang.Object data_, Port downPort_)
          Handle data arriving at the down port.
protected  void delayed_acknowledge(OSPF_LSA lsa)
          Delayed acknowledgement Include multiple acks in one packet.
protected  void direct_acknowledge(OSPF_LSA lsa, OSPF_Interface oif, int now_, boolean clone_)
          Direct acknowledgement
 void duplicate(java.lang.Object source_)
          Duplicates the content of source_, including ID, name, child components and connections among them, to this component.
 java.lang.String[] getDebugLevelNames()
          Returns the names of defined debug levels; subclasses should override this method if debug levels are defined.
 java.lang.String getName()
          Returns the (informational) name of the component.
protected  int inactivity_timer(OSPF_Neighbor nbr)
           
 java.lang.String info()
          Returns information regarding this component.
protected  void lsa_receive(OSPF_LSA lsa, OSPF_Neighbor from)
          Process every LSA received in LS update packet.
protected  void neighborDownEventHandler(int ifindex_, NetAddress neighbor_, Port inPort_)
          Called back when a neighbor down event is received.
protected  void neighborUpEventHandler(int ifindex_, NetAddress neighbor_, Port inPort_)
          Called back when a neighbor up event is received.
protected  void ospf_area_rt_install(OSPF_Area area)
          Install area's vertex_list to routing table
protected  void ospf_dbdesc_seqnum_init(OSPF_Neighbor nbr)
           
protected  OSPF_Interface ospf_if_lookup_by_addr(long addr)
           
protected  void ospf_install_candidate(TreeMapQueue candidate, OSPF_SPF_vertex w)
          Install vertex w into candidate list the candidate list is sorted from the min cost to max cost
protected  void ospf_lsa_flood(OSPF_LSA lsa)
          flood ospf_lsa within appropriate scope
protected  void ospf_lsa_flood(OSPF_LSA lsa, int scope_type)
          flood ospf_lsa within appropriate scope
protected  int ospf_lsa_has_link(OSPF_LSA w, OSPF_LSA v)
          Test whether there is a link in LSA w pointer to vertex v returns 1 if a link exists in w --> v
protected  void ospf_lsdb_install(OSPF_LSA new_lsa, OSPF_Area area)
          When installing more recent LSA, must detach less recent database copy from LS-lists of neighbors, and attach new one.
protected  void ospf_lsdb_install(OSPF_LSA new_lsa, OSPF_LSA old_lsa)
           
protected  void ospf_lsdb_install(OSPF_LSA new_lsa, OSPF_LSA old_lsa, int scope_type)
          Install a new LSA into the database
protected  void ospf_lsdb_install(OSPF_LSA new_lsa, OSPF_LSA old_lsa, OSPF_Area area)
          Replaces old_lsa with new_lsa and removes old_lsa from the retranslists in area.
protected  OSPF_LSA ospf_lsdb_lookup(int type, int id, int advrtr, java.lang.Object scope)
          ordinary lookup function
protected  Router_LSA ospf_make_router_lsa(OSPF_Area area)
           
protected  void ospf_message_broadcast(int type, java.lang.Object body, int body_size, OSPF_Interface oif)
          Send the packet to every neighbor connected to this interfac.
protected  void ospf_message_send(int type, java.lang.Object body, int body_size, long dst, OSPF_Interface oif)
          send the pkt to specific neighbor on specific if
protected  void ospf_nexthop_calculation(OSPF_Area area, OSPF_SPF_vertex v, OSPF_SPF_vertex w)
          Calculate nexthop from root to vertex W.
protected  void ospf_possible_ack(OSPF_LSA received, int ismore_recent, OSPF_Interface oif, int impliedack_flag, int duplicate_flag, int now_)
          Possible ack action mentioned in sec 13 (5)(e) and (7)(b)
protected  void ospf_route_add(long dst, OSPF_SPF_vertex new_en, OSPF_Area area, int now_)
          Add a routing entry into RoutingTable and synchronize with drcl.inet.core.RT
protected  void ospf_router_lsa_flood(OSPF_Area area, boolean check_)
           
protected  int ospf_send_dbdesc(OSPF_Neighbor nbr)
          Send the database description to the peer ref: 10.8
protected  int ospf_send_hello(OSPF_Interface oif)
          Sends hello pkts out at each functioning interface.
protected  int ospf_send_lsreq(OSPF_Neighbor nbr)
          Send the LS request pkt to its peer.
protected  int ospf_send_single_hello(OSPF_Interface oif, long dst)
          used when receiving EVENT_IF_NEIGHBOR_UP, send only one hello packet to ensure two-way connection
 void ospf_set_area_id(int id_)
          xxx: Specify the area id for this router (Needed to be modified)
protected  void ospf_spf_init(OSPF_Area area)
          Initialization of calculatinf SPF
protected static OSPF_SPF_vertex ospf_vertex_lookup(TreeMapQueue list, long id)
          Test whether a vertex exists in the list xxx: a hashtable would help the performance
protected static OSPF_SPF_vertex ospf_vertex_lookup(java.util.Vector list, long id)
          Test whether a vertex exists in the list xxx: a hashtable would help the performance
protected  void process(java.lang.Object data_, Port inPort_)
          This method classifies inPort_ and delegates process of data to the appropriate handler.
 void reset()
          Resets the component for being used anew.
protected  void timeout(java.lang.Object evt_)
          Handling timeout event.
protected  void transit_vertex_rtable_install(OSPF_SPF_vertex v, OSPF_Area area, int now_)
          Hold the intermediate results on area routing table Install a new entry into routing table
 
Methods inherited from class drcl.inet.protocol.Routing
addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, graftRTEntry, graftRTEntry, graftRTEntry, pruneRTEntry, pruneRTEntry, pruneRTEntry, removeAllRTEntries, removeRTEntry, removeRTEntry, replaceRTEntry, replaceRTEntry, retrieveAllRTEntries, retrieveBestRTEntryDest, retrieveRTEntry, retrieveRTEntryDest, retrieveRTEntrySrc
 
Methods inherited from class drcl.inet.Protocol
broadcast, broadcast, broadcast, broadcast, broadcast, broadcast, createConfigSwitchPort, createIDChangedEventPort, createIDServicePort, createIFEventPort, createIFQueryPort, createLinkBrokenEventPort, createMcastHostEventPort, createMcastQueryPort, createMulticastRTChangedEventPort, createPktArrivalEventPort, createRTServicePort, createUcastQueryPort, createUnicastRTChangedEventPort, createVIFEventPort, forward, forward, forward, forward, forward, forward, idAddedEventHandler, idRemovedEventHandler, LinkBrokenEventHandler, mcastHostJoinEventHandler, mcastHostLeaveEventHandler, pktArrivalHandler, processOther, routeQueryHandler, routeQueryHandler, rtAddedEventHandler, rtModifiedEventHandler, rtRemovedEventHandler, vNeighborDownEventHandler, vNeighborUpEventHandler
 
Methods inherited from class drcl.net.Module
cancelTimeout, dataArriveAtUpPort, deliver, getAddress, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
_resume, _start, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getForkManager, getID, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portAdded, portRemoved, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait, yield
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static boolean debug

debug2

public static boolean debug2

HELLO

protected static final int HELLO
A constant indicating a hello packet.

See Also:
Constant Field Values

DATABASE

protected static final int DATABASE
A constant indicating a database description packet.

See Also:
Constant Field Values

LS_REQUEST

protected static final int LS_REQUEST
A constant indicating a link state request packet.

See Also:
Constant Field Values

LS_UPDATE

protected static final int LS_UPDATE
A constant indicating a link state update packet.

See Also:
Constant Field Values

LS_ACK

protected static final int LS_ACK
A constant indicating a link state acknowledge packet.

See Also:
Constant Field Values

router_id

protected int router_id
OSPF router ID of this node


area_list

protected java.util.Vector area_list
The list of OSPF areas to which this router is attached


ospf_if_list

protected java.util.Vector ospf_if_list
The list of OSPF Interfaces to which this router is attached


DEBUG_SAMPLE

public static final int DEBUG_SAMPLE
Debug level to enable sampled debug messages.

See Also:
Constant Field Values

DEBUG_NEIGHBOR

public static final int DEBUG_NEIGHBOR
Debug level of neighbor state changes.

See Also:
Constant Field Values

DEBUG_SEND

public static final int DEBUG_SEND
Debug level of sending ospf packets.

See Also:
Constant Field Values

DEBUG_SPF

public static final int DEBUG_SPF
Debug level of calculating SPF tree and installing route entries.

See Also:
Constant Field Values

DEBUG_REFRESH

public static final int DEBUG_REFRESH
Debug level of LSA refresh events.

See Also:
Constant Field Values

DEBUG_LSA

public static final int DEBUG_LSA
Debug level of handling LSA update packets.

See Also:
Constant Field Values

DEBUG_ACK

public static final int DEBUG_ACK
Debug level of handling LSA acknowledgement packets.

See Also:
Constant Field Values

DEBUG_TIMEOUT

public static final int DEBUG_TIMEOUT
Debug level of handling timeout events.

See Also:
Constant Field Values

DEBUG_DETAIL

public static final int DEBUG_DETAIL
Debug level of detailed messages for other levels.

See Also:
Constant Field Values
Constructor Detail

OSPF

public OSPF()
Constructor.

Method Detail

getName

public java.lang.String getName()
Description copied from class: Component
Returns the (informational) name of the component.

Overrides:
getName in class Component

getDebugLevelNames

public java.lang.String[] getDebugLevelNames()
Description copied from class: Component
Returns the names of defined debug levels; subclasses should override this method if debug levels are defined.

Overrides:
getDebugLevelNames in class Component

info

public java.lang.String info()
Description copied from class: Component
Returns information regarding this component. Subclasses should override this method to provide useful information at run time.

Overrides:
info in class Component

reset

public void reset()
Description copied from class: Component
Resets the component for being used anew. All the internal variables must be set to the initial state. All the ports and child components are reset as well.

Overrides:
reset in class Component

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: Component
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. Subclasses need to override this method to copy its own variables.

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class Protocol

timeout

protected void timeout(java.lang.Object evt_)
Handling timeout event. According to the timeout event which can be obtained from evt_, there are different handling functions.

Overrides:
timeout in class Module
Parameters:
evt_ - event object got from the timer port
See Also:
Module.setTimeout(Object, double), Module.setTimeoutAt(Object, double)

process

protected void process(java.lang.Object data_,
                       Port inPort_)
Description copied from class: Module
This method classifies inPort_ and delegates process of data to the appropriate handler. If a subclass decides to override this method, then it should call super.process(data_, inPort_) to make those handlers effective.

Overrides:
process in class Module
See Also:
Module.dataArriveAtUpPort(Object, drcl.comp.Port), Module.dataArriveAtDownPort(Object, drcl.comp.Port), Module.processOther(Object, drcl.comp.Port)

dataArriveAtDownPort

public void dataArriveAtDownPort(java.lang.Object data_,
                                 Port downPort_)
Handle data arriving at the down port. According to the different packet types ( OSPF Hello pkt, Database descricption pkt,Link State update pkt, LS request pkt, or LS ack pkt), different corresponding methods can handle the packet. Note for OSPF_Hello pkt will be received only once. The other hello maintaince is done by drcl.inet.core.Hello

Overrides:
dataArriveAtDownPort in class Module
Parameters:
downPort_ - down port at which messages arrive.

neighborUpEventHandler

protected void neighborUpEventHandler(int ifindex_,
                                      NetAddress neighbor_,
                                      Port inPort_)
Called back when a neighbor up event is received. Create a OSPF_Neighbor data associated with OSPF_Interface data in this router.

Overrides:
neighborUpEventHandler in class Protocol
Parameters:
ifindex_ - index of the interface.
See Also:
Hello

neighborDownEventHandler

protected void neighborDownEventHandler(int ifindex_,
                                        NetAddress neighbor_,
                                        Port inPort_)
Description copied from class: Protocol
Called back when a neighbor down event is received.

Overrides:
neighborDownEventHandler in class Protocol
Parameters:
ifindex_ - index of the interface.
See Also:
Protocol.createIFEventPort()

inactivity_timer

protected int inactivity_timer(OSPF_Neighbor nbr)

lsa_receive

protected void lsa_receive(OSPF_LSA lsa,
                           OSPF_Neighbor from)
Process every LSA received in LS update packet. Maintain the Link State database stored in the router. Compare the existing LS in the database to the received one. Update the database if the received is more updated. Broadcast to its neighbor if necessary. Finally ack the LS to its originator. ref: section 13


ospf_make_router_lsa

protected Router_LSA ospf_make_router_lsa(OSPF_Area area)

direct_acknowledge

protected void direct_acknowledge(OSPF_LSA lsa,
                                  OSPF_Interface oif,
                                  int now_,
                                  boolean clone_)
Direct acknowledgement


delayed_acknowledge

protected void delayed_acknowledge(OSPF_LSA lsa)
Delayed acknowledgement Include multiple acks in one packet. Hold these acks until the timer timeout. ref: sec. 13.5


ospf_possible_ack

protected void ospf_possible_ack(OSPF_LSA received,
                                 int ismore_recent,
                                 OSPF_Interface oif,
                                 int impliedack_flag,
                                 int duplicate_flag,
                                 int now_)
Possible ack action mentioned in sec 13 (5)(e) and (7)(b)


ospf_message_send

protected void ospf_message_send(int type,
                                 java.lang.Object body,
                                 int body_size,
                                 long dst,
                                 OSPF_Interface oif)
send the pkt to specific neighbor on specific if


ospf_message_broadcast

protected void ospf_message_broadcast(int type,
                                      java.lang.Object body,
                                      int body_size,
                                      OSPF_Interface oif)
Send the packet to every neighbor connected to this interfac. For sending packets downward, we call the forward(), defined in Protocol.java void forward(PacketBody p_, long src_, long dest_, int dest_ulp_, boolean routerAlert_, int TTL, int ToS, int link_id) route-lookup forwarding routerAlert is set to be true, in which the packet is sent in only one hop. In this case, whatever dst is irrevelent


ospf_send_hello

protected int ospf_send_hello(OSPF_Interface oif)
Sends hello pkts out at each functioning interface. (The method is not used anymore, we are using drcl.inet.core.Hello as underlying Hello service provider) Ref: sec. 9.5


ospf_send_single_hello

protected int ospf_send_single_hello(OSPF_Interface oif,
                                     long dst)
used when receiving EVENT_IF_NEIGHBOR_UP, send only one hello packet to ensure two-way connection


ospf_send_dbdesc

protected int ospf_send_dbdesc(OSPF_Neighbor nbr)
Send the database description to the peer ref: 10.8


ospf_send_lsreq

protected int ospf_send_lsreq(OSPF_Neighbor nbr)
Send the LS request pkt to its peer. Ref: sec. 10.9


ospf_router_lsa_flood

protected void ospf_router_lsa_flood(OSPF_Area area,
                                     boolean check_)

ospf_lsa_flood

protected void ospf_lsa_flood(OSPF_LSA lsa)
flood ospf_lsa within appropriate scope


ospf_lsa_flood

protected void ospf_lsa_flood(OSPF_LSA lsa,
                              int scope_type)
flood ospf_lsa within appropriate scope


ospf_lsdb_lookup

protected OSPF_LSA ospf_lsdb_lookup(int type,
                                    int id,
                                    int advrtr,
                                    java.lang.Object scope)
ordinary lookup function


ospf_lsdb_install

protected void ospf_lsdb_install(OSPF_LSA new_lsa,
                                 OSPF_Area area)
When installing more recent LSA, must detach less recent database copy from LS-lists of neighbors, and attach new one. ref. sec 13.2


ospf_lsdb_install

protected void ospf_lsdb_install(OSPF_LSA new_lsa,
                                 OSPF_LSA old_lsa,
                                 OSPF_Area area)
Replaces old_lsa with new_lsa and removes old_lsa from the retranslists in area. Recalculates SPF if necessary (see 13.2).


ospf_lsdb_install

protected void ospf_lsdb_install(OSPF_LSA new_lsa,
                                 OSPF_LSA old_lsa)

ospf_lsdb_install

protected void ospf_lsdb_install(OSPF_LSA new_lsa,
                                 OSPF_LSA old_lsa,
                                 int scope_type)
Install a new LSA into the database


ospf_if_lookup_by_addr

protected OSPF_Interface ospf_if_lookup_by_addr(long addr)

ospf_set_area_id

public void ospf_set_area_id(int id_)
xxx: Specify the area id for this router (Needed to be modified)


ospf_dbdesc_seqnum_init

protected void ospf_dbdesc_seqnum_init(OSPF_Neighbor nbr)

ospf_spf_init

protected void ospf_spf_init(OSPF_Area area)
Initialization of calculatinf SPF


ospf_nexthop_calculation

protected void ospf_nexthop_calculation(OSPF_Area area,
                                        OSPF_SPF_vertex v,
                                        OSPF_SPF_vertex w)
Calculate nexthop from root to vertex W. Ref: sec. 16.1.1


ospf_area_rt_install

protected void ospf_area_rt_install(OSPF_Area area)
Install area's vertex_list to routing table


transit_vertex_rtable_install

protected void transit_vertex_rtable_install(OSPF_SPF_vertex v,
                                             OSPF_Area area,
                                             int now_)
Hold the intermediate results on area routing table Install a new entry into routing table


ospf_route_add

protected void ospf_route_add(long dst,
                              OSPF_SPF_vertex new_en,
                              OSPF_Area area,
                              int now_)
Add a routing entry into RoutingTable and synchronize with drcl.inet.core.RT


ospf_vertex_lookup

protected static OSPF_SPF_vertex ospf_vertex_lookup(java.util.Vector list,
                                                    long id)
Test whether a vertex exists in the list xxx: a hashtable would help the performance


ospf_vertex_lookup

protected static OSPF_SPF_vertex ospf_vertex_lookup(TreeMapQueue list,
                                                    long id)
Test whether a vertex exists in the list xxx: a hashtable would help the performance


ospf_install_candidate

protected void ospf_install_candidate(TreeMapQueue candidate,
                                      OSPF_SPF_vertex w)
Install vertex w into candidate list the candidate list is sorted from the min cost to max cost


ospf_lsa_has_link

protected int ospf_lsa_has_link(OSPF_LSA w,
                                OSPF_LSA v)
Test whether there is a link in LSA w pointer to vertex v returns 1 if a link exists in w --> v


J-Sim v1.2.1-p7 API

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