digi.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* Definitions for DigiBoard ditty(1) command. */
  2. #if !defined(TIOCMODG)
  3. #define TIOCMODG (('d'<<8) | 250) /* get modem ctrl state */
  4. #define TIOCMODS (('d'<<8) | 251) /* set modem ctrl state */
  5. #endif
  6. #if !defined(TIOCMSET)
  7. #define TIOCMSET (('d'<<8) | 252) /* set modem ctrl state */
  8. #define TIOCMGET (('d'<<8) | 253) /* set modem ctrl state */
  9. #endif
  10. #if !defined(TIOCMBIC)
  11. #define TIOCMBIC (('d'<<8) | 254) /* set modem ctrl state */
  12. #define TIOCMBIS (('d'<<8) | 255) /* set modem ctrl state */
  13. #endif
  14. #if !defined(TIOCSDTR)
  15. #define TIOCSDTR (('e'<<8) | 0) /* set DTR */
  16. #define TIOCCDTR (('e'<<8) | 1) /* clear DTR */
  17. #endif
  18. /************************************************************************
  19. * Ioctl command arguments for DIGI parameters.
  20. ************************************************************************/
  21. #define DIGI_GETA (('e'<<8) | 94) /* Read params */
  22. #define DIGI_SETA (('e'<<8) | 95) /* Set params */
  23. #define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params */
  24. #define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
  25. #define DIGI_GETFLOW (('e'<<8) | 99) /* Get startc/stopc flow */
  26. /* control characters */
  27. #define DIGI_SETFLOW (('e'<<8) | 100) /* Set startc/stopc flow */
  28. /* control characters */
  29. #define DIGI_GETAFLOW (('e'<<8) | 101) /* Get Aux. startc/stopc */
  30. /* flow control chars */
  31. #define DIGI_SETAFLOW (('e'<<8) | 102) /* Set Aux. startc/stopc */
  32. /* flow control chars */
  33. struct digiflow_struct {
  34. unsigned char startc; /* flow cntl start char */
  35. unsigned char stopc; /* flow cntl stop char */
  36. };
  37. typedef struct digiflow_struct digiflow_t;
  38. /************************************************************************
  39. * Values for digi_flags
  40. ************************************************************************/
  41. #define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
  42. #define DIGI_FAST 0x0002 /* Fast baud rates */
  43. #define RTSPACE 0x0004 /* RTS input flow control */
  44. #define CTSPACE 0x0008 /* CTS output flow control */
  45. #define DSRPACE 0x0010 /* DSR output flow control */
  46. #define DCDPACE 0x0020 /* DCD output flow control */
  47. #define DTRPACE 0x0040 /* DTR input flow control */
  48. #define DIGI_FORCEDCD 0x0100 /* Force carrier */
  49. #define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
  50. #define DIGI_AIXON 0x0400 /* Aux flow control in fep */
  51. /************************************************************************
  52. * Structure used with ioctl commands for DIGI parameters.
  53. ************************************************************************/
  54. struct digi_struct {
  55. unsigned short digi_flags; /* Flags (see above) */
  56. };
  57. typedef struct digi_struct digi_t;