Packet Processor base class. Provides common infrastructure and interconnections for packet processors.
More...
|
ocsd_datapath_resp_t | outputDecodedPacket (const ocsd_trc_index_t index_sop, const P *pkt) |
|
void | outputRawPacketToMonitor (const ocsd_trc_index_t index_sop, const P *pkt, const uint32_t size, const uint8_t *p_data) |
|
void | indexPacket (const ocsd_trc_index_t index_sop, const Pt *packet_type) |
|
ocsd_datapath_resp_t | outputOnAllInterfaces (const ocsd_trc_index_t index_sop, const P *pkt, const Pt *pkt_type, std::vector< uint8_t > &pktdata) |
|
ocsd_datapath_resp_t | outputOnAllInterfaces (const ocsd_trc_index_t index_sop, const P *pkt, const Pt *pkt_type, const uint8_t *pktdata, uint32_t pktlen) |
|
const bool | hasRawMon () const |
|
void | ClearConfigObj () |
|
const bool | checkInit () |
|
void | statsAddTotalCount (const uint64_t count) |
|
void | statsAddUnsyncCount (const uint64_t count) |
|
void | statsAddBadSeqCount (const uint32_t count) |
|
void | statsAddBadHdrCount (const uint32_t count) |
|
void | statsInit () |
|
virtual ocsd_datapath_resp_t | processData (const ocsd_trc_index_t index, const uint32_t dataBlockSize, const uint8_t *pDataBlock, uint32_t *numBytesProcessed)=0 |
| Implementation function for the OCSD_OP_DATA operation. More...
|
|
virtual ocsd_datapath_resp_t | onEOT ()=0 |
| Implementation function for the OCSD_OP_EOT operation. More...
|
|
virtual ocsd_datapath_resp_t | onReset ()=0 |
| Implementation function for the OCSD_OP_RESET operation. More...
|
|
virtual ocsd_datapath_resp_t | onFlush ()=0 |
| Implementation function for the OCSD_OP_FLUSH operation. More...
|
|
virtual ocsd_err_t | onProtocolConfig ()=0 |
| Called when the configuration object is passed to the decoder. More...
|
|
virtual const bool | isBadPacket () const =0 |
| check if the current packet is an error / bad packet More...
|
|
void | LogError (const ocsdError &Error) |
|
void | LogMessage (const ocsd_err_severity_t filter_level, const std::string &msg) |
|
const ocsd_err_severity_t | getErrorLogLevel () const |
|
const bool | isLoggingErrorLevel (const ocsd_err_severity_t level) const |
|
void | updateErrorLogLevel () |
|
void | do_attach_notify (const int num_attached) |
|
void | Init (const std::string &name) |
|
template<class P, class Pt, class Pc>
class TrcPktProcBase< P, Pt, Pc >
Packet Processor base class. Provides common infrastructure and interconnections for packet processors.
The class is a templated base class.
- P - this is the packet object class.
- Pt - this is the packet type class.
- Pc - this is the packet configuration class.
implementations will provide concrete classes for each of these to operate under the common infrastructures. The base provides the trace data in (ITrcDataIn) interface and operates on the incoming operation type.
Implementions override the 'onFn()' and data process functions defined in TrcPktProcI, with the base class ensuring consistent ordering of operations.
Definition at line 126 of file trc_pkt_proc_base.h.