E2SAR 0.2.0
All Data Structures Namespaces Functions Typedefs Enumerations
e2sar::LBHdr Struct Reference

#include <e2sarHeaders.hpp>

Public Member Functions

void set (u_int16_t ent, EventNum_t event_num)
 
u_int8_t get_version () const
 
u_int8_t get_nextProto () const
 
u_int16_t get_entropy () const
 
EventNum_t get_eventNum () const
 
const boost::tuple< u_int8_t, u_int8_t, u_int16_t, EventNum_t > get_Fields () const
 

Data Fields

char preamble [2] {'L', 'B'}
 
u_int8_t version {lbhdrVersion}
 
u_int8_t nextProto {rehdrVersion}
 
u_int16_t rsvd {0}
 
u_int16_t entropy {0}
 
EventNum_t eventNum {0L}
 

Detailed Description

The Load Balancer Header. You should always use the provided methods to set and interrogate fields as the structure maintains Big-Endian order internally.

Member Function Documentation

◆ get_entropy()

u_int16_t e2sar::LBHdr::get_entropy ( ) const
inline

get entropy in host byte order

◆ get_eventNum()

EventNum_t e2sar::LBHdr::get_eventNum ( ) const
inline

get event number in host byte order

◆ get_Fields()

const boost::tuple< u_int8_t, u_int8_t, u_int16_t, EventNum_t > e2sar::LBHdr::get_Fields ( ) const
inline

Convenience method to get all fields (in host byte order where appropriate). Best way to use it is

u_int8_t version; u_int8_t nextProto; u_int16_t entropy; EventNum_t eventNum;

boost::tie(version, nextProto, entropy, eventNum) = lbhdr.get_Fields();

◆ get_nextProto()

u_int8_t e2sar::LBHdr::get_nextProto ( ) const
inline

get next protocol field

◆ get_version()

u_int8_t e2sar::LBHdr::get_version ( ) const
inline

get version

◆ set()

void e2sar::LBHdr::set ( u_int16_t ent,
EventNum_t event_num )
inline

Set all fields to network/big-endian byte order values


The documentation for this struct was generated from the following file: