NAME
atm_send, atm_sendto, atm_send_null - send data over an
established ATM connection
SYNOPSIS
#include <fore_atm/fore_atm_user.h>
atm_send(fd, buf, len)
int fd;
caddr_t buf;
int len;
atm_sendto(fd, buf, len, vpvc)
int fd;
caddr_t buf;
int len;
Vpvc vpvc;
atm_send_null(fd, buf, len, hdr)
int fd;
caddr_t buf;
int len;
Atm_hdr hdr;
DESCRIPTION
The atm_send() family of functions attempts to write len
bytes of data from the buffer pointed to by buf over an
established ATM connection referenced by the file descriptor
fd. atm_send() is used with switched virtual circuits
(SVCs) and may be used with permanent virtual circuits
(PVCs) only if fd is associated with a single PVC (see
atm_connect_pvc(4N)).
When fd is associated with multiple PVCs, atm_sendto() is
used to transmit the data over the connection identified by
the VPI/VCI pair vpvc. The identifier vpvc must correspond
to an outgoing PVC actively connected from a previous call
to atm_connect_pvc(4N). atm_sendto() may not be used with
SVCs.
When sending data on a 100 series adapter over connections
with an AAL type of aal_null, atm_send() and atm_sendto()
must be used. buf specifies a sequence of cells in FORE's
intermediate cell format (see atm_intro(4N) for details on
cell formats). len must correspond to a number of complete
cells, so it must be a multiple of 56.
When sending data on a 200 series adapter over connections
with an AAL type of aal_null, atm_send_null() must be used.
The first four bytes of the ATM header are specified in hdr,
while the HEC is automatically computed and inserted by the
hardware. buf specifies a sequence of 48 byte cell
payloads, each to be transmitted with the specified header.
len must correspond to a number of complete payloads, so it
must be a multiple of 48. Note that atm_send_null() is used
when fd is associated with an SVC as well as with multiple
PVCs. When fd references an SVC, the VPI/VCI pair, as
specified in the ATM cell header hdr, must be zero. When fd
references a PVC, the VPI/VCI must correspond to an outgoing
PVC actively connected from a previous call to
atm_connect_pvc(4N).
The number of bytes to send as specified by len must not
exceed the size of buf, nor must the number of bytes exceed
the maximum transmission unit (MTU) for the connection. See
atm_open(4N) for details on the MTU. In addition, for con-
nections using an AAL type of aal_null, len must follow the
restrictions outlined above.
RETURN VALUES
The atm_send() family returns the number of bytes transmit-
ted on success. On failure, they return -1 and set
atm_errno to indicate the error. atm_error(4N) can be used
to print a text description of errors.
ERRORS
The atm_send() family can also fail with errors returned
from the write(2) and writev(2) system calls.
On ULTRIX platforms, calling atm_send() or atm_sendto() on a
closed connection may cause a SIGPIPE signal to be sent to
the calling process. Unless caught or ignored, this ter-
minates the process.
SEE ALSO
atm_intro(4N), atm_open(4N), atm_pvc(4N), write(2), wri-
tev(2)