R_UDP_ALLOC(3)

EXPERIMENTAL_FUNC
r_udp_alloc - Create a UDP socket and bind to a random port number.

SYNOPSIS
#include <karma_r.h>

int r_udp_alloc

(unsigned int *port_number)

DESCRIPTION
Create a UDP socket and bind to a random port number.

port_number
    A pointer to the port number to bind to. If the port number is 0, a random port number is bound to, and this value is updated with that port number.

RETURN VALUE
The file descriptor of the socket on success, else -1.

Multi-threading Level
Unsafe.

NOTE
The close-on-exec flags of the socket is set such that the socket will close on a call to execve(2V).

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/