live
Public Member Functions | Private Member Functions
TunnelEncapsulationTrailer Class Reference

#include <TunnelEncaps.hh>

Public Member Functions

CookiesrcCookie ()
 
CookiedstCookie ()
 
u_int32_t & address ()
 
Portport ()
 
u_int8_t & ttl ()
 
u_int8_t & command ()
 
u_int32_t & auxAddress ()
 

Private Member Functions

char * byteOffset (int charIndex)
 

Detailed Description

Definition at line 30 of file TunnelEncaps.hh.

Member Function Documentation

u_int32_t& TunnelEncapsulationTrailer::address ( )
inline

Definition at line 48 of file TunnelEncaps.hh.

References byteOffset().

49  { return *(u_int32_t*)byteOffset(4); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61
u_int32_t& TunnelEncapsulationTrailer::auxAddress ( )
inline

Definition at line 57 of file TunnelEncaps.hh.

References byteOffset().

58  { return *(u_int32_t*)byteOffset(-4); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61
char* TunnelEncapsulationTrailer::byteOffset ( int  charIndex)
inlineprivate

Definition at line 61 of file TunnelEncaps.hh.

Referenced by address(), auxAddress(), command(), dstCookie(), port(), srcCookie(), and ttl().

62  { return ((char*)this) + charIndex; }
u_int8_t& TunnelEncapsulationTrailer::command ( )
inline

Definition at line 54 of file TunnelEncaps.hh.

References byteOffset().

55  { return *(u_int8_t*)byteOffset(11); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61
Cookie& TunnelEncapsulationTrailer::dstCookie ( )
inline

Definition at line 46 of file TunnelEncaps.hh.

References byteOffset().

47  { return *(Cookie*)byteOffset(2); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61
u_int16_t Cookie
Definition: TunnelEncaps.hh:28
Port& TunnelEncapsulationTrailer::port ( )
inline

Definition at line 50 of file TunnelEncaps.hh.

References byteOffset().

51  { return *(Port*)byteOffset(8); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61
Cookie& TunnelEncapsulationTrailer::srcCookie ( )
inline

Definition at line 44 of file TunnelEncaps.hh.

References byteOffset().

45  { return *(Cookie*)byteOffset(0); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61
u_int16_t Cookie
Definition: TunnelEncaps.hh:28
u_int8_t& TunnelEncapsulationTrailer::ttl ( )
inline

Definition at line 52 of file TunnelEncaps.hh.

References byteOffset().

53  { return *(u_int8_t*)byteOffset(10); }
char * byteOffset(int charIndex)
Definition: TunnelEncaps.hh:61

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