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-11-09 02:10:49 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             :  * Copyright Contributors to the OpenSDN project
       4             :  */
       5             : 
       6             : #ifndef SRC_BGP_INET6VPN_INET6VPN_TABLE_H_
       7             : #define SRC_BGP_INET6VPN_INET6VPN_TABLE_H_
       8             : 
       9             : #include <string>
      10             : 
      11             : #include "bgp/bgp_attr.h"
      12             : #include "bgp/bgp_table.h"
      13             : #include "bgp/inet6vpn/inet6vpn_route.h"
      14             : 
      15             : class BgpServer;
      16             : class BgpRoute;
      17             : 
      18             : class Inet6VpnTable : public BgpTable {
      19             : public:
      20             :     struct RequestKey : BgpTable::RequestKey {
      21      124174 :         RequestKey(const Inet6VpnPrefix &prefix, const IPeer *ipeer)
      22      124174 :             : prefix(prefix), peer(ipeer) {
      23      124163 :         }
      24             :         Inet6VpnPrefix prefix;
      25             :         const IPeer *peer;
      26       63149 :         virtual const IPeer *GetPeer() const { return peer; }
      27             :     };
      28             : 
      29             :     Inet6VpnTable(DB *db, const std::string &name);
      30             : 
      31             :     virtual std::unique_ptr<DBEntry> AllocEntry(const DBRequestKey *key) const;
      32             :     virtual std::unique_ptr<DBEntry> AllocEntryStr(const std::string &key) const;
      33             : 
      34     1053684 :     virtual Address::Family family() const { return Address::INET6VPN; }
      35     1049147 :     virtual bool IsVpnTable() const { return true; }
      36             : 
      37             :     virtual size_t Hash(const DBEntry *entry) const;
      38             :     virtual size_t Hash(const DBRequestKey *key) const;
      39             : 
      40             :     virtual BgpRoute *RouteReplicate(BgpServer *server, BgpTable *src_table,
      41             :                                      BgpRoute *src_rt, const BgpPath *path,
      42             :                                      ExtCommunityPtr ptr);
      43             : 
      44             :     virtual bool Export(RibOut *ribout, Route *route, const RibPeerSet &peerset,
      45             :                         UpdateInfoSList &info_slist);
      46             :     static DBTableBase *CreateTable(DB *db, const std::string &name);
      47             : 
      48             : private:
      49             :     virtual BgpRoute *TableFind(DBTablePartition *rtp,
      50             :                                 const DBRequestKey *prefix);
      51             : 
      52             :     DISALLOW_COPY_AND_ASSIGN(Inet6VpnTable);
      53             : };
      54             : 
      55             : #endif  // SRC_BGP_INET6VPN_INET6VPN_TABLE_H_

Generated by: LCOV version 1.14