NAME
atm_setbatchsize, atm_getbatchsize - set/get batch size for
null AAL interface
SYNOPSIS
#include <fore_atm/fore_atm_user.h>
int atm_setbatchsize(fd, batch_size)
int fd;
int batch_size;
int atm_getbatchsize(fd, batch_size)
int fd;
int *batch_size;
DESCRIPTION
atm_setbatchsize() is used to set the minimum number of
cells that must be received by the connection specified by
fd before atm_recv(4N) will return. Note that for the 200
series adapters, any change in the ATM cell header will
trigger a return. This interface only applies to ATM con-
nections established with an AAL of type aal_null. When
several PVCs are associated with the same descriptor, the
same size applies to each PVC. By default, the batch size
is set to 1, which causes atm_recv(4N) to return each cell
received for the incoming connection specified by fd. A dif-
ferent size can be specified using the batch_size argument
to atm_setbatchsize(). Setting the batch size to a value
other than 1 can improve performance by reducing the over-
head incurred per cell. The value must be chosen carefully
since a batch size other than 1 will prevent data from mov-
ing from the physical level to the ATM level until the
number of cells received for the connection is equal to or
greater than the batch size. In addition, care must be
taken to ensure that the data size, in bytes (56 bytes per
cell for 100 series adapters, 48 bytes per cell for 200
series adapters), is not greater than the Maximum Transmis-
sion Unit (MTU) for the connection. The MTU for the link is
returned by the atm_open(4N) operation.
atm_getbatchsize() returns the current value of the batch
size in the batch_size argument.
RETURN VALUES
atm_setbatchsize() and atm_getbatchsize() return 0 on suc-
cess. On failure, they return -1 and set atm_errno to indi-
cate the error. atm_error(4N) can be used to print a text
description of errors of returned by atm_setbatchsize() and
atm_getbatchsize().
ERRORS
atm_setbatchsize() and atm_getbatchsize() can also fail with
errors returned from the ioctl(2) system call.
SEE ALSO
atm_intro(4N)