src/olsr/model/olsr-state.h
changeset 7184 a15feb312428
parent 6852 8f1a53d3f6ca
child 7353 09fccf6195ea
equal deleted inserted replaced
7183:13fae068d099 7184:a15feb312428
    33 
    33 
    34 /// This class encapsulates all data structures needed for maintaining internal state of an OLSR node.
    34 /// This class encapsulates all data structures needed for maintaining internal state of an OLSR node.
    35 class OlsrState
    35 class OlsrState
    36 {
    36 {
    37   //  friend class Olsr;
    37   //  friend class Olsr;
    38   
    38 
    39 protected:
    39 protected:
    40   LinkSet m_linkSet;	///< Link Set (RFC 3626, section 4.2.1).
    40   LinkSet m_linkSet;    ///< Link Set (RFC 3626, section 4.2.1).
    41   NeighborSet m_neighborSet;		///< Neighbor Set (RFC 3626, section 4.3.1).
    41   NeighborSet m_neighborSet;            ///< Neighbor Set (RFC 3626, section 4.3.1).
    42   TwoHopNeighborSet m_twoHopNeighborSet;	///< 2-hop Neighbor Set (RFC 3626, section 4.3.2).
    42   TwoHopNeighborSet m_twoHopNeighborSet;        ///< 2-hop Neighbor Set (RFC 3626, section 4.3.2).
    43   TopologySet m_topologySet;	///< Topology Set (RFC 3626, section 4.4).
    43   TopologySet m_topologySet;    ///< Topology Set (RFC 3626, section 4.4).
    44   MprSet m_mprSet;	///< MPR Set (RFC 3626, section 4.3.3).
    44   MprSet m_mprSet;      ///< MPR Set (RFC 3626, section 4.3.3).
    45   MprSelectorSet m_mprSelectorSet;	///< MPR Selector Set (RFC 3626, section 4.3.4).
    45   MprSelectorSet m_mprSelectorSet;      ///< MPR Selector Set (RFC 3626, section 4.3.4).
    46   DuplicateSet m_duplicateSet;	///< Duplicate Set (RFC 3626, section 3.4).
    46   DuplicateSet m_duplicateSet;  ///< Duplicate Set (RFC 3626, section 3.4).
    47   IfaceAssocSet m_ifaceAssocSet;	///< Interface Association Set (RFC 3626, section 4.1).
    47   IfaceAssocSet m_ifaceAssocSet;        ///< Interface Association Set (RFC 3626, section 4.1).
    48   AssociationSet m_associationSet; ///<	Association Set (RFC 3626, section12.2). Associations obtained from HNA messages generated by other nodes.
    48   AssociationSet m_associationSet; ///<	Association Set (RFC 3626, section12.2). Associations obtained from HNA messages generated by other nodes.
    49   Associations m_associations;	///< The node's local Host Network Associations that will be advertised using HNA messages.
    49   Associations m_associations;  ///< The node's local Host Network Associations that will be advertised using HNA messages.
    50 
    50 
    51 public:
    51 public:
    52 
    52 
    53   OlsrState ()
    53   OlsrState ()
    54   {}
    54   {}
    55   
    55 
    56   // MPR selector
    56   // MPR selector
    57   const MprSelectorSet & GetMprSelectors () const
    57   const MprSelectorSet & GetMprSelectors () const
    58   {
    58   {
    59     return m_mprSelectorSet;
    59     return m_mprSelectorSet;
    60   }
    60   }
   158   const Associations & GetAssociations () const  // Set of associations that the node has
   158   const Associations & GetAssociations () const  // Set of associations that the node has
   159   {
   159   {
   160     return m_associations;
   160     return m_associations;
   161   }
   161   }
   162 
   162 
   163   AssociationTuple* FindAssociationTuple (const Ipv4Address &gatewayAddr,\
   163   AssociationTuple* FindAssociationTuple (const Ipv4Address &gatewayAddr, \
   164 					  const Ipv4Address &networkAddr,\
   164                                           const Ipv4Address &networkAddr, \
   165 					  const Ipv4Mask &netmask);
   165                                           const Ipv4Mask &netmask);
   166   void EraseAssociationTuple (const AssociationTuple &tuple);
   166   void EraseAssociationTuple (const AssociationTuple &tuple);
   167   void InsertAssociationTuple (const AssociationTuple &tuple);
   167   void InsertAssociationTuple (const AssociationTuple &tuple);
   168   void EraseAssociation (const Association &tuple);
   168   void EraseAssociation (const Association &tuple);
   169   void InsertAssociation (const Association &tuple);
   169   void InsertAssociation (const Association &tuple);
   170 
   170