netstack3_base

Function simple_randomized_port_alloc

Source
pub fn simple_randomized_port_alloc<I: PortAllocImpl + ?Sized, R: Rng>(
    rng: &mut R,
    id: &I::Id,
    state: &I,
    arg: &I::PortAvailableArg,
) -> Option<u16>
Expand description

Implements the algorithm 1 as described in RFC 6056.