LCOV - code coverage report
Current view: top level - bgp - bgp_peer_key.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 1 1 100.0 %
Date: 2026-11-09 02:10:49 Functions: 1 1 100.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 SRC_BGP_BGP_PEER_KEY_H_
       7             : #define SRC_BGP_BGP_PEER_KEY_H_
       8             : 
       9             : #include <boost/asio/ip/tcp.hpp>
      10             : #include <boost/uuid/uuid.hpp>
      11             : 
      12             : class BgpNeighborConfig;
      13             : 
      14             : struct BgpPeerKey {
      15             :     BgpPeerKey();
      16             :     explicit BgpPeerKey(const BgpNeighborConfig *config);
      17             : 
      18             :     bool operator<(const BgpPeerKey &rhs) const;
      19             :     bool operator>(const BgpPeerKey &rhs) const;
      20             :     bool operator==(const BgpPeerKey &rhs) const;
      21             :     bool operator!=(const BgpPeerKey &rhs) const;
      22             : 
      23        3382 :     uint32_t address() const { return endpoint.address().to_v4().to_ulong(); }
      24             : 
      25             :     boost::asio::ip::tcp::endpoint endpoint;
      26             :     boost::uuids::uuid uuid;
      27             : };
      28             : 
      29             : 
      30             : #endif  // SRC_BGP_BGP_PEER_KEY_H_

Generated by: LCOV version 1.14