|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.OS.OSPFv2.OSPF
The OSPFv2 interior gateway protocol (IGP).
| Nested Class Summary | |
class |
OSPF.AgingTimer
A cyclic timer used to age all LSAs currently installed in the databases of this session and (for the future) all external LSAs stored here. |
class |
OSPF.RTCControlTimer
The Routing Table Calculation Control Timer. |
| Field Summary | |
long |
agingInterval
The duration of the AgingTimer |
OSPF.AgingTimer |
agingTimer
A Timer aging the LSAs upon expiration |
boolean |
area_border_rtr
Indicates if this is an area border router. |
java.util.HashMap |
areaStructs
A HashMap which lists all area data structures of this OSPF router. |
boolean |
as_boundary_rtr
Indicates if this is an AS boundary router. |
java.lang.String |
as_nh
The NHI address prefix of the AS to which this router belongs. |
int |
as_num
The number of the AS to which this router belongs. |
static int |
ASPF_MCAST_ADDR
The int value of the multicast address for ALLSPFRouters (All Shortest Path First Routers). |
boolean |
backbone_rtr
Indicates if this is a backbone router. |
boolean[] |
debugOptions
The show options from the DML-config-file will be recorded here |
static java.lang.String |
DEFAULT_DEST
The Destination ID that indicates the default route. |
static int |
DESIG_MCAST_ADDR
|
java.util.HashMap |
dynConfKeys
A HashMap for dynamic Configuration of this OSPF session. |
static int |
INIT_SEQUENCE_NUM
The value used for LS Sequence Number when originating the first instance of any LSA. |
static byte |
INTER_AREA
Indicates a path-type of inter-area. |
boolean |
internal_rtr
Indicates if this is an internal Router. |
static byte |
INTRA_AREA
Indicates a path-type of intra-area. |
RoutingTable |
ipTable
The forwarding table, kept in the IP protocol session, which is the "live" table used for lookups when this router forwards packets. |
static int |
LS_INFINITY
The metric value indicating that the destination described by an LSA is unreachable |
static long |
LS_REFRESH_TIME
The maximum time between distinct originations of any particular self- originated LSA. |
static int |
MAX_AGE
The max of age an LSA can attain. |
static int |
MAX_AGE_DIFF
The max time dispersion that can occur, as an LSA is flooded throughout the AS. |
static int |
MAX_SEQUENCE_NUM
The maximum value that LS Sequence Number can attain. |
static long |
MIN_LS_ARRIVAL
The min time that must elapse between reception of new LSA instances during flooding. |
static long |
MIN_LS_ITVL
The minimum time between distinct originations of any particular LSA. |
static int |
MTU
The Maximum Transfer Unit supported on all Interfaces. |
java.lang.String |
nh
The NHI address prefix of the local router. |
long |
pacingFloodTime
long value indicating the time at which LSAs in the "Neighbor.pacingFloodList" are paced in between updates. |
static byte |
POINT_TO_POINT
Indicates a point-to-point connection to another router. |
static int |
PROTOOSPF
|
RandomStream |
randomStream
RandomStream to produce random values where it's needed due to RFC 2328 and to add dynamic behaviour to the protocol. |
HashMapRoutingTable |
routingTable
The OSPFv2 Routing Table of this ProtocolSession. |
OSPF.RTCControlTimer |
rtcControlTimer
The Routing Table Calculation Control Timer. |
Router |
rtr
The local router. |
int |
rtrid
The identity of this router. |
long |
spfDelay
long value specifying how long OSPF waits between receiving a topology change and starting an SPF calculation. |
long |
spfHoldTime
long value specifying how long OSPF waits between two consecutive SPF calculations |
static byte |
TO_STUB_NET
Indicates a connection to a stub network. |
static byte |
TO_TRANSIT_NET
Indicates a connection to a transit network. |
static Net |
topnet
A reference to the top-level Net. |
static byte |
TYPE_1_EXTERNAL
Indicates a path-type of type-1-external. |
static byte |
TYPE_2_EXTERNAL
Indicates a path-type of type-2-external. |
static byte |
VIRTUAL_LINK
Indicates a Virtual link to another area border router. |
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
OSPF()
Constructs an OSPF protocol session. |
|
| Method Summary | |
long |
buildIARoute(LSA summaryHeader,
int areaID)
This method is called, if the best route to a particular inter-area destination must be recalculated. |
long |
calculateRT()
Recalculate the entire Routing Table. |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the ospf protocol parameters. |
java.lang.String |
convertRouteID(java.lang.String destID)
Convert a destination id into the ip table format. |
void |
floodExternalLSA(LSA extLSA)
Flood an external LSA out of the router's interfaces. |
int |
getRouterID()
Return the smallest IP interface address belonging to this OSPF router. |
float |
getSimTime()
Get the current simulation time. |
void |
init()
Initialization routine called by ProtocolGraph after instantiation and when restarting the router after it has been stopped. |
boolean |
isSelforiginated(LSA testLSA)
Check whether testLSA is an LSA which has been originated by the router itself and return true if so, else false. |
double |
nowsec()
Returns the current simulation time in seconds. |
void |
opened(ProtocolSession myIP)
Overridden. |
void |
originateSummary3LSA(NetworkEntry netEntry,
java.lang.String destination)
This method is called by area-border routers only, to check whether a new summary type 3 must be originated. |
void |
originateSummary4LSA(java.lang.Integer areaID,
java.lang.Integer dest,
int cost,
byte pathType)
This method is called by area-border routers only. |
void |
printConfigError(java.lang.String struct,
int structID,
java.lang.String error)
|
void |
printConfigError(java.lang.String rise,
java.lang.String riseID,
java.lang.Exception riseEx)
Used to print error messages concerning configuration of interfaces or areas. |
void |
printConfiguration()
print the router's current ospf configuration if necessary. |
void |
printError(java.lang.String rise,
java.lang.String riseID,
java.lang.String errorStr)
Used by an OSPF Interface or Area to print error messages. |
void |
printGeneralError(java.lang.String occurence,
java.lang.Exception reason)
Used to print error messages in case of general errors. |
void |
printGeneralWarning(java.lang.String warning)
Used to print warning messages when the system reports a general warning. |
void |
printMessage(java.lang.String message)
Method for printing debug Messages. |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession. |
long |
removeIARoute(LSA summaryHeader,
int areaID)
This method is called if a Summary LSA has/has reached MAX_AGE. |
void |
routeAddedBy(RoutingInfo rinfo,
java.lang.String protocolName)
Notification that the named protocol has added a new entry to the IP forwarding table on this host. |
void |
routeDeletedBy(RoutingInfo rinfo,
java.lang.String protocolName)
Notification that the named protocol has removed an entry from the forwarding table on this host. |
void |
stop()
Stop this OSPF session. |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, open, pushAfterDelay, pushAfterDelayFailed, setGraph, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PROTOOSPF
public static final long LS_REFRESH_TIME
public static final long MIN_LS_ITVL
public static final long MIN_LS_ARRIVAL
public static final int MAX_AGE
public static final int MAX_AGE_DIFF
public static final int LS_INFINITY
public static final java.lang.String DEFAULT_DEST
public static final int INIT_SEQUENCE_NUM
public static final int MAX_SEQUENCE_NUM
public static final int MTU
public static final byte POINT_TO_POINT
public static final byte TO_TRANSIT_NET
public static final byte TO_STUB_NET
public static final byte VIRTUAL_LINK
public static final byte INTRA_AREA
public static final byte INTER_AREA
public static final byte TYPE_1_EXTERNAL
public static final byte TYPE_2_EXTERNAL
public static final int ASPF_MCAST_ADDR
public static final int DESIG_MCAST_ADDR
public static Net topnet
public Router rtr
public java.lang.String nh
public int rtrid
public boolean internal_rtr
public boolean area_border_rtr
public boolean backbone_rtr
public boolean as_boundary_rtr
public java.lang.String as_nh
public int as_num
public java.util.HashMap areaStructs
public HashMapRoutingTable routingTable
public RoutingTable ipTable
public boolean[] debugOptions
public java.util.HashMap dynConfKeys
public OSPF.AgingTimer agingTimer
public long agingInterval
public RandomStream randomStream
public OSPF.RTCControlTimer rtcControlTimer
public long spfDelay
public long spfHoldTime
public long pacingFloodTime
| Constructor Detail |
public OSPF()
| Method Detail |
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
ospf [
# This parameter sets the time interval at which the link state database
# is aged when it is kept in memory.
# optional! default value is: 4
age_itvl %I
# The following attributes configure some ospf specific timers:
# delay time in seconds between topology change and spf calculation. The default value is 5.
spf_delay %I<1:(0...65535)
# delay time in seconds between two consecutive spf calculations. The default value is 10.
spf_hold_time %I<1:(0...65535)
# delay time in seconds(!) at which LSAs in the flooding queue are paced in between updates.
# The default value is 0.033.
pacing_flood_time %F<1:(0.005...0.1)
# All show* parameters toggle certain debug output.
# show* is optional! default value is: false
# Link state database output
show_lsdb %S
# Output the forwarding table
show_fwd_table %S
# Output the shortest paths tree
show_shortest_path_tree %S
# Output information about hello packets
show_hello_pkt %S
# Output information about database description packets
show_dd_pkt %S
# Output information about the flooding procedure
show_flooding %S
# Output information about area configuration
show_area %S
# Output information about the neighbor states
show_neighbors %S # no output at the moment
# Output information about the interface configuration
show_interfaces %S
# Output information about the OSPF configuration
show_config %S
# Enable all output at once
show_all %S
# Each OSPF router belongs to at least one area.
area %T:.schemas.area
]
config in interface com.renesys.raceway.DML.Configurableconfig in class ProtocolSessioncfg - contains the values for configurable ospf protocol parameters
com.renesys.raceway.DML.configException - thrown if any of the calls to findSingle and
find throw such exception or if a misconfiguration
is determined.
public void init()
throws ProtocolException
init in class ProtocolSessionProtocolExceptionpublic void opened(ProtocolSession myIP)
opened in class ProtocolSessionpublic void stop()
public int getRouterID()
public double nowsec()
public float getSimTime()
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
ProtocolSessionIf you desire "safe" interaction with other CPU activities, even though your push() consumes no measurable/modelable CPU cycles, define the "cpudelay true" attribute for the ProtocolGraph and use pushAfterDelay(message,fromSession,0.0). This will guarantee proper ordering; that is, the framework will wait until the CPU is free before proceeding with the requested push().
push in class ProtocolSessionProtocolExceptionpublic boolean isSelforiginated(LSA testLSA)
public void floodExternalLSA(LSA extLSA)
public long calculateRT()
public void originateSummary3LSA(NetworkEntry netEntry,
java.lang.String destination)
netEntry - NetworkEntry which causes the summary to be originated.destination - String, representing the identifyer of the network to be announced.
public void originateSummary4LSA(java.lang.Integer areaID,
java.lang.Integer dest,
int cost,
byte pathType)
areaID - Integer Object representing the area's id from which the AS Boundary
route was learned.dest - Integer Object indicating the AS Boundary routers router id.cost - int value indicating the cost of the route.pathType - byte value indicating the type of the path leading to the ASBR.
public long buildIARoute(LSA summaryHeader,
int areaID)
summaryHeader - LSA just installed discribing a new inter area route.areaID - int value, indicating the area from which the summary was obtained.
public long removeIARoute(LSA summaryHeader,
int areaID)
summaryHeader - Summary LSA which has MAX_AGE.areaID - int value, indicating the area from which the summary was obtained.
public java.lang.String convertRouteID(java.lang.String destID)
destID - String, representing a destination id in OSPFv2 format.
public void routeAddedBy(RoutingInfo rinfo,
java.lang.String protocolName)
routeAddedBy in interface FIBChangeListenerrinfo - Information about the route added to the FIB.protocolName - The name of the protocol that added the route.
public void routeDeletedBy(RoutingInfo rinfo,
java.lang.String protocolName)
routeDeletedBy in interface FIBChangeListenerrinfo - Information about the route deleted from the FIB.protocolName - The name of the protocol that deleted the route.public void printMessage(java.lang.String message)
public void printConfiguration()
public void printError(java.lang.String rise,
java.lang.String riseID,
java.lang.String errorStr)
public void printConfigError(java.lang.String rise,
java.lang.String riseID,
java.lang.Exception riseEx)
rise - String representing "Area" or "Interface", depending on the class where
the error arised.riseID - String representing the ip address/area id of the interface/area where
the error arised.riseEx - exception rised by the error.
public void printConfigError(java.lang.String struct,
int structID,
java.lang.String error)
public void printGeneralError(java.lang.String occurence,
java.lang.Exception reason)
public void printGeneralWarning(java.lang.String warning)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||