w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Retro::RethBuf Class Reference

FIXME_docs. More...

#include <RethBuf.hpp>

Collaboration diagram for Retro::RethBuf:
[legend]

Public Types

typedef std::shared_ptr< RethBufpbuf_t
 

Public Member Functions

 RethBuf ()
 Default constructor.
 
 ~RethBuf ()
 Destructor.
 
void Clear ()
 FIXME_docs.
 
void SetSize (uint16_t size)
 FIXME_docs.
 
void SetTime ()
 FIXME_docs.
 
void SetTime (const Rtime &time)
 FIXME_docs.
 
uint16_t Size () const
 FIXME_docs.
 
const RtimeTime () const
 FIXME_docs.
 
const uint8_t * Buf8 () const
 FIXME_docs.
 
const uint16_t * Buf16 () const
 FIXME_docs.
 
const uint32_t * Buf32 () const
 FIXME_docs.
 
uint8_t * Buf8 ()
 FIXME_docs.
 
uint16_t * Buf16 ()
 FIXME_docs.
 
uint32_t * Buf32 ()
 FIXME_docs.
 
void SetMacDestination (uint64_t mac)
 FIXME_docs.
 
void SetMacSource (uint64_t mac)
 FIXME_docs.
 
uint64_t MacDestination () const
 FIXME_docs.
 
uint64_t MacSource () const
 FIXME_docs.
 
uint16_t Type () const
 FIXME_docs.
 
bool IsMcast () const
 FIXME_docs.
 
bool IsBcast () const
 FIXME_docs.
 
ssize_t Read (int fd)
 FIXME_docs.
 
ssize_t Write (int fd) const
 FIXME_docs.
 
std::string FrameInfo () const
 FIXME_docs.
 
void Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const
 FIXME_docs.
 

Static Public Attributes

static const size_t kMaxSize = 1514
 max ethernet frame size
 
static const size_t kMinSize = 60
 min ethernet frame size
 
static const size_t kCrcSize = 4
 size of ethernet CRC
 
static const size_t kWOffDstMac = 0
 offset dst mac in 16 bit wrds
 
static const size_t kWOffSrcMac = 3
 offset src mac in 16 bit wrds
 
static const size_t kWOffTyp = 6
 offset type in 16 bit wrds
 

Protected Attributes

Rtime fTime
 
uint16_t fSize
 
uint8_t fBuf [kMaxSize+kCrcSize]
 

Detailed Description

FIXME_docs.

Definition at line 27 of file RethBuf.hpp.

Member Typedef Documentation

◆ pbuf_t

typedef std::shared_ptr<RethBuf> Retro::RethBuf::pbuf_t

Definition at line 29 of file RethBuf.hpp.

Constructor & Destructor Documentation

◆ RethBuf()

Retro::RethBuf::RethBuf ( )

Default constructor.

Definition at line 50 of file RethBuf.cpp.

◆ ~RethBuf()

Retro::RethBuf::~RethBuf ( )

Destructor.

Definition at line 57 of file RethBuf.cpp.

Member Function Documentation

◆ Clear()

void Retro::RethBuf::Clear ( )
inline

FIXME_docs.

Definition at line 24 of file RethBuf.ipp.

References fSize.

Referenced by Retro::Rw11CntlDEUNA::TxRingHandler().

◆ SetSize()

void Retro::RethBuf::SetSize ( uint16_t  size)
inline

FIXME_docs.

Definition at line 33 of file RethBuf.ipp.

References fSize.

Referenced by Retro::Rw11CntlDEUNA::RxRingHandler(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ SetTime() [1/2]

void Retro::RethBuf::SetTime ( )
inline

FIXME_docs.

Definition at line 42 of file RethBuf.ipp.

References fTime, and Retro::Rtime::GetClock().

Referenced by Retro::Rw11CntlDEUNA::TxRingHandler().

◆ SetTime() [2/2]

void Retro::RethBuf::SetTime ( const Rtime time)
inline

FIXME_docs.

Definition at line 51 of file RethBuf.ipp.

References fTime.

◆ Size()

uint16_t Retro::RethBuf::Size ( ) const
inline

◆ Time()

const Rtime & Retro::RethBuf::Time ( ) const
inline

FIXME_docs.

Definition at line 68 of file RethBuf.ipp.

References fTime.

◆ Buf8() [1/2]

const uint8_t * Retro::RethBuf::Buf8 ( ) const
inline

FIXME_docs.

Definition at line 76 of file RethBuf.ipp.

References fBuf.

Referenced by Dump(), Retro::Rw11CntlDEUNA::RxRingHandler(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ Buf16() [1/2]

const uint16_t * Retro::RethBuf::Buf16 ( ) const
inline

◆ Buf32() [1/2]

const uint32_t * Retro::RethBuf::Buf32 ( ) const
inline

FIXME_docs.

Definition at line 92 of file RethBuf.ipp.

References fBuf.

◆ Buf8() [2/2]

uint8_t * Retro::RethBuf::Buf8 ( )
inline

FIXME_docs.

Definition at line 100 of file RethBuf.ipp.

References fBuf.

◆ Buf16() [2/2]

uint16_t * Retro::RethBuf::Buf16 ( )
inline

FIXME_docs.

Definition at line 108 of file RethBuf.ipp.

References fBuf.

◆ Buf32() [2/2]

uint32_t * Retro::RethBuf::Buf32 ( )
inline

FIXME_docs.

Definition at line 116 of file RethBuf.ipp.

References fBuf.

◆ SetMacDestination()

void Retro::RethBuf::SetMacDestination ( uint64_t  mac)
inline

FIXME_docs.

Definition at line 124 of file RethBuf.ipp.

References Buf16(), kWOffDstMac, and Retro::RethTools::Mac2WList().

◆ SetMacSource()

void Retro::RethBuf::SetMacSource ( uint64_t  mac)
inline

FIXME_docs.

Definition at line 133 of file RethBuf.ipp.

References Buf16(), kWOffSrcMac, and Retro::RethTools::Mac2WList().

Referenced by Retro::Rw11CntlDEUNA::TxRingHandler().

◆ MacDestination()

uint64_t Retro::RethBuf::MacDestination ( ) const
inline

FIXME_docs.

Definition at line 142 of file RethBuf.ipp.

References Buf16(), kWOffDstMac, and Retro::RethTools::WList2Mac().

Referenced by FrameInfo(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ MacSource()

uint64_t Retro::RethBuf::MacSource ( ) const
inline

FIXME_docs.

Definition at line 150 of file RethBuf.ipp.

References Buf16(), kWOffSrcMac, and Retro::RethTools::WList2Mac().

Referenced by FrameInfo().

◆ Type()

uint16_t Retro::RethBuf::Type ( ) const

FIXME_docs.

Definition at line 63 of file RethBuf.cpp.

References Buf16(), and kWOffTyp.

Referenced by FrameInfo().

◆ IsMcast()

bool Retro::RethBuf::IsMcast ( ) const
inline

FIXME_docs.

Definition at line 158 of file RethBuf.ipp.

References fBuf.

Referenced by Retro::Rw11CntlDEUNA::RxRingHandler(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ IsBcast()

bool Retro::RethBuf::IsBcast ( ) const
inline

FIXME_docs.

Definition at line 166 of file RethBuf.ipp.

References Buf16().

Referenced by Retro::Rw11CntlDEUNA::RxRingHandler(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ Read()

ssize_t Retro::RethBuf::Read ( int  fd)

FIXME_docs.

Definition at line 71 of file RethBuf.cpp.

References fBuf, fSize, and kMaxSize.

◆ Write()

ssize_t Retro::RethBuf::Write ( int  fd) const

FIXME_docs.

Definition at line 81 of file RethBuf.cpp.

References fBuf, and fSize.

Referenced by Retro::Rw11VirtEthTap::Snd().

◆ FrameInfo()

std::string Retro::RethBuf::FrameInfo ( ) const

◆ Dump()

void Retro::RethBuf::Dump ( std::ostream &  os,
int  ind = 0,
const char *  text = 0,
int  detail = 0 
) const

FIXME_docs.

Definition at line 102 of file RethBuf.cpp.

References Buf8(), FrameInfo(), fTime, Retro::RosPrintf(), and Size().

Referenced by Retro::Rw11CntlDEUNA::Dump(), and Retro::Rw11CntlDEUNA::TxRingHandler().

Member Data Documentation

◆ kMaxSize

const size_t Retro::RethBuf::kMaxSize = 1514
static

max ethernet frame size

Definition at line 68 of file RethBuf.hpp.

Referenced by Read(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ kMinSize

const size_t Retro::RethBuf::kMinSize = 60
static

min ethernet frame size

Definition at line 69 of file RethBuf.hpp.

Referenced by Retro::Rw11CntlDEUNA::RxRingHandler(), and Retro::Rw11CntlDEUNA::TxRingHandler().

◆ kCrcSize

const size_t Retro::RethBuf::kCrcSize = 4
static

size of ethernet CRC

Definition at line 70 of file RethBuf.hpp.

Referenced by Retro::Rw11CntlDEUNA::RxRingHandler().

◆ kWOffDstMac

const size_t Retro::RethBuf::kWOffDstMac = 0
static

offset dst mac in 16 bit wrds

Definition at line 71 of file RethBuf.hpp.

Referenced by MacDestination(), and SetMacDestination().

◆ kWOffSrcMac

const size_t Retro::RethBuf::kWOffSrcMac = 3
static

offset src mac in 16 bit wrds

Definition at line 72 of file RethBuf.hpp.

Referenced by MacSource(), and SetMacSource().

◆ kWOffTyp

const size_t Retro::RethBuf::kWOffTyp = 6
static

offset type in 16 bit wrds

Definition at line 73 of file RethBuf.hpp.

Referenced by Type().

◆ fTime

Rtime Retro::RethBuf::fTime
protected

Definition at line 76 of file RethBuf.hpp.

Referenced by Dump(), SetTime(), and Time().

◆ fSize

uint16_t Retro::RethBuf::fSize
protected

Definition at line 77 of file RethBuf.hpp.

Referenced by Clear(), Read(), SetSize(), Size(), and Write().

◆ fBuf

uint8_t Retro::RethBuf::fBuf[kMaxSize+kCrcSize]
protected

Definition at line 78 of file RethBuf.hpp.

Referenced by Buf16(), Buf32(), Buf8(), IsMcast(), Read(), and Write().


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