scioc.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #ifndef __ISDN_SC_SCIOC_H__
  2. #define __ISDN_SC_SCIOC_H__
  3. /*
  4. * This software may be used and distributed according to the terms
  5. * of the GNU General Public License, incorporated herein by reference.
  6. */
  7. /*
  8. * IOCTL Command Codes
  9. */
  10. #define SCIOCLOAD 0x01 /* Load a firmware record */
  11. #define SCIOCRESET 0x02 /* Perform hard reset */
  12. #define SCIOCDEBUG 0x03 /* Set debug level */
  13. #define SCIOCREV 0x04 /* Get driver revision(s) */
  14. #define SCIOCSTART 0x05 /* Start the firmware */
  15. #define SCIOCGETSWITCH 0x06 /* Get switch type */
  16. #define SCIOCSETSWITCH 0x07 /* Set switch type */
  17. #define SCIOCGETSPID 0x08 /* Get channel SPID */
  18. #define SCIOCSETSPID 0x09 /* Set channel SPID */
  19. #define SCIOCGETDN 0x0A /* Get channel DN */
  20. #define SCIOCSETDN 0x0B /* Set channel DN */
  21. #define SCIOCTRACE 0x0C /* Toggle trace mode */
  22. #define SCIOCSTAT 0x0D /* Get line status */
  23. #define SCIOCGETSPEED 0x0E /* Set channel speed */
  24. #define SCIOCSETSPEED 0x0F /* Set channel speed */
  25. #define SCIOCLOOPTST 0x10 /* Perform loopback test */
  26. typedef struct {
  27. int device;
  28. int channel;
  29. unsigned long command;
  30. void __user *dataptr;
  31. } scs_ioctl;
  32. /* Size of strings */
  33. #define SCIOC_SPIDSIZE 49
  34. #define SCIOC_DNSIZE SCIOC_SPIDSIZE
  35. #define SCIOC_REVSIZE SCIOC_SPIDSIZE
  36. #define SCIOC_SRECSIZE 49
  37. typedef struct {
  38. unsigned long tx_good;
  39. unsigned long tx_bad;
  40. unsigned long rx_good;
  41. unsigned long rx_bad;
  42. } ChLinkStats;
  43. typedef struct {
  44. char spid[49];
  45. char dn[49];
  46. char call_type;
  47. char phy_stat;
  48. ChLinkStats link_stats;
  49. } BRIStat;
  50. typedef BRIStat POTStat;
  51. typedef struct {
  52. char call_type;
  53. char call_state;
  54. char serv_state;
  55. char phy_stat;
  56. ChLinkStats link_stats;
  57. } PRIStat;
  58. typedef char PRIInfo;
  59. typedef char BRIInfo;
  60. typedef char POTInfo;
  61. typedef struct {
  62. char acfa_nos;
  63. char acfa_ais;
  64. char acfa_los;
  65. char acfa_rra;
  66. char acfa_slpp;
  67. char acfa_slpn;
  68. char acfa_fsrf;
  69. } ACFAStat;
  70. typedef struct {
  71. unsigned char modelid;
  72. char serial_no[13];
  73. char part_no[13];
  74. char load_ver[11];
  75. char proc_ver[11];
  76. int iobase;
  77. long rambase;
  78. char irq;
  79. long ramsize;
  80. char interface;
  81. char switch_type;
  82. char l1_status;
  83. char l2_status;
  84. ChLinkStats dch_stats;
  85. ACFAStat AcfaStats;
  86. union {
  87. PRIStat pristats[23];
  88. BRIStat bristats[2];
  89. POTStat potsstats[2];
  90. } status;
  91. union {
  92. PRIInfo priinfo;
  93. BRIInfo briinfo;
  94. POTInfo potsinfo;
  95. } info;
  96. } boardInfo;
  97. #endif /* __ISDN_SC_SCIOC_H__ */