libfluid
The ONF OpenFlow driver
GitHub:
libfluid
|
libfluid_base
|
libfluid_msg
Mailing list
Home
Documentation
API reference
libfluid_msg
fluid
util
ethaddr.hh
1
#ifndef __MACADDRESS_H__
2
#define __MACADDRESS_H__
3
4
#include <stdint.h>
5
#include <string.h>
6
#include <net/if.h>
7
8
#include <sstream>
9
#include <iomanip>
10
#include <string>
11
12
namespace
fluid_msg{
13
14
class
EthAddress
{
15
public
:
16
EthAddress
();
17
EthAddress
(
const
char
* address);
18
EthAddress
(
const
std::string &address);
19
EthAddress
(
const
EthAddress
&other);
20
EthAddress
(
const
uint8_t* data);
21
22
EthAddress
& operator=(
const
EthAddress
&other);
23
bool
operator==(
const
EthAddress
&other)
const
;
24
std::string to_string()
const
;
25
void
set_data(uint8_t* array);
26
uint8_t* get_data(){
return
this->data;}
27
static
uint8_t* data_from_string(
const
std::string &address);
28
29
private
:
30
uint8_t data[6];
31
// void data_from_string(const std::string &address);
32
};
33
}
34
#endif
/* __MACADDRESS_H__ */
35
36
37