rocket.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * rocket.h --- the exported interface of the rocket driver to its configuration program.
  3. *
  4. * Written by Theodore Ts'o, Copyright 1997.
  5. * Copyright 1997 Comtrol Corporation.
  6. *
  7. */
  8. /* Model Information Struct */
  9. typedef struct {
  10. unsigned long model;
  11. char modelString[80];
  12. unsigned long numPorts;
  13. int loadrm2;
  14. int startingPortNumber;
  15. } rocketModel_t;
  16. struct rocket_config {
  17. int line;
  18. int flags;
  19. int closing_wait;
  20. int close_delay;
  21. int port;
  22. int reserved[32];
  23. };
  24. struct rocket_ports {
  25. int tty_major;
  26. int callout_major;
  27. rocketModel_t rocketModel[8];
  28. };
  29. struct rocket_version {
  30. char rocket_version[32];
  31. char rocket_date[32];
  32. char reserved[64];
  33. };
  34. /*
  35. * Rocketport flags
  36. */
  37. #define ROCKET_CALLOUT_NOHUP 0x00000001
  38. #define ROCKET_FORCE_CD 0x00000002
  39. #define ROCKET_HUP_NOTIFY 0x00000004
  40. #define ROCKET_SPLIT_TERMIOS 0x00000008
  41. #define ROCKET_SPD_MASK 0x00000070
  42. #define ROCKET_SPD_HI 0x00000010 /* Use 56000 instead of 38400 bps */
  43. #define ROCKET_SPD_VHI 0x00000020 /* Use 115200 instead of 38400 bps */
  44. #define ROCKET_SPD_SHI 0x00000030 /* Use 230400 instead of 38400 bps */
  45. #define ROCKET_SPD_WARP 0x00000040 /* Use 460800 instead of 38400 bps */
  46. #define ROCKET_SAK 0x00000080
  47. #define ROCKET_SESSION_LOCKOUT 0x00000100
  48. #define ROCKET_PGRP_LOCKOUT 0x00000200
  49. #define ROCKET_RTS_TOGGLE 0x00000400
  50. #define ROCKET_MODE_MASK 0x00003000
  51. #define ROCKET_MODE_RS232 0x00000000
  52. #define ROCKET_MODE_RS485 0x00001000
  53. #define ROCKET_MODE_RS422 0x00002000
  54. #define ROCKET_FLAGS 0x00003FFF
  55. #define ROCKET_USR_MASK 0x0071 /* Legal flags that non-privileged
  56. * users can set or reset */
  57. /*
  58. * For closing_wait and closing_wait2
  59. */
  60. #define ROCKET_CLOSING_WAIT_NONE 65535
  61. #define ROCKET_CLOSING_WAIT_INF 0
  62. /*
  63. * Rocketport ioctls -- "RP"
  64. */
  65. #define RCKP_GET_STRUCT 0x00525001
  66. #define RCKP_GET_CONFIG 0x00525002
  67. #define RCKP_SET_CONFIG 0x00525003
  68. #define RCKP_GET_PORTS 0x00525004
  69. #define RCKP_RESET_RM2 0x00525005
  70. #define RCKP_GET_VERSION 0x00525006
  71. /* Rocketport Models */
  72. #define MODEL_RP32INTF 0x0001 /* RP 32 port w/external I/F */
  73. #define MODEL_RP8INTF 0x0002 /* RP 8 port w/external I/F */
  74. #define MODEL_RP16INTF 0x0003 /* RP 16 port w/external I/F */
  75. #define MODEL_RP8OCTA 0x0005 /* RP 8 port w/octa cable */
  76. #define MODEL_RP4QUAD 0x0004 /* RP 4 port w/quad cable */
  77. #define MODEL_RP8J 0x0006 /* RP 8 port w/RJ11 connectors */
  78. #define MODEL_RP4J 0x0007 /* RP 4 port w/RJ45 connectors */
  79. #define MODEL_RP8SNI 0x0008 /* RP 8 port w/ DB78 SNI connector */
  80. #define MODEL_RP16SNI 0x0009 /* RP 16 port w/ DB78 SNI connector */
  81. #define MODEL_RPP4 0x000A /* RP Plus 4 port */
  82. #define MODEL_RPP8 0x000B /* RP Plus 8 port */
  83. #define MODEL_RP2_232 0x000E /* RP Plus 2 port RS232 */
  84. #define MODEL_RP2_422 0x000F /* RP Plus 2 port RS232 */
  85. /* Rocketmodem II Models */
  86. #define MODEL_RP6M 0x000C /* RM 6 port */
  87. #define MODEL_RP4M 0x000D /* RM 4 port */
  88. /* Universal PCI boards */
  89. #define MODEL_UPCI_RP32INTF 0x0801 /* RP UPCI 32 port w/external I/F */
  90. #define MODEL_UPCI_RP8INTF 0x0802 /* RP UPCI 8 port w/external I/F */
  91. #define MODEL_UPCI_RP16INTF 0x0803 /* RP UPCI 16 port w/external I/F */
  92. #define MODEL_UPCI_RP8OCTA 0x0805 /* RP UPCI 8 port w/octa cable */
  93. #define MODEL_UPCI_RM3_8PORT 0x080C /* RP UPCI Rocketmodem III 8 port */
  94. #define MODEL_UPCI_RM3_4PORT 0x080C /* RP UPCI Rocketmodem III 4 port */
  95. /* Compact PCI 16 port */
  96. #define MODEL_CPCI_RP16INTF 0x0903 /* RP Compact PCI 16 port w/external I/F */
  97. /* All ISA boards */
  98. #define MODEL_ISA 0x1000