diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-03-24 16:28:31 +0200 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-03-24 16:28:31 +0200 |
commit | 6c569e6bbf05d940a23028b5d61a13ce4fa2a489 (patch) | |
tree | 03f0e997d74b528f4cac9664c1e2970e506da211 /src/flow_stat_parser.h | |
parent | 05a61d707478494e8ee88703b7d1dafc9a6f2581 (diff) |
Added flow parser for 82599 10G card. Added exceptions for flow stat
errors
Diffstat (limited to 'src/flow_stat_parser.h')
-rw-r--r-- | src/flow_stat_parser.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/src/flow_stat_parser.h b/src/flow_stat_parser.h index 606a1bec..8c9e1418 100644 --- a/src/flow_stat_parser.h +++ b/src/flow_stat_parser.h @@ -19,19 +19,33 @@ limitations under the License. */ -class Cxl710Parser { +#ifndef __FLOW_STAT_PARSER_H__ +#define __FLOW_STAT_PARSER_H__ + +// Basic flow stat parser. Relevant for xl710/x710/x350 cards +#include "common/Network/Packet/IPHeader.h" + +class CFlowStatParser { public: - Cxl710Parser(); - void reset(); - int parse(uint8_t *pkt, uint16_t len); - bool is_fdir_supported() {return m_fdir_supported == true;}; - int get_ip_id(uint16_t &ip_id); - int set_ip_id(uint16_t ip_id); - int get_l4_proto(uint8_t &proto); - int test(); + virtual ~CFlowStatParser() {}; + virtual void reset(); + virtual int parse(uint8_t *pkt, uint16_t len); + virtual bool is_stat_supported() {return m_stat_supported == true;}; + virtual int get_ip_id(uint16_t &ip_id); + virtual int set_ip_id(uint16_t ip_id); + virtual int get_l4_proto(uint8_t &proto); + virtual int test(); - private: + protected: IPHeader *m_ipv4; - bool m_fdir_supported; + bool m_stat_supported; uint8_t m_l4_proto; }; + +class C82599Parser : public CFlowStatParser { + public: + ~C82599Parser() {}; + int parse(uint8_t *pkt, uint16_t len); +}; + +#endif |