ISDN ioctls are used to change the operation of and get information about the network adapter being driven by the ISDN driver. They are sent by the MAC user in STREAMS messages of type M_IOCTL(D7str), with any associated data passed in a M_DATA(D7str) message type.
#include <sys/scoisdn.h>The ISDN device allocates resources based on the parameters level3cnt, datablkcnt, and datablklen. Failure to allocate enough resources may cause connection establishment failures or data messages to be lost. The structure members are:typedef struct isdn_register_params { isdnU16_t ApplId; isdnU32_t level3cnt; isdnU32_t datablkcnt; isdnU32_t datablklen; } isdn_register_params_t;
ApplId
level3cnt
datablkcnt
datablklen
datablklen
is too
small, messages may be lost.
ApplId
field of the
isdn_register_params structure. The ISDN
driver should use this application identifier in the ApplId
field of the
isdn_msg_hdr(D4isdn)
header for all ISDN messages pertaining to this application.
The application need not specify the ApplId
field of the
isdn_msg_hdr for ISDN
messages to the ISDN device; the
DLPI
module performs this function.
The data is one of the following:
ioc_rval
set to zero and return the
associated ApplId
in the
isdn_register_params structure.
ioc_count
to zero,
ioc_rval
to -1,
and ioc_error
to an appropriate value from
errnos(D5).
An application does not issue this ioctl.
ApplId
field of the isdn_release
structure in the data portion of the ioctl contains
the application identifier to be released:
#include <sys/scoisdn.h>typedef struct isdn_release { isdnU16_t ApplId; /* application identifier */ } isdn_release_t;
ioc_rval
set to zero.
ioc_rval
to -1,
and ioc_error
set to EINVAL
if ApplId
is invalid.
For other error conditions,
set ioc_error to an appropriate value from
errnos(D5).
#include <sys/scoisdn.h>typedef union isdn_profile { struct { isdnBfU8_t CtrlNr; /* Controller number */ } request;
struct { isdnU16_t CtlrCnt; /* number of installed controllers */ isdnU16_t BchanCnt; /* number of supported B-channels */
/* Global Options */ isdnBfU32_t g_IntCtlr :1, /* internal controller supported */ g_ExtEqpt :1, /* external equipment supported */ g_Handset :1, /* Handset supported */ g_DTMF :1, /* DTMF supported */ :0; /* Reserved */
/* B1 protocols support; Physical layer and framing */ isdnBfU32_t b1_HDLC64 :1, /* 64 kBit/s with HDLC framing */ b1_Trans64 :1, /* 64 kBit/s bit transparent */ b1_V110asy :1, /* V.110 asynchronous start/stop */ b1_V110sync :1, /* V.110 synchronous HDLC */ b1_T30 :1, /* T.30 modem for fax group 3 */ b1_HDLCi64 :1, /* 64 kBit/s inverted HDLC */ b1_Trans56 :1, /* 56 kBit/s bit transparent */ :0; /* Reserved */
/* B2 protocol support; Data link layer protocol */ isdnBfU32_t b2_ISO7776 :1, /* ISO 7776 (X.75 SLP) */ b2_Trans :1, /* Transparent */ b2_SDLC :1, /* SDLC */ b2_LAPD :1, /* LAPD Q.921 for D channel X.25 */ b2_T30 :1, /* T.30 for fax group 3 */ b2_PPP :1, /* Point to Point Protocol */ b2_TransNE :1, /* Transparent ignoring errors */ :0; /* Reserved */
/* B3 protocol support; Network layer protocol */ isdnBfU32_t b3_Trans :1, /* Transparent */ b3_T90NL :1, /* T.90NL w/ compatibility to T.70NL */ b3_ISO8208 :1, /* ISO 8208 (X.25 DTE-DTE) */ b3_X25DCE :1, /* X.25 DCE */ b3_T30 :1, /* T.30 for fax group 3 */ :0; /* Reserved */
isdnU32_t isdn_reserved[6]; isdnU32_t mfgr_specific[5]; } reply; unsigned char buf[64];
} isdn_profile_t;
CtrlNr
(controller number) is 0, only CtrlNr
(number of installed controllers) is passed to the application.
Otherwise, appropriate values should be given for each parameter.
ioc_rval
set to zero
and ioc_count
set to the size of the
isdn_profile structure returned in the associated
M_DATA(D7str).
ioc_count
to zero,
ioc_rval
to -1,
and ioc_error
set to EINVAL
if CtrlNr
is invalid.
For other error conditions,
set ioc_error to an appropriate value from
errnos(D5).
Section D4isdn manual pages, Section D7isdn manual pages,
Developing STREAMS modules and drivers.