home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / contrib / usr.x25 / nimd / nim.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-13  |  1.5 KB  |  50 lines

  1. #define LOGFILE        "/usr/spool/log/nimd_log"
  2. #define HELPFILE    "/usr/local/lib/nim/help"
  3. #define NUIFILE        "/usr/local/lib/nim/nui"
  4.  
  5. #define MAXPSIZ        (256+1)        /* maximum packet size + 1 */
  6. #define DEFAULT_PROFILE        0    /* default profile */
  7.  
  8. #define INVALID        -1    /* illegal parameter */
  9. #define NPROFILES    6    /* number of standard profiles */
  10.  
  11. #define C_FORWARD    01
  12. #define C_ERASE        02
  13. #define C_KILL        04
  14. #define C_DISPLAY    010
  15. #define C_ESCAPE    020
  16. #define C_TYPE(c)    (chartab[c&0177] & 0176)
  17. #define ISFORWARD(c)    (chartab[c&0177] & C_FORWARD)
  18.  
  19. #define ST_COMMAND    01    /* command mode */
  20. #define ST_DATA        02    /* data mode */
  21. #define ST_ESCSEEN    04    /* received nim escape character from pty */
  22. #define ST_ESCCOMM    010    /* escaped to command mode */
  23. #define ST_UGLY_50_BAUD_BREAK_IN_PROGRESS    020
  24.  
  25. #define FROMPTY        0
  26. #define FROMNET        1
  27. #define FROMNIM        2
  28.  
  29. #define MAXQSIZ        256        /* maximum number size of any queue */
  30.  
  31. short    CurrentX29Parms[128];        /* current x.29 parameter values */
  32. short    CurrentProfile;            /* current profile number (1 - 6) */
  33. short    pnums[];            /* list of valid parameter numbers */
  34. short    State;                /* NIM state (command or data) */
  35. short    OutputBlocked;            /* remote host sent ^S */
  36.  
  37. extern    short NetFd, PtyFd;
  38. extern    char Banner[];
  39.  
  40. #define CCITT1978    0
  41. #define CCITT1980    1
  42.  
  43. struct    netinfo {
  44.     short    n_type;        /* CCITT1978 or CCITT1980 */
  45.     short    n_nparms;    /* number of parameters */
  46.     short    n_psize;    /* current packet size */
  47. } NetInfo;
  48.  
  49. char    *rindex(), *strcat(), *strcpy(), *strncpy(), *rindex();
  50.