home *** CD-ROM | disk | FTP | other *** search
-
- cFos ISDN FOSSIL appendage, Revision 2.00
-
-
- MS-DOS:
-
- The functions are to be called with AH=0x90 and the function
- number in AL. See the FOSSIL doc for more information on
- FOSSIL programming and user applications.
-
-
- Windows 16-bit:
-
- cFos/Win (CFOS.DRV resp. CFOS20.DRV) starting with version
- 0.89f exports a function called "CFOS_APPENDAGE", which can
- be called to use the functions described below. See the
- Windows-section in this document for further details.
-
-
- OS/2:
-
- cFos/2 starting with version 0.82e features IOCTL category
- 0x90, function 0x42 for the cFos appendage. If you get an
- ERROR_GENERAL_FAILURE, this cFos/2 version might not feature
- an appendage. See below for details.
-
-
- ========================================================================
-
-
- ISDN appendage :
-
- ------- 00 - check for ISDN appendage ----------------------------------
-
- INPUT:
- AX = 0x9000
-
- OUTPUT:
- AX = 0x1969
- BX = maximum function number supported
- CX = 'cF'
- DX = 'os'
-
- NOTE:
- if AX != 0x1969, this FOSSIL doesn't feature any
- ISDN appendage.
-
-
- ------- 01 - reset ISDN driver/hardware --------------------------------
-
- This function terminates all connections on all ports. It waits
- a maximum of 10 seconds for all connections to be disconnected.
- After that it resets the ISDN driver/hardware and some internal
- data.
-
- INPUT:
- AX = 0x9001
-
- OUTPUT:
- AX = 0x0000, success
-
-
- ------- 02 - get ISDN connection info ----------------------------------
-
- INPUT:
- AX = 0x9002
- DX = port number
- CX = number of bytes to get from appendage
- ES:BX = ptr to ISDN info block in application space
-
- OUTPUT:
- AX = 0000, success
- CX = number of bytes transfered into application buffer
-
- ISDN info block:
-
- offset type description
- --------------------------------------------------------
-
- 0 WORD offset into additional infomation
- elements in bytes, starting from the
- beginning of the block
- 2 DWORD incoming call: incoming caller-id
- outgoing call: dialed number
- swapped far ptr to ASCIZ string, segment
- first (!! you have to swap low and high
- words to use this as a far ptr).
- 6 BYTE number of b-channels currently in use by
- this port
- 7 DWORD connection characteristics
- bit 0 = 1 b2-protocol supports control
- flow
- bit 1 = 1 b2-protocol supports error
- correction
- bit 2 = 0 incoming call
- 1 outgoing call
- all other bits are reserved for future
- use
- 11 WORD current CPS rate
- 13 DWORD B1 bps rate (i.e. if using V.110, the
- V.110 bps rate)
- 17 ... additional info elements, if info block
- is longer than 13 bytes.
-
- the ISDN info block can contain additional
- infomation elements reflecting national ISDN
- parameters, e.g. LLC/MSN/Subaddress/EAZ/...
-
- Currently defined:
- BYTE type 1 = 1.TR.6 (i.e. cFos for CAPI 1.1)
- BYTE requested EAZ ('0'..'9')
- BYTE Service Indicator
- BYTE Additional Service Indicator
-
- BYTE type 2 = DSS1 (i.e. cFos for CAPI 2.0)
- BYTE "requested EAZ", i.e. an index in the
- AT&A table
-
- NOTE:
- See special handling for Windows and OS/2 below.
-
-
- ------- 03 - get charging info -----------------------------------------
-
- INPUT:
- AX = 0x9003
- DX = port
- BX = no of b-channel of this port
- (0=main channel, 1=first aux channel...)
- ffff = sum of all charges on all channels,
- independant of carrier status
-
- OUTPUT:
- AX = 0000, success
- 0001, no valid b-channel
- BX = num. of charges used for current connection
- CX = num. of seconds remaining in current charging unit
- (valid after 2nd charging unit, otherwise link
- duration in seconds)
-
- Note: If no connection is active this function can be
- called with BX = 0 (as well as BX = 0xffff). Then
- it returns CX = 0 and BX the total number of
- charging unit of the last call (main + aux
- channels)
-
-
- ------- 04 - add/remove b-channel --------------------------------------
-
- INPUT:
- AX = 0x9004
- DX = port
- BX = 1 -> add, 2 -> remove
-
- OUTPUT:
- AX = 0000, success
- 0001, no active connection
- 0002, connect/disconnect already in progress
- 0003, not available in this version
-
- After a call to this function, 'cFos' initiates a
- connect/disconnect sequence. During this sequence all
- calls to this function result in error 0002. The
- completion can be determined by monitoring the number B
- channels in use.
- Note: Dynamic CCB will be switched to static CCB when
- this function is called.
-
- NOTE:
- {++} This function is only available in the 'cFos/Pro'
- version.
-
-
- ------- 05 - get ISDN time/date ----------------------------------------
-
- INPUT:
- AX = 0x9005
- BX = 0000
-
- OUTPUT:
- AX = 0000, success
- CX:BX = difference between ISDN time and local time in
- seconds. CX = most significant word. The correct
- time is DOS_TIME_IN_SECS + CX:BX. I.e. if CX:BX
- is negative, your computer is ahead of ISDN
- time. 'cFos' clears its timediff variable after
- a call to this function.
-
-
- ------- 06 - set statusline number/mode --------------------------------
-
- INPUT:
- AX = 0x9006
- BX = statusline display mode (like AT&D)
- CX = line number
- DX = port
-
- OUTPUT:
- AX = 0000, success
- ffff, bad parameter in BX
-
-
- ------- 07 - clear charging info ---------------------------------------
-
- INPUT:
- AX = 0x9007
- DX = port
- BX = no of b-channel of this port
- (0=main channel, 1=first aux channel...)
- ffff = sum of all charges on all channels,
- independant of carrier status
-
- OUTPUT:
- AX = 0000, success
- 0001, no valid b-channel
- BX, CX charging info, see function 03
-
- ========================================================================
-
-
- Example .ASM code for MS-DOS:
-
- ; set statusline to line 0 and switch it on on port 0
- mov ax,09006h ; function code
- mov bx,1 ; mode: on while init'ed
- mov cx,0 ; linenumber
- mov dx,0 ; port number
- int 14h
-
-
- Example (Microsoft) C code for MS-DOS:
-
- {
- union REGS r;
-
- r.x.ax = 0x9006; /* set statusline */
- r.x.dx = 0; /* port */
- r.x.bx = 1; /* mode */
- r.x.cx = 0; /* linenumber */
- int86 (0x14, &r, &r);
- }
-
-
- ========================================================================
-
-
- Windows 16-bit:
-
-
- The prototype of the exported appendage function CFOS_APPENDAGE
- is:
- int FAR PASCAL cfos_appendage (short func, short cid,
- dword BX, word CX, word FAR * newBX, word FAR * newCX);
-
- This function is used very similar to the way the DOS appendage
- is called. The mentioned register names correspond to the
- registers used for the DOS appendage calls.
-
- The parameters are used as follows:
-
- func: corresponding AL value (func = 0...6 is valid)
- cid: COM-Port (0=COM1, 1=COM2, ...)
- BX: dword, lower word is used as corresponding BX value,
- higher word is used as corresponding ES value, where
- applicable
- CX: correspondig CX value
- newBX,
- newCX: pointers to words, where results can be stored. They
- represent the corresponding output register values of
- BX and CX.
- The return value of this function is the corresponding output
- AX register value.
-
-
- ========================================================================
-
-
- cFos appendage under OS/2:
-
-
- Open a port driven by cFos with IOCTL category 0x90, function
- code 0x42 and use the following parameter and data buffers:
-
- Call parameter struct:
-
- typedef struct {
- word ax, bx, cx, _res1, _res2, _res3;
- word buflen;
- } APPCALL;
-
- Return data struct:
-
- typedef struct {
- word ax, bx, cx, dx, _res2, _res3;
- char buffer[1];
- } APPRET;
-
- 'word' is an unsigned 16-bit integer.
-
- You MUST specify structs of at least this length, regardless of
- which function you're calling.
-
- The register values of the above listed cFos appendage function
- calls are to be written to the structure members.
-
- Function 0x02 is special: you must provide a buffer in your
- return data structure and note the length of that buffer in the
- call data structure member 'buflen'. cFos will write up to
- 'buflen' bytes to the return data structure. The ES:BX parameter
- of the FOSSIL ISDN appendage is ignored.
-
- If possible, use 32bit DosDevIOCtl2; if not, use DosDevIOCtl. Be
- sure to provide at least a parameter buffer of 14 bytes and a
- data buffer of 12 bytes. Otherwise, cFos/2 may reject the call
- with an error.
-
-
-
- ========================================================================
-