getsockopt(hdlc,lapb,llc2)
NAME
getsockopt − Obtain HDLC, LAPB, or LLC2 Link information
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/hdlc_var.h>
getsockopt (s, level, optname, optval, optlen)
int s, level, optname;
char ∗optval;
int; ∗optlen;
DESCRIPTION
This system call allows you to obtain Link information. The information returned contains:
Link status
Frame size
Service Data Unit (SDU) status
User XID data
(see the DEC WAN Device Drivers Application Programmer’s Guide for a complete description of the link information returned.)
ARGUMENTS
Input Arguments
s descriptor for a socket
level DLPROTO_HDLC, DLPROTO_LAPB, or DLPROTO_LLC2
optname HDLC_SHOWLINK
optval address of the buffer that will contain the returned value of the link status
optlen size of the data structure
RETURN VALUE
If the call succeeds, a value of 0 is returned. If an error occurs, a value of -1 is returned. Additional error detail is specified in the external variable errno.
DIAGNOSTICS
[EIDRM] The port has been either closed or needs to be closed
[ENETDOWN] The line has been disabled.
[ENXIO] The specified port does not exist
SEE ALSO
socket(2h), setsockopt(2h), read(2h), recv(2h), send(2h), write(2h), close(2h).