urv.olsr.data.duplicate
Class DuplicateTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<K,java.lang.Integer>
          extended by urv.olsr.data.ExpiringEntryTable<DuplicateTableEntry,java.lang.Boolean>
              extended by urv.olsr.data.duplicate.DuplicateTable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<DuplicateTableEntry,java.lang.Integer>

public class DuplicateTable
extends ExpiringEntryTable<DuplicateTableEntry,java.lang.Boolean>

Upon receiving a basic packet, a node examines each of the "message headers". Based on the value of the "Message Type" field, the node can determine the fate of the message. A node may receive the same message several times. Thus, to avoid re-processing of some messages which were already received and processed, each node maintains a Duplicate Set. In this set, the node records information about the most recently received messages where duplicate processing of a message is to be avoided. For such a message, a node records a "Duplicate Tuple" (D_addr, D_seq_num, D_retransmitted, D_iface_list, D_time), where D_addr is the originator address of the message, D_seq_num is the message sequence number of the message, D_retransmitted is a boolean indicating whether the message has been already retransmitted, D_iface_list is a list of the addresses of the interfaces on which the message has been received and D_time specifies the time at which a tuple expires and *MUST* be removed. In a node, the set of Duplicate Tuples are denoted the "Duplicate set". In this section, the term "Originator Address" will be used for the main address of the node which sent the message. The term "Sender Interface Address" will be used for the sender address (given in the IP header of the packet containing the message) of the interface which sent the message. The term "Receiving Interface Address" will be used for the address of the interface of the node which received the message.

Author:
Gerard Paris Aixala
See Also:
Serialized Form

Field Summary
static int DUP_HOLD_TIME
           
 
Constructor Summary
DuplicateTable(OLSRNode localNode)
           
 
Method Summary
 boolean containsSameAddrSeq(OLSRNode originator, SequenceNumber messageSequenceNumber)
           
 boolean isRetransmitted(OLSRNode originator, SequenceNumber seqNumber)
           
 void onTableChange()
           
 java.lang.String toString()
           
 
Methods inherited from class urv.olsr.data.ExpiringEntryTable
addEntryWithTimestamp, decreaseTimeAndProcessEntries, getEntry, getLock, keySet, overwriteEntryWithTimestamp, removeEntry, updateTimestampInEntry
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DUP_HOLD_TIME

public static final int DUP_HOLD_TIME
See Also:
Constant Field Values
Constructor Detail

DuplicateTable

public DuplicateTable(OLSRNode localNode)
Method Detail

onTableChange

public void onTableChange()
Specified by:
onTableChange in class ExpiringEntryTable<DuplicateTableEntry,java.lang.Boolean>

toString

public java.lang.String toString()
Overrides:
toString in class ExpiringEntryTable<DuplicateTableEntry,java.lang.Boolean>

containsSameAddrSeq

public boolean containsSameAddrSeq(OLSRNode originator,
                                   SequenceNumber messageSequenceNumber)

isRetransmitted

public boolean isRetransmitted(OLSRNode originator,
                               SequenceNumber seqNumber)