urv.olsr.handlers
Class HelloMessageHandler
java.lang.Object
urv.olsr.handlers.HelloMessageHandler
public class HelloMessageHandler
- extends java.lang.Object
This class is in charge of performing all needed actions when a new
HelloMessage is received
Tables (Mpr,MprSelector,Neighbour of Neighbours) are updated when
a new message is received
MPR computation is asked to be performed again when a neighbor becomes
symmetric neighbor or we add a new two-hop neighbor
OnTableChange is invoked when a new entry is added to the neighbor table
or when there are new NoNs
The "Originator Address" of a HELLO message is the main address of
the node, which has emitted the message.
Upon receiving a HELLO message from a symmetric neighbor, a node
SHOULD update its 2-hop Neighbor Set. Notice, that a HELLO message
MUST neither be forwarded nor be recorded in the duplicate set.
Upon receiving a HELLO message, the "validity time" MUST be computed
from the Vtime field of the message header (see section 3.3.2).
If the Originator Address is the main address of a
L_neighbor_iface_addr from a link tuple included in the Link Set with
L_SYM_time >= current time (not expired)
(in other words: if the Originator Address is a symmetric neighbor)
then the 2-hop Neighbor Set SHOULD be updated as follows:
1 for each address (henceforth: 2-hop neighbor address), listed
in the HELLO message with Neighbor Type equal to SYM_NEIGH or
MPR_NEIGH:
1.1 if the main address of the 2-hop neighbor address = main
address of the receiving node:
silently discard the 2-hop neighbor address.
(in other words: a node is not its own 2-hop neighbor).
1.2 Otherwise, a 2-hop tuple is created with:
N_neighbor_main_addr = Originator Address;
N_2hop_addr = main address of the
2-hop neighbor;
N_time = current time
+ validity time.
This tuple may replace an older similar tuple with same
N_neighbor_main_addr and N_2hop_addr values.
2 For each 2-hop node listed in the HELLO message with Neighbor
Type equal to NOT_NEIGH, all 2-hop tuples where:
N_neighbor_main_addr == Originator Address AND
N_2hop_addr == main address of the
2-hop neighbor are deleted.
- Author:
- Marcel Arrufat Arias
Field Summary |
protected org.apache.commons.logging.Log |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.apache.commons.logging.Log log
HelloMessageHandler
public HelloMessageHandler(NeighborTable neighborTable,
OLSRNode localNode)
- The Handler will update Neighbor table depending on the HELLO messages
received
- Parameters:
neighborTable
- localNode
-
handleHelloMessage
public void handleHelloMessage(OLSRNode source,
HelloMessage helloMessage,
ValidityTime vTime)
- Updates neighborTable with the new information coming from this message
-
- Parameters:
source
- the node that send the Hello MessagehelloMessage
- the Hello MessagevTime
- message validity time (in seconds)
registerMprSelectorSet
public void registerMprSelectorSet(MprSelectorSet mprSelectorSet)