qcc_util(3)
NAME
qcc_util, q_ioc_bind − bind a service access point to an open instance of the q93b driver
SYNOPSIS
cc [ flag ... ] file ... −latm [ library ... ]
#include <atm/qcc.h>
int q_ioc_bind(int fd, int sap);
MT-LEVEL
Safe.
AVAILABILITY
The functionality described in this man page is available in the SUNWatma package included with the SunATM adapter board. The libatm.a library, which is located in /usr/lib, must be included at compile time as indicated in the synopsis.
DESCRIPTION
This utility may be used to bind an application program which has opened a stream to the q93b driver. This step is required so that incoming SETUP messages are directed to the correct application by the q93b driver.
Before using this function, a stream must be opened to the q93b driver, using the open(2) system call.
q_ioc_bind() may then be used to bind a service access point, sap, to the opened stream, specified by its file descriptor, fd.
Q.2931 SETUP messages which are to be received by the application program must contain a Broadband Higher Layer Information IE identifying the sap to which the message should be directed.
RETURN VALUES
q_ioc_bind returns 0 on success and -1 on error.
EXAMPLES
The following example opens a stream to q93b and binds it to sap 0x100.
#include <atm/qcc.h>
setup_q93b();
{
char qdriver[] = "/dev/q93b";
int qfd;
int sap = 0x100;
if ((qfd = open(qdriver, O_RDWR, 0)) < 0) {
perror("open");
exit(-1);
}
if (q_ioc_bind(qfd, sap) < 0) {
perror("q_ioc_bind");
exit(-1);
}
}
SEE ALSO
qcc_bld(3), qcc_len(3), qcc_parse(3), qcc_bld(9F), qcc_parse(9F), sa_util(3), q93b(7), sa(7)
SunOS 2.0 — Last change: 7 Dec 1994