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-11-09 02:10:49 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             :  * Copyright Contributors to the OpenSDN project
       4             :  */
       5             : 
       6             : #ifndef SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_KEY_H_
       7             : #define SRC_VNSW_AGENT_MAC_LEARNING_MAC_LEARNING_KEY_H_
       8             : 
       9             : struct  MacLearningKey {
      10        6892 :     MacLearningKey(uint32_t vrf_id, const MacAddress &mac):
      11        6892 :         vrf_id_(vrf_id), mac_(mac) {}
      12             :     const uint32_t vrf_id_;
      13             :     const MacAddress mac_;
      14             : 
      15           0 :     bool IsLess(const MacLearningKey &rhs) const {
      16           0 :         if (vrf_id_ != rhs.vrf_id_) {
      17           0 :             return vrf_id_ < rhs.vrf_id_;
      18             :         }
      19             : 
      20           0 :         return mac_ < rhs.mac_;
      21             :     }
      22             : };
      23             : 
      24             : struct MacLearningKeyCmp {
      25           0 :     bool operator()(const MacLearningKey &lhs, const MacLearningKey &rhs) const {
      26           0 :         return lhs.IsLess(rhs);
      27             :     }
      28             : };
      29             : #endif

Generated by: LCOV version 1.14