ATM_RECV(4N) DEVICES AND NETWORK INTERFACES ATM_RECV(4N) NAME atm_recv, atm_recvfrom - receive data from an established ATM connection SYNOPSIS #include atm_recv(fd, buf, len) int fd; caddr_t buf; int len; atm_recvfrom(fd, buf, len, vpvc) int fd; caddr_t buf; int len; Vpvc *vpvc; DESCRIPTION atm_recv() and atm_recvfrom() are used to receive data from an established ATM connection. atm_recv() is used with switched virtual circuits (SVCs) and may be used with per- manent virtual circuits (PVCs) only if fd is associated with a single PVC (see atm_connect_pvc(4N)). atm_recvfrom() returns the VPI/VCI of the connection the data was received from in vpvc and may only be used with PVCs. fd identifies the connection (or connections when fd is associated with multiple incoming PVCs) from which to receive the data. buf identifies the buffer to hold the data to be received. len specifies the maximum amount of data to be received. This length must not be larger than the size of buf. It is important to note that the amount of data received may be less than len. Therefore, it may be necessary to invoke atm_recv() multiple times to read all data. If the connec- tion uses AAL type aal_null, it is possible to control the amount of data that is buffered in the driver before atm_recv() returns. See atm_setbatchsize(4N), atm_getbatchsize(4N), and atm_connect(4N) for details. For connections using AAL type aal_null, the data will be presented in FORE's intermediate cell format. See atm_intro(4N) for details on cell formats. RETURN VALUES atm_recv() and atm_recvfrom() return the number of bytes received 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 returned by atm_recv() and atm_recvfrom(). FSI Release 2.3 Last change: 28 February 1994 1 ATM_RECV(4N) DEVICES AND NETWORK INTERFACES ATM_RECV(4N) ERRORS atm_recv() and atm_recvfrom() can also fail with errors returned from the read(2) and readv(2) system calls. SEE ALSO atm_connect(4N), atm_error(4N), atm_intro(4N), atm_pvc(4N), atm_getbatchsize(4N), atm_setbatchsize(4N), read(2), readv(2) FSI Release 2.3 Last change: 28 February 1994 2