LCOV - code coverage report
Current view: top level - bgp/extended-community - multicast_flags.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 2 2 100.0 %
Date: 2026-06-08 02:02:55 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2018 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #ifndef SRC_BGP_EXTENDED_COMMUNITY_MULTICAST_FLAGS_H_
       6             : #define SRC_BGP_EXTENDED_COMMUNITY_MULTICAST_FLAGS_H_
       7             : 
       8             : #include <boost/array.hpp>
       9             : 
      10             : #include <string>
      11             : 
      12             : #include "base/parse_object.h"
      13             : #include "bgp/extended-community/types.h"
      14             : 
      15             : class MulticastFlags {
      16             : public:
      17             :     static const int kSize = 8;
      18             :     typedef boost::array<uint8_t, kSize> bytes_type;
      19             : 
      20             :     explicit MulticastFlags();
      21             :     explicit MulticastFlags(const bytes_type &data);
      22             : 
      23       20014 :     const bytes_type &GetExtCommunity() const {
      24       20014 :         return data_;
      25             :     }
      26             : 
      27             :     const uint64_t GetExtCommunityValue() const {
      28             :         return get_value(data_.begin(), 8);
      29             :     }
      30             : 
      31             :     std::string ToString();
      32             : 
      33             : private:
      34             :     bytes_type data_;
      35             : };
      36             : 
      37             : #endif  // SRC_BGP_EXTENDED_COMMUNITY_MULTICAST_FLAGS_H_

Generated by: LCOV version 1.14