LCOV - code coverage report
Current view: top level - bgp/l3vpn - inetvpn_table.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 6 6 100.0 %
Date: 2026-06-22 02:21:21 Functions: 4 4 100.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 SRC_BGP_L3VPN_INETVPN_TABLE_H_
       6             : #define SRC_BGP_L3VPN_INETVPN_TABLE_H_
       7             : 
       8             : #include <string>
       9             : 
      10             : #include "bgp/bgp_attr.h"
      11             : #include "bgp/bgp_table.h"
      12             : #include "bgp/l3vpn/inetvpn_address.h"
      13             : #include "bgp/l3vpn/inetvpn_route.h"
      14             : 
      15             : class BgpServer;
      16             : class BgpRoute;
      17             : 
      18             : class InetVpnTable : public BgpTable {
      19             : public:
      20             :     struct RequestKey : BgpTable::RequestKey {
      21      167686 :         RequestKey(const InetVpnPrefix &prefix, const IPeer *ipeer)
      22      167686 :             : prefix(prefix), peer(ipeer) {
      23      167677 :         }
      24             :         InetVpnPrefix prefix;
      25             :         const IPeer *peer;
      26       78648 :         virtual const IPeer *GetPeer() const { return peer; }
      27             :     };
      28             : 
      29             :     InetVpnTable(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      653280 :     virtual Address::Family family() const { return Address::INETVPN; }
      35     1081013 :     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,
      45             :                         const RibPeerSet &peerset,
      46             :                         UpdateInfoSList &info_slist);
      47             :     static DBTableBase *CreateTable(DB *db, const std::string &name);
      48             :     virtual BgpRoute *TableFind(DBTablePartition *rtp,
      49             :                                 const DBRequestKey *prefix);
      50             : 
      51             : private:
      52             : 
      53             :     DISALLOW_COPY_AND_ASSIGN(InetVpnTable);
      54             : };
      55             : 
      56             : #endif  // SRC_BGP_L3VPN_INETVPN_TABLE_H_

Generated by: LCOV version 1.14