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-06-04 02:06:09 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             :  */
       4             : 
       5             : #ifndef SRC_BGP_BGP_PEER_KEY_H_
       6             : #define SRC_BGP_BGP_PEER_KEY_H_
       7             : 
       8             : #include <boost/asio/ip/tcp.hpp>
       9             : #include <boost/uuid/uuid.hpp>
      10             : 
      11             : class BgpNeighborConfig;
      12             : 
      13             : struct BgpPeerKey {
      14             :     BgpPeerKey();
      15             :     explicit BgpPeerKey(const BgpNeighborConfig *config);
      16             : 
      17             :     bool operator<(const BgpPeerKey &rhs) const;
      18             :     bool operator>(const BgpPeerKey &rhs) const;
      19             :     bool operator==(const BgpPeerKey &rhs) const;
      20             :     bool operator!=(const BgpPeerKey &rhs) const;
      21             : 
      22        3354 :     uint32_t address() const { return endpoint.address().to_v4().to_ulong(); }
      23             : 
      24             :     boost::asio::ip::tcp::endpoint endpoint;
      25             :     boost::uuids::uuid uuid;
      26             : };
      27             : 
      28             : 
      29             : #endif  // SRC_BGP_BGP_PEER_KEY_H_

Generated by: LCOV version 1.14