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