socket(hdlc,lapb,llc2)
NAME
socket − Create a new 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>
s = socket (af, type, protocol)
int s, af, type, protocol;
DESCRIPTION
This system call allows access to the HDLC, LAPB, or LLC2 services.
ARGUMENTS
Input Arguments
af AF_DLI
type SOCK_SEQPACKET
Protocol DLPROTO_HDLC, DLPROTO_LAPB, DLPROTO_LLC2
RETURN VALUE
If the call is successful, the return parameter is the socket descriptor value returned. This parameter is used in all future system calls on the socket. If an error occurs, a value of -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
[EMFILE] Too many open files
[ENFILE] The per-process descriptor table is full
[ENOBUFS] No buffer space is available. The socket cannot be created.
[EACCES] Superuser privileges required.
SEE ALSO
setsockopt(2h), read(2h), recv(2h), getsockopt(2h), send(2h), write(2h), close(2h).