Function create_tx_socket

Source
pub fn create_tx_socket(
    if_index: u32,
    if_queue: u32,
    config: Option<XdpConfig>,
) -> Result<TxSocket, Error>
Expand description

Creates a TxSocket for sending packets.

This is a convenience wrapper around create_socket for transmit-only use cases.

§Arguments

  • if_index - The index of the network interface to use.
  • if_queue - The queue ID of the network interface to use.
  • config - Optional XdpConfig to customize the socket.

§Returns

A Result containing a TxSocket on success, or an io::Error on failure.