class DevicePort
Defined at line 22 of file ../../src/connectivity/network/drivers/network-device/device/device_port.h
Public Methods
void Create (DeviceInterface * parent, async_dispatcher_t * dispatcher, netdev::wire::PortId id, fdf::WireSharedClient<fuchsia_hardware_network_driver::NetworkPort> && port_client, fdf_dispatcher_t * mac_dispatcher, TeardownCallback && on_teardown, OnCreated && on_created)
Asynchronously create a DevicePort object. This will make calls on the port_client to determine
the initial state of the port. Once the port object is ready it will be provided through the
on_created callback. If an error occurs it will also be reported through on_created. Note that
on an error the callback may be (but is not guaranteed to be) called inline from the Create
call. Because of this it's a good idea to avoid acquiring locks in the on_created callback when
an error is reported.
Defined at line 15 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
netdev::wire::PortId id ()
Defined at line 40 of file ../../src/connectivity/network/drivers/network-device/device/device_port.h
void ~DevicePort ()
Defined at line 59 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
Counters & counters ()
Defined at line 89 of file ../../src/connectivity/network/drivers/network-device/device/device_port.h
void StatusChanged (const netdev::wire::PortStatus & new_status)
Notifies port of status changes notifications from the network device implementation.
Defined at line 210 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void Teardown ()
Starts port teardown process.
Once port is torn down and ready to be deleted, the teardown callback passed on construction
will be called.
Calling teardown while a teardown is already in progress is a no-op.
Defined at line 259 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void SessionAttached ()
Notifies the port a session attached to it.
When sessions attach to a port, the port will notify the network port implementation that the
port is active.
Defined at line 305 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void SessionDetached ()
Notifies the port a session detached from it.
When all sessions are detached from a port, the port will notify the network port
implementation that the port is inactive.
Defined at line 310 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void Bind (fidl::ServerEnd<netdev::Port> req)
Binds a new FIDL request to this port.
Defined at line 349 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
bool IsValidRxFrameType (netdev::wire::FrameType frame_type)
Returns true if `frame_type` is a valid inbound frame type for subscription to on this port.
Defined at line 336 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
bool IsValidTxFrameType (netdev::wire::FrameType frame_type)
Returns true if `frame_type` is a valid outbound frame type for this port.
Defined at line 342 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetInfo (GetInfoCompleter::Sync & completer)
FIDL protocol implementation.
Defined at line 380 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetStatus (GetStatusCompleter::Sync & completer)
Defined at line 394 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetStatusWatcher (GetStatusWatcherRequestView request, GetStatusWatcherCompleter::Sync & _completer)
Defined at line 218 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetMac (GetMacRequestView request, GetMacCompleter::Sync & _completer)
Defined at line 288 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetDevice (GetDeviceRequestView request, GetDeviceCompleter::Sync & _completer)
Defined at line 409 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void Clone (CloneRequestView request, CloneCompleter::Sync & _completer)
Defined at line 415 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetCounters (GetCountersCompleter::Sync & completer)
Defined at line 419 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetDiagnostics (GetDiagnosticsRequestView request, GetDiagnosticsCompleter::Sync & _completer)
Defined at line 431 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc
void GetIdentity (GetIdentityCompleter::Sync & completer)
Defined at line 436 of file ../../src/connectivity/network/drivers/network-device/device/device_port.cc