Type Alias

nw_ethernet_channel_t

An object you use to send and receive custom Ethernet frames.

Declaration

typedef NSObject<OS_nw_ethernet_channel> *nw_ethernet_channel_t;

Discussion

Use Ethernet channels to send and receive custom Ethernet frame types over an interface.

Creating Ethernet channels requires the com.apple.developer.networking.custom-protocol entitlement.

Topics

Managing Ethernet Channels

nw_ethernet_channel_create

Initializes an Ethernet channel on a specific interface with a custom Ethernet type.

nw_ethernet_channel_set_queue

Sets the queue on which all channel events are delivered.

nw_ethernet_channel_start

Starts the process of registering the channel.

nw_ethernet_channel_cancel

Unregisters the channel from the interface.

Handling State Updates

nw_ethernet_channel_set_state_changed_handler

Sets a handler to receive channel state updates.

nw_ethernet_channel_state_changed_handler_t

A handler that delivers Ethernet channel state updates with associated errors.

nw_ethernet_channel_state_t

States indicating whether an Ethernet channel is able to send and receive frames.

Sending and Receiving Ethernet Frames

nw_ethernet_channel_send

Sends a single Ethernet frame over a channel to a specific Ethernet address.

nw_ethernet_channel_send_completion_t

A handler that indicates when an Ethernet frame has been sent, or if an error was encountered.

nw_ethernet_channel_set_receive_handler

Sets a handler to receive inbound Ethernet frames.

nw_ethernet_channel_receive_handler_t

A handler that delivers inbound Ethernet frames.

nw_ethernet_address_t

A 48-bit Ethernet address.

See Also

Connections and Listeners

Implementing netcat with Network Framework

Build a simple netcat tool that establishes network connections and transfers data.

nw_connection_t

A bidirectional data connection between a local endpoint and a remote endpoint.

nw_listener_t

An object you use to listen for incoming network connections.

nw_browser_t

An object you use to browse for available network services.