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