OpenSDN source code
es_import.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
7 
8 #include <algorithm>
9 #include <string>
10 
11 #include "net/mac_address.h"
12 
13 using std::copy;
14 using std::string;
15 
17  copy(data.begin(), data.end(), data_.begin());
18 }
19 
23  return MacAddress();
24  uint8_t mac_bytes[6];
25  copy(data_.begin() + 2, data_.end(), mac_bytes);
26  return MacAddress(mac_bytes);
27 }
28 
29 string EsImport::ToString() const {
30  string temp("esimport:");
31  return temp + mac_address().ToString();
32 }
MacAddress mac_address() const
Definition: es_import.cc:20
std::string ToString() const
Definition: es_import.cc:29
EsImport(const bytes_type &data)
Definition: es_import.cc:16
boost::array< uint8_t, kSize > bytes_type
Definition: es_import.h:21
bytes_type data_
Definition: es_import.h:29
std::string ToString() const
Definition: mac_address.cc:54