socket(wdd)
NAME
socket − Create a new WDD socket
SYNTAX
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <netdnet/dli_var.h>
#include <wdd/wda_var.h>
s = socket (af, type, protocol)
int s, af, type, protocol;
DESCRIPTION
The socket() system call creates an endpoint for communication and returns a descriptor.
In order to access the device driver functions a socket must be opened to the device driver via the WAN Device Access (WDA) protocol module.
ARGUMENTS
Input Arguments
af AF_DLI
type SOCK_DGRAM
protocol DLPROTO_WDA
RETURN VALUE
If the call is successful, the return value ( s ) is the socket descriptor which is used in all future system calls to this socket. If the call is unsuccessful, -1 is returned and the global variable errno is set to indicate the error
DIAGNOSTICS
[EAFNOSUPPORT] The specified address family is not supported in this version of the system.
[ESOCKTNOSUPPORT]
The specified socket type is not supported in this address family.
[EPROTONOSUPPORT]
The specified protocol is not supported.
[EPROTOTYPE] Request for a type of socket for which there is no supporting protocol.
[ENFILE] The per-process descriptor table is full.
[ENOBUFS] No buffer space is available. The socket cannot be created.
[EPERM] Superuser privileges required.
[EMFILE] Too many open files