home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / modemcap / modemcap.h < prev    next >
Encoding:
Text File  |  1988-01-31  |  2.7 KB  |  59 lines

  1. /* 
  2.  *      @(#)modemcap.h  1.0
  3.  *
  4.  *      names of variables and whatnots for modemcap file
  5.  */
  6.  
  7. char    AS,             /* True if numbers dialed in ASCII, False for binary digits     */
  8.         DI,             /* True if modem can dial numbers, False otherwise              */
  9.         HC,             /* True if modem hangs up when DTR drops, False otherwise       */
  10.         TT;             /* True if modem uses touchtone by default, False for pulse     */
  11.  
  12. char    *AT,            /* Enter command state when online                              */
  13.         *CS,            /* Command start string                                         */
  14.         *CE,            /* Command end string - must be present if CS is                */
  15.         *DS,            /* Dial command string                                          */
  16.         *DE,            /* End of dial command string - must be present if DS is        */
  17.         *CO,            /* Connection made at primary baud rate                         */
  18.         *CL,            /* Connection made at secondary (lower) baud rate               */
  19.         *IS,            /* Initialization string - reset modem to onhook and ready      */
  20.         *HU;            /* Hangup command                                               */
  21.  
  22. int     AD,             /* Delay after AT string before next command                    */
  23.         BD,             /* Highest communications baud rate                             */
  24.         BL,             /* Another, lower baud rate                                     */
  25.         ID;             /* Delay time after initialization                              */
  26.  
  27. /*
  28.  * The dial command is the principle string that must be built.
  29.  * The routines will build a dial command as follows:
  30.  *
  31.  *      <CS><DS><phone-number><DE><CE>
  32.  *
  33.  * Note that the DE and CE strings are present ALWAYS.
  34.  * This procedure will be used to dial phone numbers if the DI flag is true.
  35.  * If this isn't the way to dial numbers,
  36.  * DO NOT SET DI IN THE MODEMCAP FILE!!!
  37.  */
  38.  
  39. /*
  40.  * The type of modem is determined by reading the file "_MODEMTYPE_".  This
  41.  * is similiar to the way curses works by reading the ttytype file.
  42.  */
  43.  
  44. #define    _MODEMTYPE_    "/etc/modemtype"
  45.  
  46. /*
  47.  * a hangup command will be performed as follows:
  48.  *
  49.  *      1). any attention string (AT) will be sent followed by the delay (AD)
  50.  *      2). modem should now be in command state, send hangup (HU) command
  51.  *      3). send initialization string (IS) followed by the delay (ID)
  52.  *
  53.  * It is important that you determine a correct AT and HU string
  54.  *  to perform this function.
  55.  * If the modem hangs up when DTR falls (even if there is a HU string),
  56.  *  declare the flag HC (for Hangup on Close).
  57.  */
  58.  
  59.