OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
multicast_flags.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 Juniper Networks, Inc. All rights reserved.
3  */
4 
6 
7 #include <algorithm>
8 #include <stdio.h>
9 
10 
11 using std::copy;
12 #define IGMP_PROXY_FLAG 1
13 
18  put_value(&data_[4], 4, 0);
19 }
20 
22  copy(data.begin(), data.end(), data_.begin());
23 }
24 
25 std::string MulticastFlags::ToString() {
26  uint16_t flag = get_value(&data_[2], 2);
27  char temp[50];
28  snprintf(temp, sizeof(temp), "evpn-mcast-flags:%u", flag);
29  return std::string(temp);
30 }
static uint64_t get_value(const uint8_t *data, int size)
Definition: parse_object.h:39
boost::array< uint8_t, kSize > bytes_type
std::string ToString()
bytes_type data_
#define IGMP_PROXY_FLAG
static void put_value(uint8_t *data, int size, uint64_t value)
Definition: parse_object.h:55