|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.OSPFv2.Neighbor
The class Neighbor represents a conversation between its interface owner and the neighboring interface. All Information to build and maintain this conversation is represented in it. It is identified either by the neighboring router's OSPF Router ID or by its Neighbor ip address.
| Nested Class Summary | |
class |
Neighbor.FloodingTimer
/* A multiple shot Timer for flooding LSAs in LS Update Packets. |
class |
Neighbor.InactivityTimer
/* The Inactivity Timer for this Neighbor class. |
class |
Neighbor.LastRecDDPacket
A class in which the important information of the last received DD packet are recorded. |
class |
Neighbor.RetransmissionTimer
/* The Retransmission Timer for this Neighbor class. |
| Field Summary | |
static int |
ATTEMPT
Indicates that the current state of neighbor conversation is ATTEMPT |
DD_Packet |
dataDescContent
A Database Description Packet. |
java.util.Vector |
dbSummList
The complete list of LSAs that make up the area link-state database, at the moment the neighbor goes into Database Exchange state (EXCHANGE). |
int |
DDSeqNum
The DD Sequence Number of the DD packet that is currently being sent to the neighbor |
Neighbor.InactivityTimer |
deadTimer
Single shot timer whose firing indicates that no Hello Packet has been seen from this Neighbor recently. |
static int |
DOWN
Indicates that the current state of neighbor conversation is DOWN |
static int |
EXCHANGE
Indicates that the current state of neighbor conversation is EXCHANGE |
static int |
EXSTART
Indicates that the current state of neighbor conversation is EXSTART |
Neighbor.FloodingTimer |
floodTimer
Multiple shot timer whose firing indicates that LSAs should be reflooded. |
static int |
FULL
Indicates that the current state of neighbor conversation is FULL |
static int |
INIT
Indicates that the current state of neighbor conversation is INIT |
boolean |
isMaster
To know who is master in the master/slave relationship during Database Exchage. |
Neighbor.LastRecDDPacket |
lastDDPacket
Another data structure for keeping information of the last received DD packet. |
static int |
LOADING
Indicates that the current state of neighbor conversation is LOADING |
LS_RequestPacket |
lsReqContent
A Link State Request Packet. |
java.util.Hashtable |
lsReqList
The list of LSAs that need to be received from this neighbor in order to synchronize the two neighbor's link-state database. |
java.util.HashMap |
lsRetransList
The list of LSAs that have been flooded but not yet acknowledged on this adjacency. |
int |
neighborBDR
The neighbor's IDEA of the backup designated router. |
int |
neighborDR
The neighbor's IDEA of the designated router. |
int |
neighborID
The router ID of the Neighbor Router. |
int |
neighborIPAddr
The IP address of the neighboring router's interface to the attached network. |
java.lang.String |
neighborNHI
The NHI address prefix of the neighboring router. |
int |
neighborPrio
The Router priority of the neighboring router. |
boolean[] |
options
The optional OSPF capabilities supported by the neighbor. |
java.util.HashMap |
pacingFloodList
The list of LSAs that must be flooded out to this neighbor when the pacingTimer fires. |
Neighbor.RetransmissionTimer |
retransTimer
Multiple shot timer whose firing indicates that a Database Description or Request Packet should be retransmitted. |
int |
state
The functional level of the neighbor conversation |
static int |
TWOWAY
Indicates that the current state of neighbor conversation is 2-WAY |
| Constructor Summary | |
Neighbor(OSPF myOSPF,
AreaData myArea,
Interface myInterface,
int ipaddr)
Constructs an Neighbor. |
|
| Method Summary | |
void |
adjOk()
A decision must be made as to whether an adjacency should be established/maintained with the neighbor. |
void |
badLSReq()
Called if a LS Request has been received for an LSA not contained in the database. |
void |
directAcknowledge(LSA ackLSA)
Send a direct Acknowledgment for a particular LSA to the Neighbor. |
void |
exchange(Packet dataDescPkt)
called if state is EXCHANGE. |
void |
exchangeDone()
At this point, the router has sent and received an entire sequence of Database Description Packets. |
java.util.Vector |
fillAndSendUpdate(java.util.Vector requests)
Fill an LS Update Packet with requested LSAs and send it to the Neighbor. |
void |
fillDDPacketWithHeaders()
fill the global DD Packet dataDescContent with as many headers from the database summary list as possible. |
void |
fillRequestPacket()
fill the global LS Request Packet lsReqContent with the keys of as many LSAs from the link state request list as possible. |
java.lang.String |
getStrFromState(int status)
Converts the integer value of state in a more readable format. |
boolean |
hasKnownLSType(LSA testLSA)
Check whether testLSA has a known LS Type and return true if so, otherwise false. |
void |
initDBExchange()
initializes the Database Exchange between two Neighbors |
void |
loadingDone()
Link State Updates have been received for all out-of-date portions of the database. |
void |
negotiation(Packet dataDescPkt)
called when a DD Packet is received while state was EXSTART, or state turned to EXSTART. |
void |
negotiationDone(boolean neighborIsMaster,
java.util.Vector payload)
At this point Master/Slave relationship is definitly established. |
void |
oneWayHelloRec(Packet helloPkt,
int sourceIP)
Have seen a Neighbor, but the Neighbor doesn't know about me |
void |
processFloodedUpdate(Packet lsUpdPkt)
LS Update Packet has been received while state was FULL. |
void |
processLSAck(Packet lsAckPkt)
When an LS Ack Packet was received, this method is called by the Interface which is adjacent to this Neighbor. |
void |
processLSAs(java.util.Vector ddPayload)
Process the LSA Headers received in the last received Database Description Packet. |
void |
processLSRequest(Packet lsReqPkt)
examine the requested LSAs, locate them in the database and send them in LS Update Packets to the Neighbor. |
void |
processLSUpdate(Packet lsUpdPkt)
LS Update Packet has been received while state was EXCHANGE or LOADING. |
boolean |
processReceivedLSA(LSA recLSA)
This method is called by either "processLSUpdate" or "processFloodedUpdate". |
protected void |
removeRequest(java.lang.String removeKey)
Remove a key from the LS Request List. |
void |
reset()
reset the Neighbor Data Structure to the initial values. |
void |
sendPacket(ProtocolMessage content)
Sends an OSPF Packet (database description or ls request) to the Neighbor this Structure was built for. |
void |
seqNumMismatch(java.lang.String reason)
Actions to be performed, if the received DD Packet has a) an unexpected DD sequence number or b) unexpectedly the Initialize bit set or c) an Options field differing from the last Options field received. |
boolean |
startFlooding()
The Interface's pacingTimer schedules the first flooding of an LSA. |
void |
subseqTreatment(Packet dataDescPkt)
called by the Interface Data Structure if a DD Packet was received and the relationship with the neighbor is in state LOADING or FULL. |
void |
twoWayHelloRec(Packet helloPkt,
int sourceIP)
Determine whether an adjacency should be established with the neighbor |
void |
twoWayReceived(Packet dataDescPkt)
called when a DD Packet is received while state was INIT. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DOWN
public static final int ATTEMPT
public static final int INIT
public static final int TWOWAY
public static final int EXSTART
public static final int EXCHANGE
public static final int LOADING
public static final int FULL
public int state
public boolean isMaster
public int DDSeqNum
public Neighbor.LastRecDDPacket lastDDPacket
public int neighborPrio
public int neighborID
public java.lang.String neighborNHI
public int neighborIPAddr
public boolean[] options
public int neighborDR
public int neighborBDR
public java.util.HashMap lsRetransList
public java.util.Vector dbSummList
public java.util.Hashtable lsReqList
public java.util.HashMap pacingFloodList
public DD_Packet dataDescContent
public LS_RequestPacket lsReqContent
public Neighbor.InactivityTimer deadTimer
public Neighbor.RetransmissionTimer retransTimer
public Neighbor.FloodingTimer floodTimer
| Constructor Detail |
public Neighbor(OSPF myOSPF,
AreaData myArea,
Interface myInterface,
int ipaddr)
| Method Detail |
public void reset()
public void oneWayHelloRec(Packet helloPkt,
int sourceIP)
public void twoWayHelloRec(Packet helloPkt,
int sourceIP)
public void twoWayReceived(Packet dataDescPkt)
public void negotiation(Packet dataDescPkt)
public void negotiationDone(boolean neighborIsMaster,
java.util.Vector payload)
public void processLSAs(java.util.Vector ddPayload)
ddPayload - A Vector holding the LSA Headers to process.public void fillDDPacketWithHeaders()
public void seqNumMismatch(java.lang.String reason)
public void badLSReq()
public void exchange(Packet dataDescPkt)
public void exchangeDone()
public void subseqTreatment(Packet dataDescPkt)
public void adjOk()
public void fillRequestPacket()
public java.util.Vector fillAndSendUpdate(java.util.Vector requests)
throws ProtocolException
ProtocolExceptionpublic void processLSRequest(Packet lsReqPkt)
public void processLSUpdate(Packet lsUpdPkt)
lsUpdPkt - an LS Update Packet received while Neighbor state was EXCHANGE or
LOADING.protected void removeRequest(java.lang.String removeKey)
removeKey - A String representing the key which shall be removed.
public boolean processReceivedLSA(LSA recLSA)
throws ProtocolException
recLSA - LSA which was received in an LS Update Packet.
ProtocolException - thrown if a Bad LS Request is triggered.public boolean startFlooding()
public boolean hasKnownLSType(LSA testLSA)
public void processFloodedUpdate(Packet lsUpdPkt)
public void loadingDone()
public void sendPacket(ProtocolMessage content)
public void initDBExchange()
public java.lang.String getStrFromState(int status)
public void directAcknowledge(LSA ackLSA)
public void processLSAck(Packet lsAckPkt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||