CTL_STATUS_t ctl_udp_init(const CTL_UDP_CONFIGURATION_t *init_data);

ctl_udp_init initializes the UDP layer with the configuration parameters in init_data.

The configuration parameter max_bound_ports sets the maximum number of bound UDP ports. The UDP layer will attempt to allocate a buffer for its state data, of approximately eight bytes times max_bound_ports, and then register the UDP layer with the IP layer.

The configuration parameters min_ephemeral_port and max_ephemeral_port define the UDP ephemeral port range.

You can elect to use a default configuration by passing a null pointer for init_data. In this case, the UDP layer is initialized with a maximum of 20 bound UDP ports with the ephemeral UDP port range being between 1024 and 65535.


ctl_udp_init must be called prior to calling ctl_udp_bind.

See Also

CTL_UDP_RECV_FN_t, ctl_udp_bind