netstack3_ip::socket

Trait RouteResolutionOptions

Source
pub trait RouteResolutionOptions<I: Ip> {
    // Required methods
    fn transparent(&self) -> bool;
    fn marks(&self) -> &Marks;
}
Expand description

Provides hooks for altering route resolution behavior of IpSock.

Must be implemented by the socket option type of an IpSock when using it to call IpSocketHandler::new_ip_socket or IpSocketHandler::send_ip_packet. This is implemented as a trait instead of an inherent impl on a type so that users of sockets that don’t need certain option types can avoid allocating space for those options.

Required Methods§

Source

fn transparent(&self) -> bool

Whether the socket is transparent.

This allows transparently proxying traffic to the socket, and allows the socket to be bound to a non-local address.

Source

fn marks(&self) -> &Marks

Returns the marks carried by packets created on the socket.

Implementors§