LCOV - code coverage report
Current view: top level - vnsw/agent/mac_learning - mac_ip_learning_key.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 2 8 25.0 %
Date: 2026-08-03 02:19:58 Functions: 1 3 33.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2020 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #ifndef SRC_VNSW_AGENT_MAC_IP_LEARNING_MAC_LEARNING_KEY_H_
       6             : #define SRC_VNSW_AGENT_MAC_IP_LEARNING_MAC_LEARNING_KEY_H_
       7             : 
       8             : struct  MacIpLearningKey {
       9         101 :     MacIpLearningKey(uint32_t vrf_id, const IpAddress ip):
      10         101 :         vrf_id_(vrf_id), ip_addr_(ip) {}
      11             :     const uint32_t vrf_id_;
      12             :     const IpAddress ip_addr_;
      13             : 
      14           0 :     bool IsLess(const MacIpLearningKey &rhs) const {
      15           0 :         if (vrf_id_ != rhs.vrf_id_) {
      16           0 :             return vrf_id_ < rhs.vrf_id_;
      17             :         }
      18             : 
      19           0 :         return ip_addr_ < rhs.ip_addr_;
      20             :     }
      21             : };
      22             : 
      23             : struct MacIpLearningKeyCmp {
      24           0 :     bool operator()(const MacIpLearningKey &lhs, const MacIpLearningKey &rhs) const {
      25           0 :         return lhs.IsLess(rhs);
      26             :     }
      27             : };
      28             : #endif

Generated by: LCOV version 1.14