LCOV - code coverage report
Current view: top level - bgp/inet6vpn - inet6vpn_table.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 6 6 100.0 %
Date: 2026-06-11 01:56:02 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #ifndef SRC_BGP_INET6VPN_INET6VPN_TABLE_H_
       6             : #define SRC_BGP_INET6VPN_INET6VPN_TABLE_H_
       7             : 
       8             : #include <string>
       9             : 
      10             : #include "bgp/bgp_attr.h"
      11             : #include "bgp/bgp_table.h"
      12             : #include "bgp/inet6vpn/inet6vpn_route.h"
      13             : 
      14             : class BgpServer;
      15             : class BgpRoute;
      16             : 
      17             : class Inet6VpnTable : public BgpTable {
      18             : public:
      19             :     struct RequestKey : BgpTable::RequestKey {
      20      122818 :         RequestKey(const Inet6VpnPrefix &prefix, const IPeer *ipeer)
      21      122818 :             : prefix(prefix), peer(ipeer) {
      22      122811 :         }
      23             :         Inet6VpnPrefix prefix;
      24             :         const IPeer *peer;
      25       63002 :         virtual const IPeer *GetPeer() const { return peer; }
      26             :     };
      27             : 
      28             :     Inet6VpnTable(DB *db, const std::string &name);
      29             : 
      30             :     virtual std::unique_ptr<DBEntry> AllocEntry(const DBRequestKey *key) const;
      31             :     virtual std::unique_ptr<DBEntry> AllocEntryStr(const std::string &key) const;
      32             : 
      33     1032723 :     virtual Address::Family family() const { return Address::INET6VPN; }
      34     1037999 :     virtual bool IsVpnTable() const { return true; }
      35             : 
      36             :     virtual size_t Hash(const DBEntry *entry) const;
      37             :     virtual size_t Hash(const DBRequestKey *key) const;
      38             : 
      39             :     virtual BgpRoute *RouteReplicate(BgpServer *server, BgpTable *src_table,
      40             :                                      BgpRoute *src_rt, const BgpPath *path,
      41             :                                      ExtCommunityPtr ptr);
      42             : 
      43             :     virtual bool Export(RibOut *ribout, Route *route, const RibPeerSet &peerset,
      44             :                         UpdateInfoSList &info_slist);
      45             :     static DBTableBase *CreateTable(DB *db, const std::string &name);
      46             : 
      47             : private:
      48             :     virtual BgpRoute *TableFind(DBTablePartition *rtp,
      49             :                                 const DBRequestKey *prefix);
      50             : 
      51             :     DISALLOW_COPY_AND_ASSIGN(Inet6VpnTable);
      52             : };
      53             : 
      54             : #endif  // SRC_BGP_INET6VPN_INET6VPN_TABLE_H_

Generated by: LCOV version 1.14