class MacAdapter
Defined at line 38 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.h
An entity that instantiates a MacAddrDeviceInterface and provides an implementations of
`fuchsia.hardware.network.device.MacAddr` that grants access to the requested operating state
of its interface.
`MacAdapter` is used to provide the business logic of virtual MacAddr implementations both for
`tun.Device` and `tun.DevicePair` device classes.
Public Methods
zx::result<std::unique_ptr<MacAdapter>> Create (MacAdapterParent * parent, fdf::UnownedUnsynchronizedDispatcher dispatcher, fuchsia_net::wire::MacAddress mac, bool promisc_only)
Creates a new `MacAdapter` with `parent`.
`mac` is the device's own MAC address, reported to the MacAddrDeviceInterface.
if `promisc_only` is true, the only filtering mode reported to the interface will be
`MODE_PROMISCUOUS`.
On success, the adapter is stored in `out`.
Defined at line 17 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.cc
void GetAddress (fdf::Arena & arena, GetAddressCompleter::Sync & completer)
MacAddr protocol:
Defined at line 30 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.cc
void GetFeatures (fdf::Arena & arena, GetFeaturesCompleter::Sync & completer)
Defined at line 34 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.cc
const fuchsia_net::wire::MacAddress & mac ()
Defined at line 49 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.h
void SetMode (fuchsia_hardware_network_driver::wire::MacAddrSetModeRequest * request, fdf::Arena & arena, SetModeCompleter::Sync & completer)
Defined at line 50 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.cc
MacState GetMacState ()
Defined at line 70 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.cc
fdf::ClientEnd<fuchsia_hardware_network_driver::MacAddr> BindDriver ()
Defined at line 64 of file ../../src/connectivity/network/tun/network-tun/mac_adapter.cc