OpenSDN source code
|
#include <metadata_ip.h>
Public Types | |
enum | MetaDataIpType { LINKLOCAL = 0, HEALTH_CHECK, INVALID } |
Public Member Functions | |
MetaDataIp (MetaDataIpAllocator *allocator, VmInterface *intf, MetaDataIpType type, bool insert_metadata_ip, bool ipv4=true) | |
MetaDataIp (MetaDataIpAllocator *allocator, VmInterface *intf, uint16_t index, bool ipv4=true) | |
~MetaDataIp () | |
IpAddress | GetLinkLocalIp () const |
Ip4Address | GetLinkLocalIp4 () const |
Ip6Address | GetLinkLocalIp6 () const |
IpAddress | service_ip () const |
IpAddress | destination_ip () const |
void | set_destination_ip (const IpAddress &dst_ip) |
void | set_active (bool active) |
void | UpdateInterfaceCb () |
const Interface * | GetInterface () const |
template<> | |
Ip4Address | IndexToIpAddress (uint32_t idx) |
template<> | |
Ip6Address | IndexToIpAddress (uint32_t idx) |
template<> | |
uint32_t | IpAddressToIndex (const Ip4Address &ip) |
template<> | |
uint32_t | IpAddressToIndex (const Ip6Address &ip) |
template<> | |
Ip4Address | IndexToIpAddress (uint32_t idx) |
template<> | |
Ip6Address | IndexToIpAddress (uint32_t idx) |
template<> | |
uint32_t | IpAddressToIndex (const Ip4Address &ip) |
template<> | |
uint32_t | IpAddressToIndex (const Ip6Address &ip) |
Static Public Member Functions | |
template<class IpT > | |
static IpT | IndexToIpAddress (uint32_t idx) |
template<class IpT > | |
static uint32_t | IpAddressToIndex (const IpT &ip) |
Static Public Attributes | |
static const IpAddress | kDefaultIp |
Private Member Functions | |
void | UpdateRoute () |
DISALLOW_COPY_AND_ASSIGN (MetaDataIp) | |
Private Attributes | |
MetaDataIpAllocator * | allocator_ |
uint16_t | index_ |
VmInterface * | intf_ |
uint32_t | intf_label_ |
IpAddress | service_ip_ |
IpAddress | destination_ip_ |
bool | active_ |
MetaDataIpType | type_ |
bool | insert_metadata_ip_ |
bool | ipv4_ |
Friends | |
class | MetaDataIpAllocator |
Definition at line 29 of file metadata_ip.h.
Enumerator | |
---|---|
LINKLOCAL | |
HEALTH_CHECK | |
INVALID |
Definition at line 33 of file metadata_ip.h.
MetaDataIp::MetaDataIp | ( | MetaDataIpAllocator * | allocator, |
VmInterface * | intf, | ||
MetaDataIpType | type, | ||
bool | insert_metadata_ip, | ||
bool | ipv4 = true |
||
) |
MetaDataIp::MetaDataIp | ( | MetaDataIpAllocator * | allocator, |
VmInterface * | intf, | ||
uint16_t | index, | ||
bool | ipv4 = true |
||
) |
MetaDataIp::~MetaDataIp | ( | ) |
IpAddress MetaDataIp::destination_ip | ( | ) | const |
|
private |
const Interface * MetaDataIp::GetInterface | ( | ) | const |
Definition at line 145 of file metadata_ip.cc.
IpAddress MetaDataIp::GetLinkLocalIp | ( | ) | const |
Ip4Address MetaDataIp::GetLinkLocalIp4 | ( | ) | const |
Definition at line 86 of file metadata_ip.cc.
Ip6Address MetaDataIp::GetLinkLocalIp6 | ( | ) | const |
Definition at line 90 of file metadata_ip.cc.
|
inlinestatic |
Definition at line 46 of file metadata_ip.h.
Ip4Address MetaDataIp::IndexToIpAddress | ( | uint32_t | idx | ) |
Definition at line 49 of file metadata_ip.cc.
Ip6Address MetaDataIp::IndexToIpAddress | ( | uint32_t | idx | ) |
Definition at line 56 of file metadata_ip.cc.
Ip4Address MetaDataIp::IndexToIpAddress | ( | uint32_t | idx | ) |
Ip6Address MetaDataIp::IndexToIpAddress | ( | uint32_t | idx | ) |
|
inlinestatic |
Definition at line 49 of file metadata_ip.h.
uint32_t MetaDataIp::IpAddressToIndex | ( | const Ip4Address & | ip | ) |
Definition at line 65 of file metadata_ip.cc.
uint32_t MetaDataIp::IpAddressToIndex | ( | const Ip6Address & | ip | ) |
Definition at line 74 of file metadata_ip.cc.
uint32_t MetaDataIp::IpAddressToIndex | ( | const Ip4Address & | ip | ) |
uint32_t MetaDataIp::IpAddressToIndex | ( | const Ip6Address & | ip | ) |
IpAddress MetaDataIp::service_ip | ( | ) | const |
void MetaDataIp::set_active | ( | bool | active | ) |
void MetaDataIp::set_destination_ip | ( | const IpAddress & | dst_ip | ) |
Definition at line 126 of file metadata_ip.cc.
void MetaDataIp::UpdateInterfaceCb | ( | ) |
|
private |
|
friend |
Definition at line 71 of file metadata_ip.h.
|
private |
Definition at line 83 of file metadata_ip.h.
|
private |
Definition at line 75 of file metadata_ip.h.
|
private |
Definition at line 82 of file metadata_ip.h.
|
private |
Definition at line 77 of file metadata_ip.h.
|
private |
Definition at line 85 of file metadata_ip.h.
|
private |
Definition at line 79 of file metadata_ip.h.
|
private |
Definition at line 80 of file metadata_ip.h.
|
private |
Definition at line 86 of file metadata_ip.h.
|
static |
Definition at line 31 of file metadata_ip.h.
|
private |
Definition at line 81 of file metadata_ip.h.
|
private |
Definition at line 84 of file metadata_ip.h.