45using namespace std::placeholders;
221 fMacDefault(RethTools::String2Mac(
"08:00:2b:00:00:00")),
225 fPr1State(kSTATE_RESET),
235 fTxRingState(kStateTxIdle),
240 fRxRingState(kStateRxIdle),
245 fRxPollTimer(
"Rw11CntlDEUNA::fRxPollTimer."),
336 "Bad state: started, no lam, not enabled, not found");
354 uint16_t(1)<<
fLam,
this);
377 string(
"Bad state: not in READY state or attached"));
379 if (type ==
"deuna") {
381 }
else if (type ==
"delua") {
385 string(
"Bad args: only deuna or delua supported"));
404 const uint64_t macbit1 = 0x1;
405 const uint64_t macbit2 = 0x2;
407 if (mac ==
"random") {
408 int fd = ::open(
"/dev/urandom",O_RDONLY);
410 throw Rexception(
"Rw11CntlDEUNA::SetMacDefault",
411 "open() for '/dev/urandom' failed: ", errno);
413 if (::read(fd, &bmac,
sizeof(bmac)) !=
sizeof(bmac)) {
414 int rd_errno = errno;
416 throw Rexception(
"Rw11CntlDEUNA::SetMacDefault",
417 "read() for '/dev/random' failed: ", rd_errno);
424 if (mac.substr(0,4) ==
"dec:") {
425 machex =
"08:00:0b:";
426 machex += mac.substr(4);
427 }
else if (mac.substr(0,6) ==
"retro:") {
428 machex =
"52:65:74:72:6f:";
429 machex += mac.substr(6);
436 throw Rexception(
"Rw11CntlDEUNA::SetMacDefault",
437 string(
"Bad args: mcast address given, lsb not 0"));
453 throw Rexception(
"Rw11CntlDEUNA::SetRxPollTime",
454 string(
"Bad args: time <= 0"));
465 throw Rexception(
"Rw11CntlDEUNA::SetRxQueLimit",
466 string(
"Bad args: rxqlim <= 0"));
484 static const char* mnemopcmd[16] = {
"noop ",
"getpcb",
"getcmd",
"slftst",
485 "start ",
"boot ",
"rsrv06",
"rsrv07",
486 "pdmd ",
"rsrv11",
"rsrv12",
"rsrv13",
487 "rsrv14",
"rsrv15",
"halt ",
"stop "};
488 if (pcmd >= 16)
return "??????";
489 return mnemopcmd[pcmd];
497 static const char* mnemofunc[32] = {
"noop ",
"uimp01",
"rdpa ",
"noop03",
498 "rpa ",
"wpa ",
"rmal ",
"wmal ",
499 "rrf ",
"wrf ",
"rctr ",
"rcctr ",
500 "rmode ",
"wmode ",
"rstat ",
"rcstat",
501 "uimp20",
"uimp21",
"rsid ",
"wsid ",
502 "uimp24",
"uimp25",
"uimp26",
"uimp27",
503 "uimp30",
"uimp31",
"uimp32",
"uimp33",
504 "uimp34",
"uimp35",
"uimp36",
"uimp37"};
505 if (func >= 32)
return "??????";
506 return mnemofunc[func];
514 static const char* mnemostate[16] = {
"reset ",
"pload ",
"ready ",
"run ",
515 "rsrv04",
"uhalt ",
"nhalt ",
"nuhalt",
516 "phalt ",
"rsrv11",
"rsrv12",
"rsrv13",
517 "rsrv14",
"rsrv15",
"rsrv16",
"sload "};
518 if (state >= 16)
return "??????";
519 return mnemostate[state];
528 lock_guard<RlinkConnect> lock(
Connect());
536 uint64_t macdst = pbuf->MacDestination();
543 if (matchdst & 0x1) {
550 lmsg <<
"-I " <<
Name() <<
": fdrop " << pbuf->FrameInfo() << endl;
557 }
else if (matchdst == 1) {
568 lmsg <<
"-I " <<
Name() <<
": qdrop " << pbuf->FrameInfo() << endl;
588 lock_guard<RlinkConnect> lock(
Connect());
591 os << bl << (text?text:
"--") <<
"Rw11CntlDEUNA @ " <<
this << endl;
592 os << bl <<
" fPC_rdpr0: " <<
fPC_rdpr0 << endl;
593 os << bl <<
" fPC_rdpcb: " <<
fPC_rdpcb << endl;
594 os << bl <<
" fPC_lapcb: " <<
fPC_lapcb << endl;
604 os << bl <<
" fPcb: ";
616 os << bl <<
" fMacDefault: "
619 os << bl <<
" fMacList[0]: "
622 os << bl <<
" fMacList[1]: "
627 os << bl <<
" fMacList[" <<
RosPrintf(i,
"d",2) <<
"]: "
633 os << bl <<
" fPr1*: "
656 os << bl <<
" fRxPollTime: " <<
fRxPollTime << endl;
660 os << bl <<
" fRxBufQueue.size: " <<
RosPrintf(rxquesize,
"d", 4) << endl;
661 for (
size_t i=0; i<rxquesize; i++) {
662 os << bl <<
" fRxBufQueue[" <<
RosPrintf(i,
"d", 4)
666 fRxBufCurr->Dump(os, ind+2,
"fRxBufCurr:", detail);
668 os << bl <<
" fRxBufCurr: " <<
"null" << endl;
670 os << bl <<
" fCtrTimeCleared: "
672 os << bl <<
" fCtrRxFra: "
674 os << bl <<
" fCtrRxFraMcast: "
676 os << bl <<
" fCtrRxByt: "
678 os << bl <<
" fCtrRxBytMcast: "
680 os << bl <<
" fCtrRxFraLoInt: "
682 os << bl <<
" fCtrRxFraLoBuf: "
684 os << bl <<
" fCtrTxFra: "
686 os << bl <<
" fCtrTxFraMcast: "
688 os << bl <<
" fCtrTxByt: "
690 os << bl <<
" fCtrTxBytMcast: "
692 os << bl <<
" fCtrTxFraAbort: "
694 os << bl <<
" fCtrFramesLoop: "
751 lmsg <<
"-E " <<
Name() <<
": pcmd write w/ busy"
771 lmsg <<
"-I " <<
Name() <<
": cmd"
773 <<
" rset=" << rset <<
" brst=" << brst;
786 lmsg <<
"-I " <<
Name() <<
": cmd"
788 <<
" r=" << rset <<
"," << brst
799 uint32_t udbb = 0777777;
827 fPcbb = ( uint32_t(clist[ipr2].Data()) |
828 (uint32_t(clist[ipr3].Data())<<16)) &
kUBA_M;
1047 bool udbb_ok = (udbb & ~kUBA_M) == 0;
1076 if (mac & 0x1)
return false;
1085 if (!udbb_ok)
return false;
1086 uint16_t mltlen = pr2len;
1088 if (mltlen == 0)
return true;
1090 for (
int i=0; i<mltlen; i++) {
1105 if (!udbb_ok)
return false;
1106 uint16_t mltlen = pr2len;
1110 if (mltlen == 0)
return true;
1117 for (
int i=0; i<mltlen; i++) {
1119 if (!(mac & 0x1))
return false;
1132 if (!udbb_ok)
return false;
1150 if (!udbb_ok)
return false;
1156 uint32_t txbase, rxbase;
1157 uint16_t txelen, rxelen;
1158 uint16_t txsize, rxsize;
1160 if (txbase & ~
kUBA_M)
return false;
1162 if (txsize <= 1)
return false;
1164 if (rxbase & ~
kUBA_M)
return false;
1166 if (rxsize <= 1)
return false;
1182 if ((!udbb_ok) || pr2len != 0)
return false;
1183 uint16_t ctrlen =
fPcb[3];
1184 if (ctrlen &0x1)
return false;
1185 if (ctrlen == 0)
return true;
1187 if (ctrlen > ctrmax) ctrlen = ctrmax;
1190 for (
auto& w : udb) w = 0;
1194 udb[ 1] = (dt.
Sec() < 0xffff) ? uint16_t(dt.
Sec()) : 0xffff;
1235 if (
fPcb[1] & mbz)
return false;
1258 if ((!udbb_ok) || pr2len != 0)
return false;
1259 uint16_t pltlen =
fPcb[3];
1260 if (pltlen &0x1)
return false;
1261 if (pltlen == 0)
return true;
1262 if (pltlen >
kDimPlt)
return false;
1265 for (
auto& w : udb) w = 0;
1285 udb[25] = (11 << 8) + 1;
1371 uint16_t txdsccur[4];
1372 uint16_t txdscnxt[4];
1386 const uint16_t dscnxt[4])
1413 uint16_t rxdsccur[4];
1414 uint16_t rxdscnxt[4];
1428 const uint16_t dscnxt[4])
1477 uint16_t pr0out = 0;
1483 uint16_t tsize = slen;
1506 uint16_t dsccurnew[4];
1507 uint16_t dscnxtnew[4];
1549 std::ostringstream sos;
1611 uint16_t pr0out = 0;
1617 uint16_t tsize = ebuf.
Size();
1619 if (ebuf.
Size() > slen) {
1640 uint16_t dsccurnew[4];
1641 uint16_t dscnxtnew[4];
1689 if (pfd.revents & (~pfd.events))
return -1;
1707 for (
int i=0; i<maxind; i++) {
1719 if (stat < inc || stat > 0xffff) stat = 0xffff;
1729 if (stat < inc) stat = 0xffffffff;
1748 lmsg <<
"-I " <<
Name() <<
": " << cmd <<
": mltlen=" <<
fMcastCnt;
1761 lmsg <<
"-I " <<
Name() <<
": " << cmd <<
":"
1774 const char* tag2, uint16_t val2)
1778 lmsg <<
"-I " <<
Name() <<
": " << cmd <<
": "
1780 if (tag2) lmsg << tag2 <<
"=" <<
RosPrintBvi(val2,8);
1790 bool tx = (rxtx ==
't');
1795 lmsg <<
"-I " <<
Name() <<
": " << rxtx <<
"xr "
1796 << rxtx <<
RosPrintf(rind,
"d0", 2) <<
" " << rw
1807 bool tx = (rxtx ==
't');
1809 lmsg <<
"-I " <<
Name() <<
":" << (tx ?
" snd " :
" rcv ") << buf.
FrameInfo();
1818 std::ostringstream sos;
1819 uint32_t segb = uint32_t(dsc[1]) + (uint32_t(dsc[2] &
kTXR2_M_SEGB)<<16);
1825 <<
"," <<
RosPrintBvi(uint16_t(dsc[3]>>12), 2, 4) <<
": ";
1860 char res[4] = {fill,fill,fill,0};
void SetTime()
FIXME_docs.
bool IsMcast() const
FIXME_docs.
static const size_t kCrcSize
size of ethernet CRC
static const size_t kMinSize
min ethernet frame size
bool IsBcast() const
FIXME_docs.
void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
void SetMacSource(uint64_t mac)
FIXME_docs.
const uint8_t * Buf8() const
FIXME_docs.
uint64_t MacDestination() const
FIXME_docs.
static const size_t kMaxSize
max ethernet frame size
const uint16_t * Buf16() const
FIXME_docs.
std::shared_ptr< RethBuf > pbuf_t
std::string FrameInfo() const
FIXME_docs.
void SetSize(uint16_t size)
FIXME_docs.
uint16_t Size() const
FIXME_docs.
bool IsOpen() const
FIXME_docs.
int Fd() const
FIXME_docs.
size_t AddAttn()
FIXME_docs.
size_t AddLabo()
FIXME_docs.
void AddAttnHandler(attnhdl_t &&attnhdl, uint16_t mask, void *cdata=nullptr)
FIXME_docs.
void QueueAction(actnhdl_t &&actnhdl)
FIXME_docs.
void GetAttnInfo(AttnArgs &args, RlinkCommandList &clist)
FIXME_docs.
bool Exec(RlinkCommandList &clist, RerrMsg &emsg)
FIXME_docs.
void AddPollHandler(pollhdl_t &&pollhdl, int fd, short events=POLLIN)
FIXME_docs.
I/O appicator to generate fill characters.
void Inc(size_t ind, double val=1.)
FIXME_docs.
void Define(size_t ind, const std::string &name, const std::string &text)
FIXME_docs.
time_t Sec() const
FIXME_docs.
bool IsPositive() const
FIXME_docs.
void GetClock(clockid_t clkid)
FIXME_docs.
double Age(clockid_t clkid) const
FIXME_docs.
uint64_t Read()
FIXME_docs.
void Open(clockid_t clkid=CLOCK_MONOTONIC)
FIXME_docs.
void SetRelative(const Rtime &dt)
FIXME_docs.
Implemenation (inline) of Rw11CntlBase.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
std::shared_ptr< Rw11UnitDEUNA > fspUnit[NU]
static const uint16_t kMODE_M_MBZ_DEUNA
MBZ bit:10,8:4,1.
static const uint16_t kSTAT_M_RRNG
RRNG: rx ring error.
static const uint16_t kTXR2_M_SEGB
SEGB: msg of seg base.
virtual void UnitSetup(size_t ind)
FIXME_docs.
static const uint16_t kPR0_M_RSET
RSET: sw reset.
static const uint16_t kSTATE_PHALT
port halted
static const uint16_t kFUNC_WSID
WSID: write system id.
uint16_t fTxRingELen
tx ring entry length
static std::string RingDsc2OSEString(const uint16_t dsc[4], char fill=' ')
FIXME_docs.
static const uint16_t kSTAT_M_TMOT
TMOT: UNIBUS timeout.
static const uint16_t kSTAT_M_MERR
MERR: multiple errors.
bool fRunning
in kSTATE_RUN and active
static const uint16_t kPC0_M_FUNC
FUNC: function code.
static const uint16_t kFUNC_RMAL
RMAL: read mcast MAC list.
void Wlist2UBAddrLen(const uint16_t wlist[2], uint32_t &addr, uint16_t &len)
FIXME_docs.
static const uint16_t kPR0_M_RXI
RXI: receive rung intr.
uint32_t fCtrTxFraAbort
ctr: xmit aborted frames
enum s_rx fRxRingState
rx ring handler busy
void Config(const std::string &name, uint16_t base, int lam)
FIXME_docs.
static const uint16_t kTXR3_M_LCAR
LCAR: lost carrier.
static const uint16_t kRXR3_M_MLEN
MLEN: message length.
static std::string RingDsc2String(const uint16_t dsc[4], char rxtx)
FIXME_docs.
int AttnHandler(RlinkServer::AttnArgs &args)
FIXME_docs.
static const uint16_t kRXR2_M_ERRS
ERRS: error summary.
void Wlist2UBAddr(const uint16_t wlist[2], uint32_t &addr)
FIXME_docs.
static const uint16_t kSTATE_NHALT
ni halted
void ClearStatus()
FIXME_docs.
static const uint16_t kPCMD_GETCMD
GETCMD: get command.
void SetupPrimClist()
FIXME_docs.
uint16_t fRxDscNxt[4]
rx nxt ring dsc
static const uint16_t kMODE_M_INTL
INTL: int loopback(DELUA)
static const uint32_t kUBAODD_M
bits of odd unibus address
bool ExecGetcmd(RlinkCommandList &clist)
FIXME_docs.
static const uint16_t kPR0_V_PCMDBP
PCMDBP: pcmd busy prot.
void StartTxRing()
FIXME_docs.
Rtime fRxPollTime
rx poll time interval
static const uint16_t kSTATE_RESET
reset
uint16_t TxRingIndexNext(uint16_t inc=1) const
FIXME_docs.
static const uint16_t kPCMD_HALT
HALT: halt.
static const uint16_t kFUNC_RSTAT
RSTAT: read status.
static const uint16_t kTXR2_M_ONE
ONE: one collision.
uint16_t fRxRingELen
rx ring entry length
static const uint16_t kMODE_M_DMNT
DMNT: dis maint message.
void SetRxQueLimit(size_t rxqlim)
FIXME_docs.
int RxPollHandler(const pollfd &pfd)
FIXME_docs.
static const uint16_t kPR0_M_PDMDWB
PDMDWB: pdmd while busy.
static const uint16_t kMODE_M_DRDC
DRDC: dis data chaining.
static const uint16_t kPR0_M_TXI
TXI: transmit rung intr.
std::string MacDefault() const
FIXME_docs.
static const uint16_t kPR0_M_PCMD
PCMD: port command.
static const uint16_t kRXR2_M_OWN
OWN: owned by DENUA.
static const uint16_t kTXR2_M_OWN
OWN: owned by DEUNA.
static const uint16_t kSTAT_M_TRNG
TRNG: tx ring error.
uint16_t fRxDscNxtPC[4]
rx nxt ring dsc from PrimClist
static const uint16_t kPR0
PR0 reg offset.
static const uint16_t kPCMD_STOP
STOP: stop.
static const uint16_t kPCMD_SELFTST
SELFTST: self test.
void LogRingFunc(const char *cmd)
FIXME_docs.
static const uint16_t kTXR3_M_UBTO
UBTO: UNIBUS timeout.
static const uint16_t kDimCtrDelua
DELUA count words (MAXCTR)
void UBAddrLen2Wlist(uint16_t wlist[2], uint32_t addr, uint16_t len)
FIXME_docs.
RtimerFd fRxPollTimer
rx poll timer
void LogFunc(const char *cmd, const char *tag1, uint16_t val1, const char *tag2=nullptr, uint16_t val2=0)
FIXME_docs.
static const uint16_t kTXR3_M_TDR
TDR: TDR value if RTRY=1.
size_t fPC_rdrxdsccur
PrimClist: rd rxdsc index.
static const uint16_t kRXR2_M_ENF
ENF: end of frame.
static const uint16_t kFUNC_WMODE
WMODE: write write.
static const uint16_t kDimCtr
max MAXCTR
size_t fRxQueLimit
rx queue limit
static const uint16_t kFUNC_RMODE
RMODE: read mode.
static const uint16_t kProbeOff
probe address offset (pr0)
uint32_t fCtrTxFraMcast
ctr: xmit mcast frames
static const uint16_t kRXR3_M_BUFL
BUFL: buf length error.
uint16_t fTxDscCur[4]
tx cur ring dsc
static const uint16_t kTXR2_M_ERRS
ERRS: error summary.
size_t fPC_rdpr0
PrimClist: rd pr0 index.
void SetType(const std::string &type)
FIXME_docs.
static const uint16_t kFUNC_RRF
RRF: read ring format.
RethBuf::pbuf_t fRxBufCurr
rx packet current
uint16_t fTxRingIndex
tx ring index
static const uint16_t kRXR2_M_FRAM
FRAM: frame error.
uint32_t fCtrFraLoop
ctr: loopback frames
size_t fPC_rdrxdscnxt
PrimClist: rd rxdsc index.
void ClearMacList()
FIXME_docs.
static const uint16_t kPCMD_GETPCBB
GETPCBB: get pcb base.
static const uint16_t kPCMD_NOOP
NOOP: noop.
std::deque< RethBuf::pbuf_t > fRxBufQueue
rx packet queue
uint32_t fCtrRxFra
ctr: rcvd frames
bool fPcbbValid
pcbb valid
uint16_t fPr0Last
last pr0 value
static const uint16_t kPR0_M_INTR
INTR: intr summary.
static const uint16_t kPR1_M_STATE
STATE: port status.
uint32_t TxRingDscAddr(uint16_t index) const
FIXME_docs.
static const uint16_t kTXR3_M_LCOL
LCOL: late collision.
static const uint16_t kMODE_M_TPAD
TPAD: tx msg padding ena.
void StartRxRing()
FIXME_docs.
static const uint16_t kDimMcast
max length Mcast list (MAXMLT)
bool Running() const
FIXME_docs.
uint16_t fPcb[4]
process control block
const char * MnemoFunc(uint16_t func) const
FIXME_docs.
static const uint16_t kPR3
PR3 reg offset.
size_t fRxBufOffset
rx packet offset
uint16_t fRxDscCur[4]
rx cur ring dsc
static const uint16_t kFUNC_RDPA
RDPA: read def MAC.
static const uint16_t kSTATE_SLOAD
secondary load
void UpdateStat16(uint32_t &stat, size_t ind, uint32_t inc=1)
FIXME_docs.
static const uint16_t kFUNC_RCTR
RCTR: read counters.
uint16_t fTxDscCurPC[4]
tx cur ring dsc from PrimClist
static const uint16_t kMODE_M_DTCR
DTCR: dis tx CRC.
static const uint16_t kTXR3_M_UFLO
UFLO: UNIBUS underflow.
static const uint16_t kMODE_M_ECT
ECT: ena collision test.
static const uint16_t kTXR3_M_BUFL
BUFL: buf length error.
static const uint16_t kIbaddr
DEUNA default address.
static const bool kProbeInt
probe int active
static const uint16_t kRXR2_M_CRC
CRC: CRC check error.
static const uint16_t kPR1_M_ICAB
ICAB: cable fail.
static const uint16_t kSTAT_M_RREV
RREV: ROM version.
static const uint16_t kRXR3_M_NCHN
NCHN: no data chaining.
static const uint16_t kPR0_M_BRST
RSET: breset seen.
static const uint16_t kFUNC_RPA
RPA: read phys MAC.
uint32_t fPcbb
process control block base
static const uint16_t kPR0_M_DNI
DNI: done intr.
static const uint16_t kPCMD_START
START: start tx/rx.
void SetRxPollTime(const Rtime &time)
FIXME_docs.
uint32_t fCtrRxFraLoBuf
ctr: rcvd frame lost buffers
bool RcvCallback(RethBuf::pbuf_t &pbuf)
FIXME_docs.
static const uint16_t kPC0_M_MBZ
MBZ.
void SetMacDefault(const std::string &mac)
FIXME_docs.
virtual void Start()
FIXME_docs.
RethBuf fTxBuf
tx packet buffer
size_t fPC_lapcb
PrimClist: la pcb index.
static const uint16_t kFUNC_RCSTAT
RCSTAT: read&clr status.
static const uint16_t kPR2
PR2 reg offset.
const char * MnemoPcmd(uint16_t pcmd) const
FIXME_docs.
static const uint16_t kRXR2_M_OFLO
OFLO: message overflow.
uint16_t fTxDscNxtPC[4]
tx nxt ring dsc from PrimClist
static const uint16_t kTXR2_M_STF
STF: start of frame.
static const uint16_t kSTAT_M_CERR
CERR: collision test er.
static const uint16_t kFUNC_WPA
WPA: write phys MAC.
static const uint16_t kSTAT_M_BABL
BABL: xmit on long(DELUA)
static const uint16_t kSTATE_NUHALT
ni and unibus halted
uint32_t fCtrTxByt
ctr: xmit bytes
uint32_t fCtrTxFra
ctr: xmit frames
static const uint16_t kSTATE_UHALT
unibus halted
size_t fPC_latxdscnxt
PrimClist: la txdsc nxt index.
static const uint16_t kPR0_M_SERI
SERI: status error intr.
static const bool kProbeRem
probr rem active
void StopTxRing()
FIXME_docs.
void LogRingInfo(char rxtx, char rw)
FIXME_docs.
void StopRxRing()
FIXME_docs.
void LogFrameInfo(char rxtx, const RethBuf &buf)
FIXME_docs.
int MacFilter(uint64_t mac)
FIXME_docs.
Rtime fCtrTimeCleared
ctr: time when cleared
uint16_t fRxRingIndex
rx ring index
static const uint16_t kTXR2_M_ENF
ENF: end of frame.
static const uint16_t kFUNC_WRF
WRF: write ring format.
static const uint16_t kPR1_M_XPWR
XPWR: transceive pwr fail.
virtual void Dump(std::ostream &os, int ind=0, const char *text=0, int detail=0) const
FIXME_docs.
size_t fPC_larxdsccur
PrimClist: la rxdsc index.
static const uint16_t kFUNC_RSID
RSID: read system id.
static const uint16_t kTXR3_M_RTRY
RTRY: retry failure.
uint32_t fTxRingBase
tx ring base
uint16_t fRxRingSize
rx ring size (# of entries)
uint16_t GetPr1() const
FIXME_docs.
static const uint16_t kSTAT_M_ERRS
ERRS: error summary.
void UpdateStat32(uint32_t &stat, size_t ind, uint32_t inc=1)
FIXME_docs.
static const uint16_t kTXR2_M_DEF
DEF: deferred.
int TxRingHandler()
FIXME_docs.
uint32_t RxRingDscAddr(uint16_t index) const
FIXME_docs.
static const uint16_t kTXR2_M_MORE
MORE: mult retry needed.
uint64_t fMacDefault
default MAC
uint16_t fTxRingSize
tx ring size (# of entries)
static const uint16_t kPR0_M_USCI
USCI: unsol state chang.
uint32_t fCtrRxByt
ctr: rcvd bytes
uint32_t fCtrTxBytMcast
ctr: xmit mcast bytes
size_t fPC_rdtxdscnxt
PrimClist: rd txdsc nxt index.
static const uint16_t kPR0_M_INTE
INTE: intr enable.
static const uint16_t kSTATE_PLOAD
primary load
static const uint16_t kRXR3_M_OVRN
OVRN: overrun error.
static const uint16_t kFUNC_WMAL
RMAL: write mcast MAC list.
static const uint16_t kPCMD_BOOT
BOOT: boot.
static const uint16_t kSTAT_M_PTCH
PTCH: ROM patch.
int RxRingHandler()
FIXME_docs.
static const uint16_t kRXR2_M_SEGB
SEGB: msg of seg base.
static const uint16_t kTXR2_M_MTCH
MTCH: station match.
Rw11CntlDEUNA()
Default constructor.
static const uint16_t kPR0_B_PCMDBP
PCMDBP: pcmd busy prot.
static const uint16_t kSTATE_READY
ready
static const uint16_t kPR1_M_DELUA
ID0: 1=DELUA;0=DEUNA
uint32_t fRxRingBase
rx ring base
void LogMacFunc(const char *cmd, uint64_t mac)
FIXME_docs.
uint32_t fCtrRxBytMcast
ctr: rcvd mcast bytes
static const uint16_t kMODE_M_PROM
PROM: promiscous mode.
static const uint16_t kPR0_M_PCEI
PCEI: port cmd err intr.
static const uint16_t kPR0_M_PCWWB
PCWWB: pcmd write w busy.
size_t fTxBufOffset
tx packet offset
static const uint16_t kPR1_M_PCTO
PCTO: port cmd timeout.
void ClearCtr()
FIXME_docs.
bool fPr1Delua
pr1 delua flag
bool fRingValid
ring format valid
uint16_t fTxDscNxt[4]
tx nxt ring dsc
uint32_t fCtrRxFraLoInt
ctr: rcvd frame lost int error
size_t fPC_latxdsccur
PrimClist: la txdsc cur index.
uint16_t fRxDscCurPC[4]
rx cur ring dsc from PrimClist
static const uint16_t kMODE_M_MBZ_DELUA
MBZ bit:10,8:7,5:4,1.
const char * MnemoState(uint16_t state) const
FIXME_docs.
static const uint16_t kPR0_M_RCBI
RCBI: rcv buff unavail.
uint32_t fCtrRxFraMcast
ctr: rcvd mcast frames
size_t fPC_rdtxdsccur
PrimClist: rd txdsc cur index.
static const uint16_t kFUNC_NOOP
NOOP: noop.
enum s_tx fTxRingState
tx ring handler state
static const uint16_t kMODE_M_ENAL
ENAL: ena all mcasts.
static void SetRingDsc(uint16_t dst[4], const uint16_t src[4])
FIXME_docs.
static const uint16_t kDimCtrDeuna
DEUNA count words (MAXCTR)
~Rw11CntlDEUNA()
Destructor.
static const uint16_t kPCMD_PDMD
PDMD: poll demand.
static const uint16_t kDimPlt
max MAXPLT
static const uint16_t kFUNC_RCCTR
RCCTR: read&clr counters.
uint16_t fPr1State
pr1 state
static const uint16_t kMODE_M_HDPX
HDPX: half-duplex (DEUNA)
static const uint16_t kSTAT_M_RRAM
RRAM: run from RAM.
uint64_t fMacList[2+kDimMcast]
MAC list:0=phys,1=bcast,2+=mcast.
static const uint16_t kRXR2_M_STF
STF: start of frame.
static const uint16_t kRXR3_M_UBTO
UBTO: UNIBUS timeout.
static const uint16_t kPR1
PR1 reg offset.
bool fPr1Pcto
pr1 pcto flag
void SetRunning(bool run)
FIXME_docs.
size_t fPC_rdpcb
PrimClist: rd pcb index.
static const int kLam
DEUNA default lam.
uint16_t RxRingIndexNext(uint16_t inc=1) const
FIXME_docs.
static const uint16_t kMODE_M_LOOP
LOOP: int loopback.
static const uint16_t kSTATE_RUN
running
static const uint32_t kUBA_M
bits of even unibus address
void LogMcastFunc(const char *cmd)
FIXME_docs.
int fLam
attn bit number (-1 of none)
uint32_t fTraceLevel
trace level; 0=off;1=cntl
std::string fType
controller type
RlinkCommandList fPrimClist
clist for attn primary info
RlinkConnect & Connect() const
FIXME_docs.
uint16_t Base() const
FIXME_docs.
Rw11Probe fProbe
controller probe context
Rw11Cpu & Cpu() const
FIXME_docs.
void ConfigCntl(const std::string &name, uint16_t base, int lam, uint16_t probeoff, bool probeint, bool proberem)
FIXME_docs.
bool fStarted
true if Start() called
RlinkServer & Server() const
FIXME_docs.
const std::string & Name() const
FIXME_docs.
RlogFile & LogFile() const
FIXME_docs.
virtual void UnitSetupAll()
FIXME_docs.
uint16_t fBase
controller base address
void AllIAddrMapInsert(const std::string &name, uint16_t ibaddr)
FIXME_docs.
void ModLalh(RlinkCommandList &clist, size_t ind, uint32_t addr, uint16_t mode=kCPAH_M_22BIT)
FIXME_docs.
int AddWMem(RlinkCommandList &clist, uint32_t addr, const uint16_t *buf, size_t size, uint16_t mode=kCPAH_M_22BIT, bool singleblk=false)
FIXME_docs.
int AddRMem(RlinkCommandList &clist, uint32_t addr, uint16_t *buf, size_t size, uint16_t mode=kCPAH_M_22BIT, bool singleblk=false)
FIXME_docs.
void ExecWibr(uint16_t ibaddr0, uint16_t data0, uint16_t ibaddr1=0, uint16_t data1=0, uint16_t ibaddr2=0, uint16_t data2=0)
FIXME_docs.
int AddWibr(RlinkCommandList &clist, uint16_t ibaddr, uint16_t data)
FIXME_docs.
int AddRibr(RlinkCommandList &clist, uint16_t ibaddr)
FIXME_docs.
static const uint16_t kCPAH_M_UBM22
ubmap+22bit
bool HasVirt() const
FIXME_docs.
virtual bool Snd(const RethBuf &ebuf, RerrMsg &emsg)=0
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.
bool Found() const
FIXME_docs.