|
xorp
|
Representation of a HELLO protocol message. More...
#include <message.hh>
Public Types | |
|
typedef multimap< LinkCode, LinkAddrInfo > | LinkBag |
Public Member Functions | |
| Message * | decode (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 |
Representation of a HELLO protocol message.
| 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.
| buf | pointer to the buffer to decode. |
| len | the number of bytes in the buffer. |
| skiplen | the number of bytes consumed by this function. |
| has_lq | true if this function is being called from derived class EtxHelloMessage to process ETX information, otherwise false. |
| InvalidLinkTuple | if an invalid link tuple was found during message decoding. |
Reimplemented in EtxHelloMessage.