maxdesc() — Get socket numbers to extend beyond the default range

Standards

Standards / Extensions C or C++ Dependencies
z/OS® UNIX both  

Format

#define _OPEN_SYS_SOCK_EXT
#include <sys/types.h>
#include <sys/socket.h>

int maxdesc(int *totdesc, int *inetdesc);

General description

Bulk mode sockets are not supported. Do not use this function.

Returned value

If successful, maxdesc() returns 0.

If unsuccessful, maxdesc() returns -1 and sets errno to one of the following values:
Error Code
Description
EALREADY
Your program called maxdesc() after creating a socket, after a call to setibmsockopt(), or after a previous call to maxdesc().
EFAULT
Using the totdesc parameter as specified results in an attempt to access storage outside of the caller's address space, or storage not modifiable by the caller.
ENOMEM
Your address space has insufficient storage.