isdnioctl(7)


isdnioctl -- ISDN ioctl commands

Description

The SCO ISDN ioctls are used with the I_STR STREAM ioctl that is documented on the streamio(7) manual page.

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.

MACIOC_ISDN_REGISTER

Binds a Stream to an ISDN device. That is, a device dev/netx opened to the DLPI module registers itself with the MDI ISDN driver by means of this ioctl. This ioctl must be processed before the device will respond to ISDN messages.

Parameters
The data portion of the ioctl uses the isdn_register_params structure:
   #include <sys/scoisdn.h> 
   

typedef struct isdn_register_params { isdnU16_t ApplId; isdnU32_t level3cnt; isdnU32_t datablkcnt; isdnU32_t datablklen; } isdn_register_params_t;

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:

ApplId
application identifier

level3cnt
number of simultaneous logical connections. Note that there may be many logical connections over a single physical connection.

datablkcnt
number of buffered data messages.

datablklen
size of buffered data messages. If datablklen is too small, messages may be lost.

Data returned
The MDI ISDN driver should return the allocated application identifier in the 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:

M_IOCACK(D7str)
Acknowledge successful completion of the operation. Set ioc_rval set to zero and return the associated ApplId in the isdn_register_params structure.

M_IOCNAK(D7str)
Acknowledge unsuccessful completion of the operation. Set ioc_count to zero, ioc_rval to -1, and ioc_error to an appropriate value from errnos(D5).

MACIOC_ISDN_RELEASE

Notifies the MDI ISDN driver that the /dev/netx device associated with a particular application identifier has closed, and that the identifier and associated resources are to be released.

An application does not issue this ioctl.

Parameters
The 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;

Data returned
None.

M_IOCACK(D7str)
Acknowledge successful completion of the operation. Set ioc_rval set to zero.

M_IOCNAK(D7str)
Acknowledge unsuccessful completion of the operation. Set 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).

MACIOC_ISDN_GETPROFILE

Requests that the ISDN driver return the protocol-specific capabilities of the adapter it controls. This will appear as an M_IOCTL(D7str) message with an associated M_DATA(D7str) block. Specifically, the ISDN driver returns the number of adapters is controls or protocol-specific capabilities of the adapter. The protocol-specific capabilities include the isdnBproto(D4isdn) protocols supported:
   #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;

Parameters
If 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.

Data returned
The ISDN driver returns the appropriate information to the application in the reply structure. The data is one of the following:

M_IOCACK(D7str)
Acknowledge successful completion of the operation. Set ioc_rval set to zero and ioc_count set to the size of the isdn_profile structure returned in the associated M_DATA(D7str).

M_IOCNAK(D7str)
Acknowledge unsuccessful completion of the operation. Set 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).

References

isdn(7)

Section D4isdn manual pages, Section D7isdn manual pages,

``SCO ISDN adapter drivers''

``MDI ioctls''

Developing STREAMS modules and drivers.


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.