LCOV - code coverage report
Current view: top level - bgp/inet6 - inet6_table.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 8 8 100.0 %
Date: 2026-11-09 02:10:49 Functions: 5 5 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_INET6_INET6_TABLE_H_
       7             : #define SRC_BGP_INET6_INET6_TABLE_H_
       8             : 
       9             : #include <string>
      10             : 
      11             : #include "bgp/bgp_table.h"
      12             : #include "bgp/inet6/inet6_route.h"
      13             : #include "base/address.h"
      14             : 
      15             : class Inet6Prefix;
      16             : class BgpServer;
      17             : class PathResolver;
      18             : 
      19             : class Inet6Table : public BgpTable {
      20             : public:
      21             :     struct RequestKey : BgpTable::RequestKey {
      22      210111 :         RequestKey(const Inet6Prefix &prefix, const IPeer *ipeer)
      23      210111 :             : prefix(prefix), peer(ipeer) {
      24      210068 :         }
      25             :         Inet6Prefix prefix;
      26             :         const IPeer *peer;
      27       26988 :         virtual const IPeer *GetPeer() const {
      28       26988 :             return peer;
      29             :         }
      30             :     };
      31             : 
      32             :     Inet6Table(DB *db, const std::string &name);
      33             : 
      34             :     virtual std::unique_ptr<DBEntry> AllocEntry(const DBRequestKey *key) const;
      35             :     virtual std::unique_ptr<DBEntry> AllocEntryStr(const std::string &key) const;
      36             : 
      37     3034189 :     virtual Address::Family family() const { return Address::INET6; }
      38             : 
      39             :     virtual size_t Hash(const DBEntry *entry) const;
      40             :     virtual size_t Hash(const DBRequestKey *key) const;
      41             : 
      42             :     virtual bool Export(RibOut *ribout, Route *route, const RibPeerSet &peerset,
      43             :                         UpdateInfoSList &info_slist);
      44             :     virtual PathResolver *CreatePathResolver();
      45             : 
      46             :     static size_t HashFunction(const Inet6Prefix &addr);
      47             :     static DBTableBase *CreateTable(DB *db, const std::string &name);
      48             :     BgpRoute *RouteReplicate(BgpServer *server, BgpTable *src_tbl,
      49             :                              BgpRoute *src_rt, const BgpPath *path,
      50             :                              ExtCommunityPtr ptr);
      51             : 
      52      213898 :     virtual bool IsRoutingPolicySupported() const { return true; }
      53      436362 :     virtual bool IsRouteAggregationSupported() const { return true; }
      54             : private:
      55             :     virtual BgpRoute *TableFind(DBTablePartition *partition,
      56             :                                 const DBRequestKey *rkey);
      57             : 
      58             :     DISALLOW_COPY_AND_ASSIGN(Inet6Table);
      59             : };
      60             : 
      61             : #endif  // SRC_BGP_INET6_INET6_TABLE_H_

Generated by: LCOV version 1.14