LCOV - code coverage report
Current view: top level - vnsw/agent/vrouter/ksync - forwarding_class_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_FORWARDING_CLASS_KSYNC_H__
       7             : #define __VNSW_AGENT_FORWARDING_CLASS_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 "oper/qos_queue.h"
      16             : #include "oper/forwarding_class.h"
      17             : 
      18             : class KSync;
      19             : class ForwardingClassKSyncObject;
      20             : 
      21             : class ForwardingClassKSyncEntry : public KSyncNetlinkDBEntry {
      22             : public:
      23             :     ForwardingClassKSyncEntry(ForwardingClassKSyncObject *obj,
      24             :                               const ForwardingClassKSyncEntry *entry);
      25             :     ForwardingClassKSyncEntry(ForwardingClassKSyncObject *obj,
      26             :                               const ForwardingClass *fc);
      27             :     ForwardingClassKSyncEntry(ForwardingClassKSyncObject *obj,
      28             :                               uint32_t i);
      29             :     virtual ~ForwardingClassKSyncEntry();
      30             : 
      31             :     KSyncDBObject *GetObject() const;
      32             :     virtual bool IsLess(const KSyncEntry &rhs) const;
      33             :     virtual std::string ToString() const;
      34             :     virtual KSyncEntry *UnresolvedReference();
      35             :     virtual bool Sync(DBEntry *e);
      36             :     virtual int AddMsg(char *buf, int buf_len);
      37             :     virtual int ChangeMsg(char *buf, int buf_len);
      38             :     virtual int DeleteMsg(char *buf, int buf_len);
      39           0 :     uint32_t id() const { return id_;}
      40             :     uint32_t dscp() const { return dscp_;}
      41             :     uint32_t vlan_priority() const { return vlan_priority_;}
      42             :     uint32_t mpls_exp() const { return mpls_exp_;}
      43           0 :     KSyncEntry* qos_queue_ksync() const {
      44           0 :         return qos_queue_ksync_.get();
      45             :     }
      46             : private:
      47             :     int Encode(sandesh_op::type op, char *buf, int buf_len);
      48             :     KSyncDBObject *ksync_obj_;
      49             :     uint32_t id_;
      50             :     uint32_t dscp_;
      51             :     uint32_t vlan_priority_;
      52             :     uint32_t mpls_exp_;
      53             :     KSyncEntryPtr qos_queue_ksync_;
      54             :     uint16_t nic_queue_id_;
      55             :     DISALLOW_COPY_AND_ASSIGN(ForwardingClassKSyncEntry);
      56             : };
      57             : 
      58             : class ForwardingClassKSyncObject : public KSyncDBObject {
      59             : public:
      60             :     ForwardingClassKSyncObject(KSync *ksync);
      61             :     virtual ~ForwardingClassKSyncObject();
      62           0 :     KSync *ksync() const { return ksync_; }
      63             :     virtual KSyncEntry *Alloc(const KSyncEntry *entry, uint32_t index);
      64             :     virtual KSyncEntry *DBToKSyncEntry(const DBEntry *e);
      65             :     void RegisterDBClients();
      66             :     virtual KSyncDBObject::DBFilterResp DBEntryFilter(const DBEntry *entry,
      67             :                                                       const KSyncDBEntry*ksync);
      68             : private:
      69             :     KSync *ksync_;
      70             :     DISALLOW_COPY_AND_ASSIGN(ForwardingClassKSyncObject);
      71             : };
      72             : #endif

Generated by: LCOV version 1.14