olsr::set::CoherenceProxy Class Reference

#include <neighbors.hh>

List of all members.

Public Types

typedef val_lset_t linkset_t
typedef val_idx_lset_t hello_linkset_t
typedef val_nset_t neighborset_t
typedef sym_val_nset_t sym_neighborset_t
typedef sym_val_idx_nset_t tc_neighborset_t

Public Member Functions

 CoherenceProxy ()
virtual ~CoherenceProxy ()
std::pair
< neighborset_t::iterator,
bool > 
insert_link (const msg::Message::header &mh, const int linktype, const int will)
void set_willingness (const nset_t::iterator &pos, unsigned w)
void update_graph (const nset_t::iterator &pos)
bool update_state (const nset_t::iterator &pos)
void update_state (const address_t &maddr)
void set_sym (const nset_t::iterator &pos)
void unset_sym (const nset_t::iterator &pos)
void set_mpr (const nset_t::iterator &pos)
void set_mpr (const sym_neighborset_t::iterator &pos)
void unset_mpr (const nset_t::iterator &pos)
void unset_mpr (const sym_neighborset_t::iterator &pos)
void set_mprsel (const nset_t::iterator &pos, const timeval_t &v)
void unset_mprsel (const nset_t::iterator &pos)
bool is_advset_empty ()
bool is_hold_expired () const
void stamp_hold ()
bool is_valid (const nset_t::iterator &pos)
bool is_valid (const idx_nset_t::iterator &pos)
void erase (lset_t::iterator pos)
linkset_tlinkset ()
hello_linkset_thello_linkset ()
neighborset_tneighborset ()
sym_neighborset_tsym_neighborset ()
tc_neighborset_ttc_neighborset ()
const utl::Seqnum< u_int16_t > & advset_seqnum ()
void add_interface (const address_t &a)
void remove_interface (const address_t &a)

Private Types

typedef CoherenceProxy This
typedef sch::Updatable< Linkulink_t
typedef sch::UpdateEvent
< upd::LinkUpdater
link_updater_t
typedef std::set< ulink_tlset_t
typedef sch::Updatable< Neighboruneighbor_t
typedef sch::UpdateEvent
< upd::NeighborUpdater
neighbor_updater_t
typedef stampable_nset_ nset_t
typedef utl::Subset< lset_tval_lset_t
typedef utl::Subset< nset_t,
utl::NoAction< This,
nset_t::iterator >, nset_valid
< This, nset_t::iterator >
, This
val_nset_t
typedef utl::Subset
< val_nset_t, utl::NoAction
< val_nset_t >, nset_sym
< val_nset_t > > 
sym_val_nset_t
typedef utl::MSIndex< lset_t,
0, address_t
idx_lset_t
typedef utl::MSIndex< nset_t,
0, address_t
idx_nset_t
typedef utl::Subset
< utl::MSAdapt< idx_lset_t >
, utl::NoAction< idx_lset_t >
, utl::DefaultPredicate
< idx_lset_t >, idx_lset_t
val_idx_lset_t
typedef utl::Subset
< utl::MSAdapt< idx_nset_t >
, utl::NoAction< This,
idx_nset_t::iterator >
, nset_valid< This,
idx_nset_t::iterator >, This
val_idx_nset_t
typedef utl::Subset
< utl::MSAdapt< val_idx_nset_t >
, val_idx_nset_stamper,
nset_sym< val_idx_nset_t >
, val_idx_nset_t
sym_val_idx_nset_t

Private Member Functions

void erase_from_all (nset_t::iterator pos)

Private Attributes

lset_t lset_
nset_t nset_
linkset_t linkset_
idx_lset_t idx_lset_
hello_linkset_t hello_linkset_
neighborset_t neighborset_
sym_neighborset_t sym_neighborset_
idx_nset_t idx_nset_
val_idx_nset_t val_idx_nset_
tc_neighborset_t tc_neighborset_
utl::Seqnum< u_int16_t > advset_seqnum_
bool advset_changed_
unsigned sym_count_
unsigned mpr_count_
bool mprsel_empty_

Friends

class sch::StatePrinter

Classes

struct  nset_sym
struct  nset_valid
struct  stampable_nset_
struct  val_idx_nset_stamper


Member Typedef Documentation

typedef std::set<ulink_t> olsr::set::CoherenceProxy::lset_t [private]

typedef utl::Subset<nset_t, utl::NoAction<This, nset_t::iterator>, nset_valid<This, nset_t::iterator>, This> olsr::set::CoherenceProxy::val_nset_t [private]


Constructor & Destructor Documentation

olsr::set::CoherenceProxy::CoherenceProxy (  )  [inline]

olsr::set::CoherenceProxy::~CoherenceProxy (  )  [inline, virtual]

References erase(), and lset_.


Member Function Documentation

std::pair< CoherenceProxy::neighborset_t::iterator, bool > olsr::set::CoherenceProxy::insert_link ( const msg::Message::header mh,
const int  linktype,
const int  will 
) [inline]

Link accounting method.

  • local receiving interface address
  • remote sending interface address
  • main address of sending neighbor
  • linktype link type as advertised by the neighbor
  • validity validity time of the link
    Returns:
    iterator to the neighbor that was updated and a flag if this neighbor is new.
    This is to be called by msg::HELLO::parse() and takes care of all the coherence maintenance between link and neighbor sets.

References ASYM_LINK, olsr::set::Link::asymtime(), olsr::sch::Scheduler::erase(), olsr::cst::hello_grace, idx_lset_, idx_nset_, olsr::utl::TimeVal::in(), olsr::sch::Scheduler::insert(), olsr::utl::MSIndex< Set, Dim, Key, Comp >::insert(), LOST_LINK, lset_, olsr::cst::neighb_hold_time, olsr::utl::TimeVal::now(), nset_, olsr::msg::Message::header::originator, olsr::msg::Message::header::receiver, olsr::scheduler, olsr::msg::Message::header::sender, olsr::set::Link::set_asymtime(), olsr::sch::TimedEvent::set_next(), olsr::set::Link::set_symtime(), olsr::set::Link::set_time(), set_willingness(), SYM_LINK, olsr::set::Link::time(), update_state(), and olsr::msg::Message::header::validity.

Referenced by olsr::msg::HELLOMessage::parse().

void olsr::set::CoherenceProxy::set_willingness ( const nset_t::iterator &  pos,
unsigned  w 
) [inline]

Willingness setting proxy method.

  • pos iterator to the neighbor
  • w willingness to set it to
This method takes care of the coherence wrt. the path graph. If the willingness is set to > WILL_NEVER, a node in the graph must exist with a weight of w - 1 if the node is not an MPR and a weight of w - 1 + WILL_DEFAULT otherwise. If the willingness is set to WILL_DEFAULT, the node must be removed from the graph.

References olsr::mprset_recomp, olsr::routes_recomp, olsr::utl::Mark::set_mark(), and update_graph().

Referenced by insert_link().

void olsr::set::CoherenceProxy::update_graph ( const nset_t::iterator &  pos  )  [inline]

bool olsr::set::CoherenceProxy::update_state ( const nset_t::iterator &  pos  )  [inline]

Neighbor state updating method.

  • pos iterator to the neighbor to be updated
    Returns:
    true if the neighbor is still valid, false otherwise.

References nset_, olsr::routes_recomp, olsr::utl::Mark::set_mark(), set_sym(), and unset_sym().

Referenced by insert_link(), is_valid(), olsr::set::upd::LinkUpdater::operator()(), and update_state().

void olsr::set::CoherenceProxy::update_state ( const address_t maddr  )  [inline]

void olsr::set::CoherenceProxy::set_sym ( const nset_t::iterator &  pos  )  [inline]

Method to set a neighbor's symmetric flag

  • pos iterator to the neighbor

References olsr::advset_changed, advset_changed_, olsr::mprset_recomp, nset_, olsr::routes_recomp, olsr::utl::Mark::set_mark(), sym_count_, olsr::tc_redundancy, and update_graph().

Referenced by update_state().

void olsr::set::CoherenceProxy::unset_sym ( const nset_t::iterator &  pos  )  [inline]

void olsr::set::CoherenceProxy::set_mpr ( const nset_t::iterator &  pos  )  [inline]

void olsr::set::CoherenceProxy::set_mpr ( const sym_neighborset_t::iterator pos  )  [inline]

References set_mpr().

void olsr::set::CoherenceProxy::unset_mpr ( const nset_t::iterator &  pos  )  [inline]

void olsr::set::CoherenceProxy::unset_mpr ( const sym_neighborset_t::iterator pos  )  [inline]

References unset_mpr().

void olsr::set::CoherenceProxy::set_mprsel ( const nset_t::iterator &  pos,
const timeval_t v 
) [inline]

void olsr::set::CoherenceProxy::unset_mprsel ( const nset_t::iterator &  pos  )  [inline]

bool olsr::set::CoherenceProxy::is_advset_empty (  )  [inline]

bool olsr::set::CoherenceProxy::is_hold_expired (  )  const [inline]

void olsr::set::CoherenceProxy::stamp_hold (  )  [inline]

bool olsr::set::CoherenceProxy::is_valid ( const nset_t::iterator &  pos  )  [inline]

References update_state().

Referenced by erase().

bool olsr::set::CoherenceProxy::is_valid ( const idx_nset_t::iterator pos  )  [inline]

References update_state().

void olsr::set::CoherenceProxy::erase ( lset_t::iterator  pos  )  [inline]

void olsr::set::CoherenceProxy::erase_from_all ( nset_t::iterator  pos  )  [inline, private]

linkset_t& olsr::set::CoherenceProxy::linkset (  )  [inline]

hello_linkset_t& olsr::set::CoherenceProxy::hello_linkset (  )  [inline]

References hello_linkset_.

Referenced by olsr::msg::HELLOMessage::dump().

neighborset_t& olsr::set::CoherenceProxy::neighborset (  )  [inline]

References neighborset_.

Referenced by olsr::msg::HELLOMessage::dump().

sym_neighborset_t& olsr::set::CoherenceProxy::sym_neighborset (  )  [inline]

tc_neighborset_t& olsr::set::CoherenceProxy::tc_neighborset (  )  [inline]

References tc_neighborset_.

Referenced by olsr::msg::TCMessage::dump().

const utl::Seqnum<u_int16_t>& olsr::set::CoherenceProxy::advset_seqnum (  )  [inline]

void olsr::set::CoherenceProxy::add_interface ( const address_t a  )  [inline]

void olsr::set::CoherenceProxy::remove_interface ( const address_t a  )  [inline]


Friends And Related Function Documentation

friend class sch::StatePrinter [friend]


Member Data Documentation

Referenced by linkset(), and remove_interface().

Referenced by hello_linkset().

Referenced by neighborset().

Referenced by is_advset_empty(), and sym_neighborset().

Referenced by tc_neighborset().

Referenced by advset_seqnum().

Referenced by set_sym(), and unset_sym().

Referenced by set_mpr(), and unset_mpr().

Referenced by is_advset_empty(), and set_mprsel().


The documentation for this class was generated from the following files:

Generated on Thu Feb 12 20:45:39 2009 for Qolyester daemon by  doxygen 1.5.6