fuchsia.net.ppp

PROTOCOLS

Device

Defined in fuchsia.net.ppp/ppp.fidl

PPP device driver interface.

Rx

Receive data.

Request

NameType
protocol ProtocolType

Response

NameType
result Device_Rx_Result

Tx

Transmit data. When this call returns, it is guaranteed that the data has either been written or that the write failed and the caller may attempt to retransmit.

Request

NameType
protocol ProtocolType
data vector<uint8>

Response

NameType
result Device_Tx_Result

GetInfo

Obtain information about device configuration.

Request

NameType

Response

NameType
info Info

GetStatus

Obtain status of a given protocol. If a protocol is up, Rx and Tx may be called with the same protocol to send and receive PPP frames.

Request

NameType
protocol ProtocolType

Response

NameType
up bool

SetStatus

Set status of a given protocol. If a protocol is up, Rx and Tx may be called with the same protocol to send and receive PPP frames.

Request

NameType
protocol ProtocolType
up bool

Enable

On up, obtain exclusive access to the serial port, and begin continuously reading all protocol types. On down, stop reading and release access to the serial port. Errors only occur when the device fails to obtain exclusive access to the serial port, in which case the device remains in a down state. The device begins down when initialized, so Enable must be called before the driver can send or receive data.

Request

NameType
up bool

Response

NameType
result Device_Enable_Result

DeviceBootstrap

Defined in fuchsia.net.ppp/ppp.fidl

GetInstance

Obtain a unique channel to be used with the driver. This is desirable to avoid blocking other consumers of the device protocol, and should be removed when the DDK has a better channel ownership model for drivers which implement protocols. All instances point to the same underlying device; separate instances are only used to allow the driver to concurrently reply to calls.

Request

NameType

Response

NameType
instance Device

Ppp

Defined in fuchsia.net.ppp/ppp.fidl

PPP service interface.

Open

Given an instance of the driver and options, attempt to open a PPP connection. Uses the provided options to determine how to configure the link, and whether or not to configure IPv4 or IPv6. If no error is returned, the connection is open and the driver supports the requested protocols. Only one connection can be open at a time.

Request

NameType
instance Device
options ConnectionOptions

Response

NameType
result Ppp_Open_Result

Close

If a connection is currently open, close it. Otherwise return an error.

Request

NameType

Response

NameType
result Ppp_Close_Result

STRUCTS

Device_Rx_Response

generated

NameTypeDescriptionDefault
data vector<uint8> No default

Device_Tx_Response

generated

NameTypeDescriptionDefault

Device_Enable_Response

generated

NameTypeDescriptionDefault

Ppp_Open_Response

generated

NameTypeDescriptionDefault

Ppp_Close_Response

generated

NameTypeDescriptionDefault

Info

Defined in fuchsia.net.ppp/ppp.fidl

Information about PPP device configuration.

NameTypeDescriptionDefault
mtu uint16 No default

ConnectionOptions

Defined in fuchsia.net.ppp/ppp.fidl

Options for a PPP connection.

NameTypeDescriptionDefault
magic_number bool

Enable Link Control Protocol Magic Numbers for loopback detection.

No default
ipv4 fuchsia.net/Ipv4Address?

Enable IPv4 with the given IP address.

No default
ipv6 fuchsia.net/Ipv6Address?

Enable IPv6 with the given IPv6 address (used as an interface identifier).

No default

ENUMS

ProtocolType

Type: uint32

Defined in fuchsia.net.ppp/ppp.fidl

The type of protocol being transmitted or received.

NameValueDescription
CONTROL 1
IPV4 2
IPV6 3

UNIONS

Device_Rx_Result

generated

NameTypeDescription
response Device_Rx_Response
err zx/status

Device_Tx_Result

generated

NameTypeDescription
response Device_Tx_Response
err zx/status

Device_Enable_Result

generated

NameTypeDescription
response Device_Enable_Response
err zx/status

Ppp_Open_Result

generated

NameTypeDescription
response Ppp_Open_Response
err zx/status

Ppp_Close_Result

generated

NameTypeDescription
response Ppp_Close_Response
err zx/status