LCOV - code coverage report
Current view: top level - vnsw/agent/vrouter/flow_stats - flow_export_request.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 11 20 55.0 %
Date: 2026-08-03 02:19:58 Functions: 6 11 54.5 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : #ifndef __AGENT_FLOW_EXPORT_REQUEST_H__
       5             : #define __AGENT_FLOW_EXPORT_REQUEST_H__
       6             : 
       7             : #include "pkt/flow_table.h"
       8             : #include "pkt/flow_entry.h"
       9             : #include "vrouter/flow_stats/flow_export_info.h"
      10             : 
      11             : ////////////////////////////////////////////////////////////////////////////
      12             : // Request to the Flow StatsCollector module
      13             : ////////////////////////////////////////////////////////////////////////////
      14             : class FlowExportReq {
      15             : public:
      16             :     enum Event {
      17             :         INVALID,
      18             :         ADD_FLOW,
      19             :         DELETE_FLOW,
      20             :         UPDATE_FLOW_STATS
      21             :     };
      22             : 
      23         100 :     FlowExportReq(Event event, const FlowExportInfo &info) :
      24         100 :         event_(event), info_(info), time_(0) {
      25         100 :     }
      26             : 
      27          44 :     FlowExportReq(Event event, const FlowExportInfo &info, uint64_t time,
      28          44 :                   const RevFlowDepParams &p) :
      29          44 :         event_(event), info_(info), time_(time), params_(p) {
      30          44 :     }
      31             : 
      32           0 :     FlowExportReq(Event event, const FlowExportInfo &info, uint32_t bytes,
      33             :                   uint32_t packets, uint32_t oflow_bytes,
      34           0 :                   const boost::uuids::uuid &u) :
      35           0 :                   event_(event), info_(info), bytes_(bytes), packets_(packets),
      36           0 :                   oflow_bytes_(oflow_bytes), uuid_(u) {
      37           0 :     }
      38             : 
      39         144 :     ~FlowExportReq() { }
      40             : 
      41         144 :     Event event() const { return event_; }
      42         244 :     FlowExportInfo info() const { return info_; }
      43          44 :     uint64_t time() const { return time_; }
      44           0 :     uint32_t bytes() const { return bytes_;}
      45           0 :     uint32_t packets() const { return packets_;}
      46           0 :     uint32_t oflow_bytes() const { return oflow_bytes_;}
      47             :     const RevFlowDepParams& params() const { return params_; }
      48           0 :     boost::uuids::uuid uuid() const { return uuid_; }
      49             : 
      50             : private:
      51             :     Event event_;
      52             :     FlowExportInfo info_;
      53             :     uint64_t time_;
      54             :     uint32_t bytes_;
      55             :     uint32_t packets_;
      56             :     uint32_t oflow_bytes_;
      57             :     RevFlowDepParams params_;
      58             :     boost::uuids::uuid uuid_;
      59             :     DISALLOW_COPY_AND_ASSIGN(FlowExportReq);
      60             : };
      61             : #endif //  __AGENT_FLOW_EXPORT_REQUEST_H__

Generated by: LCOV version 1.14