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

Generated by: LCOV version 1.14