Watt-32 tcp/ip  2.2 dev-rel.10
Functions | Variables
ports.c File Reference

Go to the source code of this file.


static void exit_localport (void)
 Free allocated memory.
WORD init_localport (void)
 Allocate the "lport_inuse" bit-array from heap. More...
WORD find_free_port (WORD port, BOOL linger)
int grab_localport (WORD port)
int reuse_localport (WORD port)
int maybe_reuse_localport (_tcp_Socket *s)


int use_rand_lport = TRUE
static fd_setlport_inuse

Detailed Description

Handling of local ports used by UDP/TCP.

Moved from pctcp.c

Definition in file ports.c.

Function Documentation

WORD init_localport ( void  )

Allocate the "lport_inuse" bit-array from heap.

Return values
Highestusable port.

Make empherical port range configurable.

Use some hashing technique to speed up find_free_port().

Definition at line 52 of file ports.c.

References exit_localport().