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-11-09 02:10:49 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             :  * Copyright Contributors to the OpenSDN project
       4             :  */
       5             : #ifndef __AGENT_FLOW_EXPORT_REQUEST_H__
       6             : #define __AGENT_FLOW_EXPORT_REQUEST_H__
       7             : 
       8             : #include "pkt/flow_table.h"
       9             : #include "pkt/flow_entry.h"
      10             : #include "vrouter/flow_stats/flow_export_info.h"
      11             : 
      12             : ////////////////////////////////////////////////////////////////////////////
      13             : // Request to the Flow StatsCollector module
      14             : ////////////////////////////////////////////////////////////////////////////
      15             : class FlowExportReq {
      16             : public:
      17             :     enum Event {
      18             :         INVALID,
      19             :         ADD_FLOW,
      20             :         DELETE_FLOW,
      21             :         UPDATE_FLOW_STATS
      22             :     };
      23             : 
      24         230 :     FlowExportReq(Event event, const FlowExportInfo &info) :
      25         230 :         event_(event), info_(info), time_(0) {
      26         230 :     }
      27             : 
      28         144 :     FlowExportReq(Event event, const FlowExportInfo &info, uint64_t time,
      29         144 :                   const RevFlowDepParams &p) :
      30         144 :         event_(event), info_(info), time_(time), params_(p) {
      31         144 :     }
      32             : 
      33           0 :     FlowExportReq(Event event, const FlowExportInfo &info, uint32_t bytes,
      34             :                   uint32_t packets, uint32_t oflow_bytes,
      35           0 :                   const boost::uuids::uuid &u) :
      36           0 :                   event_(event), info_(info), bytes_(bytes), packets_(packets),
      37           0 :                   oflow_bytes_(oflow_bytes), uuid_(u) {
      38           0 :     }
      39             : 
      40         374 :     ~FlowExportReq() { }
      41             : 
      42         374 :     Event event() const { return event_; }
      43         604 :     FlowExportInfo info() const { return info_; }
      44         144 :     uint64_t time() const { return time_; }
      45           0 :     uint32_t bytes() const { return bytes_;}
      46           0 :     uint32_t packets() const { return packets_;}
      47           0 :     uint32_t oflow_bytes() const { return oflow_bytes_;}
      48             :     const RevFlowDepParams& params() const { return params_; }
      49           0 :     boost::uuids::uuid uuid() const { return uuid_; }
      50             : 
      51             : private:
      52             :     Event event_;
      53             :     FlowExportInfo info_;
      54             :     uint64_t time_;
      55             :     uint32_t bytes_;
      56             :     uint32_t packets_;
      57             :     uint32_t oflow_bytes_;
      58             :     RevFlowDepParams params_;
      59             :     boost::uuids::uuid uuid_;
      60             :     DISALLOW_COPY_AND_ASSIGN(FlowExportReq);
      61             : };
      62             : #endif //  __AGENT_FLOW_EXPORT_REQUEST_H__

Generated by: LCOV version 1.14