home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 May / PCO_5_97.ISO / FilesBBS / OS2 / CF2B1205.ARJ / CF2B1205.ZIP / APPEND.DOC next >
Encoding:
Text File  |  1997-02-18  |  11.6 KB  |  320 lines

  1.  
  2.         cFos ISDN FOSSIL appendage, Revision 2.00
  3.  
  4.  
  5.         MS-DOS:
  6.  
  7.            The functions are to be called with AH=0x90 and the  function
  8.            number in AL. See the FOSSIL  doc  for  more  information  on
  9.            FOSSIL programming and user applications.
  10.  
  11.  
  12.         Windows 16-bit:
  13.  
  14.            cFos/Win (CFOS.DRV resp. CFOS20.DRV)  starting  with  version
  15.            0.89f exports a function called "CFOS_APPENDAGE",  which  can
  16.            be called to use  the  functions  described  below.  See  the
  17.            Windows-section in this document for further details.
  18.  
  19.  
  20.         OS/2:
  21.  
  22.            cFos/2 starting with version 0.82e  features  IOCTL  category
  23.            0x90, function 0x42 for the cFos appendage.  If  you  get  an
  24.            ERROR_GENERAL_FAILURE, this cFos/2 version might not  feature
  25.            an appendage. See below for details.
  26.  
  27.  
  28. ========================================================================
  29.  
  30.  
  31.         ISDN appendage :
  32.  
  33. ------- 00 - check for ISDN appendage ----------------------------------
  34.  
  35.         INPUT:
  36.                 AX = 0x9000
  37.  
  38.         OUTPUT:
  39.                 AX = 0x1969
  40.                 BX = maximum function number supported
  41.                 CX = 'cF'
  42.                 DX = 'os'
  43.  
  44.         NOTE:
  45.                 if AX != 0x1969, this FOSSIL doesn't feature any
  46.                 ISDN appendage.
  47.  
  48.  
  49. ------- 01 - reset ISDN driver/hardware --------------------------------
  50.  
  51.         This function terminates all connections on all ports. It  waits
  52.         a maximum of 10 seconds for all connections to be  disconnected.
  53.         After that it resets the ISDN driver/hardware and some  internal
  54.         data.
  55.  
  56.         INPUT:
  57.                 AX = 0x9001
  58.  
  59.         OUTPUT:
  60.                 AX = 0x0000, success
  61.  
  62.  
  63. ------- 02 - get ISDN connection info ----------------------------------
  64.  
  65.         INPUT:
  66.                 AX = 0x9002
  67.                 DX = port number
  68.                 CX = number of bytes to get from appendage
  69.                 ES:BX = ptr to ISDN info block in application space
  70.  
  71.         OUTPUT:
  72.                 AX = 0000, success
  73.                 CX = number of bytes transfered into application buffer
  74.  
  75.                 ISDN info block:
  76.  
  77.                 offset  type    description
  78.                 --------------------------------------------------------
  79.  
  80.                  0      WORD    offset   into   additional    infomation
  81.                                 elements in  bytes,  starting  from  the
  82.                                 beginning of the block
  83.                  2      DWORD   incoming call: incoming caller-id
  84.                                 outgoing call: dialed number
  85.                                 swapped far ptr to ASCIZ string, segment
  86.                                 first (!! you have to swap low and high
  87.                                 words to use this as a far ptr).
  88.                  6      BYTE    number of b-channels currently in use by
  89.                                 this port
  90.                  7      DWORD   connection characteristics
  91.                                 bit 0 = 1   b2-protocol supports control
  92.                                             flow
  93.                                 bit 1 = 1   b2-protocol  supports  error
  94.                                             correction
  95.                                 bit 2 = 0   incoming call
  96.                                         1   outgoing call
  97.                                 all other bits are reserved  for  future
  98.                                 use
  99.                 11      WORD    current CPS rate
  100.                 13      DWORD   B1 bps rate (i.e. if using V.110, the
  101.                                 V.110 bps rate)
  102.                 17      ...     additional info elements, if info  block
  103.                                 is longer than 13 bytes.
  104.  
  105.                         the  ISDN  info  block  can  contain  additional
  106.                         infomation  elements  reflecting  national  ISDN
  107.                         parameters, e.g. LLC/MSN/Subaddress/EAZ/...
  108.  
  109.                         Currently defined:
  110.                         BYTE    type 1 = 1.TR.6 (i.e. cFos for CAPI 1.1)
  111.                         BYTE    requested EAZ ('0'..'9')
  112.                         BYTE    Service Indicator
  113.                         BYTE    Additional Service Indicator
  114.  
  115.                         BYTE    type 2 = DSS1 (i.e. cFos for CAPI 2.0)
  116.                         BYTE    "requested EAZ", i.e. an index in the
  117.                                 AT&A table
  118.  
  119.         NOTE:
  120.               See special handling for Windows and OS/2 below.
  121.  
  122.  
  123. ------- 03 - get charging info -----------------------------------------
  124.  
  125.         INPUT:
  126.                 AX = 0x9003
  127.                 DX = port
  128.                 BX = no of b-channel of this port
  129.                      (0=main channel, 1=first aux channel...)
  130.                      ffff = sum of all charges on all channels,
  131.                             independant of carrier status
  132.  
  133.         OUTPUT:
  134.                 AX = 0000, success
  135.                      0001, no valid b-channel
  136.                 BX = num. of charges used for current connection
  137.                 CX = num. of seconds remaining in current charging  unit
  138.                      (valid after  2nd  charging  unit,  otherwise  link
  139.                      duration in seconds)
  140.  
  141.                 Note: If no connection is active this  function  can  be
  142.                       called with BX = 0 (as well as BX = 0xffff).  Then
  143.                       it returns CX = 0  and  BX  the  total  number  of
  144.                       charging  unit  of  the  last  call  (main  +  aux
  145.                       channels)
  146.  
  147.  
  148. ------- 04 - add/remove b-channel --------------------------------------
  149.  
  150.         INPUT:
  151.                 AX = 0x9004
  152.                 DX = port
  153.                 BX = 1 -> add, 2 -> remove
  154.  
  155.         OUTPUT:
  156.                 AX = 0000, success
  157.                      0001, no active connection
  158.                      0002, connect/disconnect already in progress
  159.                      0003, not available in this version
  160.  
  161.                 After a  call  to  this  function,  'cFos'  initiates  a
  162.                 connect/disconnect sequence. During  this  sequence  all
  163.                 calls  to  this  function  result  in  error  0002.  The
  164.                 completion can be determined by monitoring the number  B
  165.                 channels in use.
  166.                 Note: Dynamic CCB will be switched to  static  CCB  when
  167.                 this function is called.
  168.  
  169.         NOTE:
  170. {++}            This  function  is  only  available  in  the  'cFos/Pro'
  171.                 version.
  172.  
  173.  
  174. ------- 05 - get ISDN time/date ----------------------------------------
  175.  
  176.         INPUT:
  177.                 AX = 0x9005
  178.                 BX = 0000
  179.  
  180.         OUTPUT:
  181.                 AX = 0000, success
  182.                 CX:BX = difference between ISDN time and local  time  in
  183.                         seconds. CX = most significant word. The correct
  184.                         time is DOS_TIME_IN_SECS + CX:BX. I.e. if  CX:BX
  185.                         is negative, your  computer  is  ahead  of  ISDN
  186.                         time. 'cFos' clears its timediff variable  after
  187.                         a call to this function.
  188.  
  189.  
  190. ------- 06 - set statusline number/mode --------------------------------
  191.  
  192.         INPUT:
  193.                 AX = 0x9006
  194.                 BX = statusline display mode (like AT&D)
  195.                 CX = line number
  196.                 DX = port
  197.  
  198.         OUTPUT:
  199.                 AX = 0000, success
  200.                      ffff, bad parameter in BX
  201.  
  202.  
  203. ------- 07 - clear charging info ---------------------------------------
  204.  
  205.         INPUT:
  206.                 AX = 0x9007
  207.                 DX = port
  208.                 BX = no of b-channel of this port
  209.                      (0=main channel, 1=first aux channel...)
  210.                      ffff = sum of all charges on all channels,
  211.                             independant of carrier status
  212.  
  213.         OUTPUT:
  214.                 AX = 0000, success
  215.                      0001, no valid b-channel
  216.                 BX, CX charging info, see function 03
  217.  
  218. ========================================================================
  219.  
  220.  
  221.         Example .ASM code for MS-DOS:
  222.  
  223.            ; set statusline to line 0 and switch it on on port 0
  224.            mov     ax,09006h               ; function code
  225.            mov     bx,1                    ; mode: on while init'ed
  226.            mov     cx,0                    ; linenumber
  227.            mov     dx,0                    ; port number
  228.            int     14h
  229.  
  230.  
  231.         Example (Microsoft) C code for MS-DOS:
  232.  
  233.            {
  234.               union REGS r;
  235.  
  236.               r.x.ax = 0x9006;             /* set statusline */
  237.               r.x.dx = 0;                  /* port */
  238.               r.x.bx = 1;                  /* mode */
  239.               r.x.cx = 0;                  /* linenumber */
  240.               int86 (0x14, &r, &r);
  241.            }
  242.  
  243.  
  244. ========================================================================
  245.  
  246.  
  247.         Windows 16-bit:
  248.  
  249.  
  250.         The prototype of the exported appendage function  CFOS_APPENDAGE
  251.         is:
  252.            int FAR PASCAL cfos_appendage (short func, short cid,
  253.            dword BX, word CX, word FAR * newBX, word FAR * newCX);
  254.  
  255.         This function is used very similar to the way the DOS  appendage
  256.         is called.  The  mentioned  register  names  correspond  to  the
  257.         registers used for the DOS appendage calls.
  258.  
  259.         The parameters are used as follows:
  260.  
  261.            func: corresponding AL value (func = 0...6 is valid)
  262.            cid:  COM-Port (0=COM1, 1=COM2, ...)
  263.            BX:   dword, lower word is used as corresponding BX value,
  264.                  higher word is used as corresponding ES value, where
  265.                  applicable
  266.            CX:   correspondig CX value
  267.            newBX,
  268.            newCX: pointers to words, where results can be stored. They
  269.                  represent the corresponding output register values of
  270.                  BX and CX.
  271.            The return value of this function is the corresponding output
  272.            AX register value.
  273.  
  274.  
  275. ========================================================================
  276.  
  277.  
  278.         cFos appendage under OS/2:
  279.  
  280.  
  281.         Open a port driven by cFos with IOCTL  category  0x90,  function
  282.         code 0x42 and use the following parameter and data buffers:
  283.  
  284.         Call parameter struct:
  285.  
  286.            typedef struct {
  287.               word ax, bx, cx, _res1, _res2, _res3;
  288.               word buflen;
  289.            } APPCALL;
  290.  
  291.         Return data struct:
  292.  
  293.            typedef struct {
  294.               word ax, bx, cx, dx, _res2, _res3;
  295.               char buffer[1];
  296.            } APPRET;
  297.  
  298.         'word' is an unsigned 16-bit integer.
  299.  
  300.         You MUST specify structs of at least this length, regardless  of
  301.         which function you're calling.
  302.  
  303.         The register values of the above listed cFos appendage  function
  304.         calls are to be written to the structure members.
  305.  
  306.         Function 0x02 is special: you must  provide  a  buffer  in  your
  307.         return data structure and note the length of that buffer in  the
  308.         call data structure member  'buflen'.  cFos  will  write  up  to
  309.         'buflen' bytes to the return data structure. The ES:BX parameter
  310.         of the FOSSIL ISDN appendage is ignored.
  311.  
  312.         If possible, use 32bit DosDevIOCtl2; if not, use DosDevIOCtl. Be
  313.         sure to provide at least a parameter buffer of 14  bytes  and  a
  314.         data buffer of 12 bytes. Otherwise, cFos/2 may reject  the  call
  315.         with an error.
  316.  
  317.  
  318.  
  319. ========================================================================
  320.