getsockopt(wdd)
NAME
getsockopt − Return the WDD socket options
SYNTAX
#include <sys/types.h>
#include <sys/socket.h>
#include <wdd/wda_var.h>
getsockopt (s, level, optname, optval, optlen)
int s, level, optname;
char ∗optval;
int ∗optlen;
DESCRIPTION
This function allows you to determine the state of the line entity, state of the modem control signals, and count of errors (such as CRC and data overruns) that have occurred on the line since the bind() system call. These events are not available via network management.
ARGUMENTS
Input Arguments
s value returned by the socket() system call
level 0
optname WDA_EVENTCOUNT
optval Pointer to a ClientEvents data structure which contains the event counts on return from the call.
optlen Pointer to an integer initially set to sizeof struct ClientEvents. On return from the call, the integer will be set to the size of valid data in the option buffer (optval).
RETURN VALUE
The return value is 0 if the call is successful. Otherwise, a -1 is returned and the global variable errno is set to indicate the error.
DIAGNOSTICS
[ENODEV] A successful bind() has not been made by this socket.
[EACCES] The caller is not the owner of the line.
[ENOPROTOOPT] The Protocol option not available.