prophet::HelloTLV Class Reference

#include <HelloTLV.h>

Inheritance diagram for prophet::HelloTLV:

prophet::BaseTLV

List of all members.


Detailed Description

Definition at line 26 of file HelloTLV.h.


Public Types

enum  hello_hf_t {
  HF_UNKNOWN = 0x0, SYN = 0x1, SYNACK = 0x2, ACK = 0x3,
  RSTACK = 0x4
}
 Legal values for HelloTLVHeader.HF (hello function) p. More...

Public Member Functions

 HelloTLV (hello_hf_t hf, u_int8_t timer, const std::string &sender)
 Constructor.
virtual ~HelloTLV ()
 Destructor.
size_t serialize (u_char *bp, size_t len) const
 Virtual from BaseTLV.
hello_hf_t hf () const
 Accessors.
const char * hf_str () const
 Accessors.
u_int8_t timer () const
 Accessors.
std::string sender () const
 Accessors.

Static Public Member Functions

static const char * hf_to_str (hello_hf_t hf)

Public Attributes

struct
prophet::HelloTLV::HelloTLVHeader 
packed
 Hello TLV header
p.

Static Public Attributes

static const size_t HelloTLVHeaderSize = sizeof(struct HelloTLVHeader)

Protected Member Functions

 HelloTLV ()
 Constructor.
bool deserialize (const u_char *bp, size_t len)
 Virtual from BaseTLV.

Protected Attributes

hello_hf_t hf_
 Hello function bytecode.
u_int8_t timer_
 Units of 100ms between Hello messages.
std::string sender_
 endpoint id of sender

Friends

class TLVFactory< HelloTLV >

Classes

struct  HelloTLVHeader
 Hello TLV header
p. More...

Member Enumeration Documentation

Legal values for HelloTLVHeader.HF (hello function) p.

25, 4.4.1

Enumerator:
HF_UNKNOWN 
SYN 
SYNACK 
ACK 
RSTACK 

Definition at line 94 of file HelloTLV.h.


Constructor & Destructor Documentation

prophet::HelloTLV::HelloTLV ( hello_hf_t  hf,
u_int8_t  timer,
const std::string &  sender 
)

Constructor.

Definition at line 30 of file HelloTLV.cc.

virtual prophet::HelloTLV::~HelloTLV (  )  [inline, virtual]

Destructor.

Definition at line 125 of file HelloTLV.h.

prophet::HelloTLV::HelloTLV (  )  [protected]

Constructor.

Protected to force access through TLVFactory.

Definition at line 25 of file HelloTLV.cc.


Member Function Documentation

static const char* prophet::HelloTLV::hf_to_str ( hello_hf_t  hf  )  [inline, static]

Definition at line 103 of file HelloTLV.h.

References ACK, HF_UNKNOWN, RSTACK, SYN, and SYNACK.

Referenced by hf_str().

size_t prophet::HelloTLV::serialize ( u_char *  bp,
size_t  len 
) const [virtual]

hello_hf_t prophet::HelloTLV::hf (  )  const [inline]

Accessors.

Definition at line 133 of file HelloTLV.h.

References hf_.

const char* prophet::HelloTLV::hf_str (  )  const [inline]

Accessors.

Definition at line 134 of file HelloTLV.h.

References hf_, and hf_to_str().

u_int8_t prophet::HelloTLV::timer (  )  const [inline]

Accessors.

Definition at line 135 of file HelloTLV.h.

References timer_.

std::string prophet::HelloTLV::sender (  )  const [inline]

Accessors.

Definition at line 136 of file HelloTLV.h.

References sender_.

bool prophet::HelloTLV::deserialize ( const u_char *  bp,
size_t  len 
) [protected, virtual]


Friends And Related Function Documentation

friend class TLVFactory< HelloTLV > [friend]

Definition at line 140 of file HelloTLV.h.


Member Data Documentation

Hello TLV header
p.

25, 4.4.1

The Hello TLV is used to set up and maintain a link between two PRoPHET nodes. Hello messages with the SYN function are transmitted periodically as beacons. The Hello TLV is the first TLV exchanged between two PRoPHET nodes when they encounter each other. No other TLVs can be exchanged until the first Hello sequenece is completed.

Once a communication link is established between two PRoPHET nodes, the Hello TLV will be sent once for each interval as defined in the interval timer. If a node experiences the lapse of HELLO_DEAD Hello intervals without receiving a Hello TLV on an ESTAB connection (as defined in the state machine in Section 5.2), the connection SHOULD be assumed broken.

const size_t prophet::HelloTLV::HelloTLVHeaderSize = sizeof(struct HelloTLVHeader) [static]

Definition at line 88 of file HelloTLV.h.

Referenced by deserialize(), and serialize().

Hello function bytecode.

Definition at line 152 of file HelloTLV.h.

Referenced by deserialize(), hf(), hf_str(), and serialize().

u_int8_t prophet::HelloTLV::timer_ [protected]

Units of 100ms between Hello messages.

Definition at line 153 of file HelloTLV.h.

Referenced by deserialize(), serialize(), and timer().

std::string prophet::HelloTLV::sender_ [protected]

endpoint id of sender

Definition at line 154 of file HelloTLV.h.

Referenced by deserialize(), sender(), and serialize().


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

Generated on Mon Jul 21 14:12:22 2008 for DTN Reference Implementation by  doxygen 1.5.6