LCOV - code coverage report
Current view: top level - vnsw/agent/vrouter/ksync - mirror_ksync.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 0 4 0.0 %
Date: 2026-11-09 02:10:49 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
       3             :  * Copyright Contributors to the OpenSDN project
       4             :  */
       5             : 
       6             : #ifndef vnsw_agent_mirror_ksync_h
       7             : #define vnsw_agent_mirror_ksync_h
       8             : 
       9             : #include <db/db_entry.h>
      10             : #include <db/db_table.h>
      11             : #include <db/db_table_partition.h>
      12             : #include <ksync/ksync_entry.h>
      13             : #include <ksync/ksync_object.h>
      14             : #include <ksync/ksync_netlink.h>
      15             : #include <vrouter/ksync/nexthop_ksync.h>
      16             : #include "oper/mirror_table.h"
      17             : 
      18             : class MirrorKSyncObject;
      19             : 
      20             : class MirrorKSyncEntry : public KSyncNetlinkDBEntry {
      21             : public:
      22             :     MirrorKSyncEntry(MirrorKSyncObject *obj, const MirrorEntry *);
      23             :     MirrorKSyncEntry(MirrorKSyncObject *obj, const MirrorKSyncEntry *entry,
      24             :                      uint32_t index);
      25             :     MirrorKSyncEntry(MirrorKSyncObject *obj, const uint32_t vrf_id,
      26             :                      IpAddress dip, uint16_t dport);
      27             :     MirrorKSyncEntry(MirrorKSyncObject *obj, std::string &analyzer_name);
      28             :     virtual ~MirrorKSyncEntry();
      29             : 
      30           0 :     NHKSyncEntry *nh() const {
      31           0 :         return static_cast<NHKSyncEntry *>(nh_.get());
      32             :     }
      33             :     KSyncDBObject *GetObject() const;
      34             :     virtual bool IsLess(const KSyncEntry &rhs) const;
      35             :     virtual std::string ToString() const;
      36             :     virtual KSyncEntry *UnresolvedReference();
      37             :     virtual bool Sync(DBEntry *e);
      38             :     virtual int AddMsg(char *buf, int buf_len);
      39             :     virtual int ChangeMsg(char *buf, int buf_len);
      40             :     virtual int DeleteMsg(char *buf, int buf_len);
      41           0 :     uint32_t mirror_index() {return mirror_index_;}
      42             : private:
      43             :     int Encode(sandesh_op::type op, char *buf, int buf_len);
      44             :     MirrorKSyncObject *ksync_obj_;
      45             :     uint32_t vrf_id_;
      46             :     IpAddress sip_;
      47             :     uint16_t   sport_;
      48             :     IpAddress dip_;
      49             :     uint16_t   dport_;
      50             :     KSyncEntryPtr nh_;
      51             :     std::string analyzer_name_;
      52             :     uint8_t mirror_flag_;
      53             :     uint32_t vni_;
      54             :     bool nic_assisted_mirroring_;
      55             :     uint16_t nic_assisted_mirroring_vlan_;
      56             :     uint32_t mirror_index_;
      57             :     DISALLOW_COPY_AND_ASSIGN(MirrorKSyncEntry);
      58             : };
      59             : 
      60             : class MirrorKSyncObject : public KSyncDBObject {
      61             : public:
      62             :     static const int kMirrorIndexCount = 1000;
      63             :     MirrorKSyncObject(KSync *ksync);
      64             :     virtual ~MirrorKSyncObject();
      65             : 
      66           0 :     KSync *ksync() const { return ksync_; }
      67             : 
      68             :     void RegisterDBClients();
      69             :     virtual KSyncEntry *Alloc(const KSyncEntry *entry, uint32_t index);
      70             :     virtual KSyncEntry *DBToKSyncEntry(const DBEntry *e);
      71             :     uint32_t GetIdx(std::string analyzer_name);
      72             : private:
      73             :     KSync *ksync_;
      74             :     DISALLOW_COPY_AND_ASSIGN(MirrorKSyncObject);
      75             : };
      76             : 
      77             : #endif // vnsw_agent_mirror_ksync_h

Generated by: LCOV version 1.14