Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
cuttlefish::EthernetIface Class Reference

#include <resource.h>

Inheritance diagram for cuttlefish::EthernetIface:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::EthernetIface:
Collaboration graph
[legend]

Public Member Functions

 EthernetIface ()=default
 
 ~EthernetIface ()=default
 
 EthernetIface (const std::string &name, uid_t uid, uint16_t iface_id, uint32_t global_id, std::string bridge_name, std::string ipaddr)
 
bool ReleaseResource () override
 
bool AcquireResource () override
 
uint16_t GetIfaceId ()
 
std::string GetBridgeName ()
 
std::string GetIpAddr ()
 
void SetHasIpv4 (bool ipv4)
 
void SetHasIpv6 (bool ipv6)
 
void SetUseEbtablesLegacy (bool use_legacy)
 
bool GetHasIpv4 ()
 
bool GetHasIpv6 ()
 
bool GetUseEbtablesLegacy ()
 
- Public Member Functions inherited from cuttlefish::StaticResource
 StaticResource ()=default
 
 StaticResource (const std::string &name, uid_t uid, ResourceType ty, uint32_t global_id)
 
virtual ~StaticResource ()=default
 
virtual bool ReleaseResource ()=0
 
virtual bool AcquireResource ()=0
 
std::string GetName ()
 
uid_t GetUid ()
 
ResourceType GetResourceType ()
 
uint32_t GetGlobalID ()
 

Private Attributes

uint16_t iface_id_
 
std::string bridge_name_
 
std::string ipaddr_
 
bool has_ipv4_ = true
 
bool has_ipv6_ = true
 
bool use_ebtables_legacy_ = false
 

Static Private Attributes

static constexpr char kNetmask [] = "/24"
 

Constructor & Destructor Documentation

◆ EthernetIface() [1/2]

cuttlefish::EthernetIface::EthernetIface ( )
default

◆ ~EthernetIface()

cuttlefish::EthernetIface::~EthernetIface ( )
default

◆ EthernetIface() [2/2]

cuttlefish::EthernetIface::EthernetIface ( const std::string &  name,
uid_t  uid,
uint16_t  iface_id,
uint32_t  global_id,
std::string  bridge_name,
std::string  ipaddr 
)
inline

Member Function Documentation

◆ AcquireResource()

bool cuttlefish::EthernetIface::AcquireResource ( )
overridevirtual

◆ GetBridgeName()

std::string cuttlefish::EthernetIface::GetBridgeName ( )
inline

◆ GetHasIpv4()

bool cuttlefish::EthernetIface::GetHasIpv4 ( )
inline

◆ GetHasIpv6()

bool cuttlefish::EthernetIface::GetHasIpv6 ( )
inline

◆ GetIfaceId()

uint16_t cuttlefish::EthernetIface::GetIfaceId ( )
inline

◆ GetIpAddr()

std::string cuttlefish::EthernetIface::GetIpAddr ( )
inline

◆ GetUseEbtablesLegacy()

bool cuttlefish::EthernetIface::GetUseEbtablesLegacy ( )
inline

◆ ReleaseResource()

bool cuttlefish::EthernetIface::ReleaseResource ( )
overridevirtual

◆ SetHasIpv4()

void cuttlefish::EthernetIface::SetHasIpv4 ( bool  ipv4)
inline

◆ SetHasIpv6()

void cuttlefish::EthernetIface::SetHasIpv6 ( bool  ipv6)
inline

◆ SetUseEbtablesLegacy()

void cuttlefish::EthernetIface::SetUseEbtablesLegacy ( bool  use_legacy)
inline

Member Data Documentation

◆ bridge_name_

std::string cuttlefish::EthernetIface::bridge_name_
private

◆ has_ipv4_

bool cuttlefish::EthernetIface::has_ipv4_ = true
private

◆ has_ipv6_

bool cuttlefish::EthernetIface::has_ipv6_ = true
private

◆ iface_id_

uint16_t cuttlefish::EthernetIface::iface_id_
private

◆ ipaddr_

std::string cuttlefish::EthernetIface::ipaddr_
private

◆ kNetmask

constexpr char cuttlefish::EthernetIface::kNetmask[] = "/24"
staticconstexprprivate

◆ use_ebtables_legacy_

bool cuttlefish::EthernetIface::use_ebtables_legacy_ = false
private

The documentation for this class was generated from the following files: