LCOV - code coverage report
Current view: top level - vnsw/agent/mac_learning - mac_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) 2017 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #ifndef SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_KEY_H_
       6             : #define SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_KEY_H_
       7             : 
       8             : struct  MacLearningKey {
       9        4491 :     MacLearningKey(uint32_t vrf_id, const MacAddress &mac):
      10        4491 :         vrf_id_(vrf_id), mac_(mac) {}
      11             :     const uint32_t vrf_id_;
      12             :     const MacAddress mac_;
      13             : 
      14           0 :     bool IsLess(const MacLearningKey &rhs) const {
      15           0 :         if (vrf_id_ != rhs.vrf_id_) {
      16           0 :             return vrf_id_ < rhs.vrf_id_;
      17             :         }
      18             : 
      19           0 :         return mac_ < rhs.mac_;
      20             :     }
      21             : };
      22             : 
      23             : struct MacLearningKeyCmp {
      24           0 :     bool operator()(const MacLearningKey &lhs, const MacLearningKey &rhs) const {
      25           0 :         return lhs.IsLess(rhs);
      26             :     }
      27             : };
      28             : #endif

Generated by: LCOV version 1.14