HelloMessage Class Reference

Representation of a HELLO protocol message. More...

#include <message.hh>

Inheritance diagram for HelloMessage:
Message EtxHelloMessage

List of all members.

Public Types

typedef multimap< LinkCode,

Public Member Functions

Messagedecode (uint8_t *buf, size_t &len) throw (InvalidMessage)
bool encode (uint8_t *buf, size_t &len)
size_t min_length () const
size_t length () const
const TimeVal get_htime () const
void set_htime (const TimeVal &htime)
OlsrTypes::WillType willingness () const
void set_willingness (OlsrTypes::WillType willingness)
void add_link (const LinkCode code, const IPv4 &remote_addr)
size_t remove_link (const IPv4 &remote_addr)
 Remove a given neighbor interface address from ALL link tuples.
void clear ()
const LinkBag & links () const
virtual string str () const
 Print a HelloMessage as a string.
virtual size_t get_links_length () const
 Calculate the on-wire size of all link state tuples.

Protected Member Functions

void add_link (const LinkCode code, const LinkAddrInfo &lai)
virtual size_t decode_link_tuple (uint8_t *buf, size_t &len, size_t &skiplen, bool has_lq=false) throw (InvalidLinkTuple)
 Decode a single link tuple from the buffer into the HelloMessage.
size_t link_tuple_header_length () const

Protected Attributes

TimeVal _htime
OlsrTypes::WillType _willingness
LinkBag _links

Detailed Description

Representation of a HELLO protocol message.

Member Function Documentation

size_t HelloMessage::decode_link_tuple ( uint8_t *  buf,
size_t &  len,
size_t &  skiplen,
bool  has_lq = false 
) throw (InvalidLinkTuple) [protected, virtual]

Decode a single link tuple from the buffer into the HelloMessage.

bufpointer to the buffer to decode.
lenthe number of bytes in the buffer.
skiplenthe number of bytes consumed by this function.
has_lqtrue if this function is being called from derived class EtxHelloMessage to process ETX information, otherwise false.
the number of bytes consumed in the input stream to produce a decoded link tuple.
InvalidLinkTupleif an invalid link tuple was found during message decoding.

Reimplemented in EtxHelloMessage.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations