Open a channel
A client supplies an open configuration containing the optional transport name, the remote edge, the channel name, and callback functions. The core copies the configuration and uses the callbacks to report channel state, received data, transmit completion, receive-intent requests, signal changes, and aborts. To open a channel:- Prepare a configuration with the transport name, remote edge, channel name, and callback functions.
- Call the open function with the configuration.
- Wait for the connected notification before sending data.
Transmit and receive data
The receiver should queue intents before the sender transmits. A sender can call a transmit function for a contiguous buffer or a vector-backed buffer such as an SKB or DSM chain. To send and receive data:- Receiver: Queue receive intents with the maximum packet size it can accept.
- Sender: Call transmit with the data and size.
- Receiver: Receive the data and process it.
- Receiver: Signal completion when done with the buffer.
- Sender: Receive notification that the buffer was processed.
Control signals
A client can exchange a 32-bit control signal field with the peer:- Set the local signal value.
- Read the cached local value.
- Read the cached remote value.
- Receive notification when the remote signal changes.
Close a channel
Call close when no more data should be exchanged. A local close reports local disconnection; a peer-initiated close reports remote disconnection. The close path must drain or abort pending work before callback-owned resources are destroyed.Transport registration
A transport registers an interface and configuration with the core. The configuration supplies its name, edge, supported versions, maximum channel IDs, and maximum intent IDs. The transport moves through these states:- Down (initial state)
- Negotiating (version negotiation in progress)
- Opened (ready for channels)
- Failed (negotiation failed)
User-space channel access
A user-space driver can expose a configured GLink channel as a character device. The file operations map to the client API:- Open → Open a channel
- Write → Send data
- Read → Receive data and complete it
- Release → Close the channel
- ioctl → Queue a receive intent
- poll → Wait for channel availability
- mmap → Avoid an extra kernel/user buffer copy

