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-11-09 02:10:49 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             :  * Copyright Contributors to the OpenSDN project
       4             :  */
       5             : 
       6             : #ifndef SRC_BGP_EXTENDED_COMMUNITY_MULTICAST_FLAGS_H_
       7             : #define SRC_BGP_EXTENDED_COMMUNITY_MULTICAST_FLAGS_H_
       8             : 
       9             : #include <boost/array.hpp>
      10             : 
      11             : #include <string>
      12             : 
      13             : #include "base/parse_object.h"
      14             : #include "bgp/extended-community/types.h"
      15             : 
      16             : class MulticastFlags {
      17             : public:
      18             :     static const int kSize = 8;
      19             :     typedef boost::array<uint8_t, kSize> bytes_type;
      20             : 
      21             :     explicit MulticastFlags();
      22             :     explicit MulticastFlags(const bytes_type &data);
      23             : 
      24       19890 :     const bytes_type &GetExtCommunity() const {
      25       19890 :         return data_;
      26             :     }
      27             : 
      28             :     const uint64_t GetExtCommunityValue() const {
      29             :         return get_value(data_.begin(), 8);
      30             :     }
      31             : 
      32             :     std::string ToString();
      33             : 
      34             : private:
      35             :     bytes_type data_;
      36             : };
      37             : 
      38             : #endif  // SRC_BGP_EXTENDED_COMMUNITY_MULTICAST_FLAGS_H_

Generated by: LCOV version 1.14