74 fSize = (irc > 0) ? irc : 0;
91 std::ostringstream sos;
106 os << bl << (text?text:
"--") <<
"RethBuf @ " <<
this << endl;
107 os << bl <<
" fTime: " <<
fTime << endl;
108 os << bl <<
" fBuf: " <<
FrameInfo() << endl;
110 if (detail < 0)
return;
113 int imax = int(
Size())-1;
114 for (
int iline=0; ; iline++) {
115 if (ibeg > imax)
break;
116 if (detail <= 0 && iline >= 6)
break;
117 int iend = ibeg + 15;
123 os << bl <<
" " <<
RosPrintf(ibeg,
"x0", 4) <<
":";
125 for (
int i=ibeg; i<=iend; i++) os <<
" " <<
RosPrintf(
Buf8()[i],
"x0", 2);
126 for (
int i=0; i<igap; i++) os <<
" ";
129 for (
int i=ibeg; i<=iend; i++) {
130 char c = char(
Buf8()[i]);
131 if (c < 0x20 || c >= 0x7F) c =
'.';
ssize_t Read(int fd)
FIXME_docs.
static const size_t kCrcSize
size of ethernet CRC
static const size_t kMinSize
min ethernet frame size
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
static const size_t kWOffTyp
offset type in 16 bit wrds
RethBuf()
Default constructor.
const uint8_t * Buf8() const
FIXME_docs.
uint8_t fBuf[kMaxSize+kCrcSize]
uint64_t MacDestination() const
FIXME_docs.
uint64_t MacSource() const
FIXME_docs.
static const size_t kWOffDstMac
offset dst mac in 16 bit wrds
static const size_t kWOffSrcMac
offset src mac in 16 bit wrds
static const size_t kMaxSize
max ethernet frame size
const uint16_t * Buf16() const
FIXME_docs.
std::string FrameInfo() const
FIXME_docs.
uint16_t Size() const
FIXME_docs.
ssize_t Write(int fd) const
FIXME_docs.
uint16_t Type() const
FIXME_docs.
I/O appicator to generate fill characters.
RosPrintfS< bool > RosPrintf(bool value, const char *form=0, int width=0, int prec=0)
Creates a print object for the formatted output of a bool value.
Declaration of class ReventLoop.