send(hdlc,lapb,llc2)
NAME
send − Transmit data over an HDLC, LAPB, or LLC2 Link
SYNTAX
#include <sys/types.h>
#include <sys/socket.h>
cc = send (s, buf, buflen, flags)
int cc, s;
char ∗buf;
int buflen, flags;
DESCRIPTION
The write() or send() system calls allow a user to queue data buffers at the user’s socket for transmission.
ARGUMENTS
Input Arguments
s descriptor for a socket that has been returned by the socket call
buf address of buffer which contains the data to be sent
buflen size of the data
flags Null
RETURN VALUE
If the output is successful, the return value (cc) is the number of characters actually sent. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
DIAGNOSTICS
[EBADF] The s value is not a valid socket descriptor.
[EFAULT] The buf argument points outside the allocated address space
[EIDRM] The port has not been opened or is waiting to be closed by the client. This error occurs if the link and/or the station have been disabled by the Network Management.
[EMSGSIZE] The message is longer than the negotiated buffer size.
[ENETDOWN] The link and/or station is disabled by the network management. This error also occurs if the link is inoperative, i.e. if the physical line has been disabled.
[ENETUNREACH] The link’s protocol operation has been stopped. For more information please refer to the DEC WAN Device Drivers Application Programmer’s Guide.
[EWOULDBLOCK] The socket is marked "non-blocking" and the transmit operation would have been blocked.
[ENETRESET] The link is being initialized but not yet reached the running state. Alternatively, the link is in error state waiting to be reset or re-initialised.
[ENOPROTOOPT] The station is in Maintenance Mode.
SEE ALSO
socket(2h), read(2h), recv(2h), write(2h), setsockopt(2h), getsockopt(2h), close(2h).