sdla.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * INET An implementation of the TCP/IP protocol suite for the LINUX
  3. * operating system. INET is implemented using the BSD Socket
  4. * interface as the means of communication with the user level.
  5. *
  6. * Global definitions for the Frame relay interface.
  7. *
  8. * Version: @(#)if_ifrad.h 0.20 13 Apr 96
  9. *
  10. * Author: Mike McLagan <mike.mclagan@linux.org>
  11. *
  12. * Changes:
  13. * 0.15 Mike McLagan Structure packing
  14. *
  15. * 0.20 Mike McLagan New flags for S508 buffer handling
  16. *
  17. * This program is free software; you can redistribute it and/or
  18. * modify it under the terms of the GNU General Public License
  19. * as published by the Free Software Foundation; either version
  20. * 2 of the License, or (at your option) any later version.
  21. */
  22. #ifndef SDLA_H
  23. #define SDLA_H
  24. /* adapter type */
  25. #define SDLA_TYPES
  26. #define SDLA_S502A 5020
  27. #define SDLA_S502E 5021
  28. #define SDLA_S503 5030
  29. #define SDLA_S507 5070
  30. #define SDLA_S508 5080
  31. #define SDLA_S509 5090
  32. #define SDLA_UNKNOWN -1
  33. /* port selection flags for the S508 */
  34. #define SDLA_S508_PORT_V35 0x00
  35. #define SDLA_S508_PORT_RS232 0x02
  36. /* Z80 CPU speeds */
  37. #define SDLA_CPU_3M 0x00
  38. #define SDLA_CPU_5M 0x01
  39. #define SDLA_CPU_7M 0x02
  40. #define SDLA_CPU_8M 0x03
  41. #define SDLA_CPU_10M 0x04
  42. #define SDLA_CPU_16M 0x05
  43. #define SDLA_CPU_12M 0x06
  44. /* some private IOCTLs */
  45. #define SDLA_IDENTIFY (FRAD_LAST_IOCTL + 1)
  46. #define SDLA_CPUSPEED (FRAD_LAST_IOCTL + 2)
  47. #define SDLA_PROTOCOL (FRAD_LAST_IOCTL + 3)
  48. #define SDLA_CLEARMEM (FRAD_LAST_IOCTL + 4)
  49. #define SDLA_WRITEMEM (FRAD_LAST_IOCTL + 5)
  50. #define SDLA_READMEM (FRAD_LAST_IOCTL + 6)
  51. struct sdla_mem {
  52. int addr;
  53. int len;
  54. void *data;
  55. };
  56. #define SDLA_START (FRAD_LAST_IOCTL + 7)
  57. #define SDLA_STOP (FRAD_LAST_IOCTL + 8)
  58. /* some offsets in the Z80's memory space */
  59. #define SDLA_NMIADDR 0x0000
  60. #define SDLA_CONF_ADDR 0x0010
  61. #define SDLA_S502A_NMIADDR 0x0066
  62. #define SDLA_CODE_BASEADDR 0x0100
  63. #define SDLA_WINDOW_SIZE 0x2000
  64. #define SDLA_ADDR_MASK 0x1FFF
  65. /* largest handleable block of data */
  66. #define SDLA_MAX_DATA 4080
  67. #define SDLA_MAX_MTU 4072 /* MAX_DATA - sizeof(fradhdr) */
  68. #define SDLA_MAX_DLCI 24
  69. /* this should be the same as frad_conf */
  70. struct sdla_conf {
  71. short station;
  72. short config;
  73. short kbaud;
  74. short clocking;
  75. short max_frm;
  76. short T391;
  77. short T392;
  78. short N391;
  79. short N392;
  80. short N393;
  81. short CIR_fwd;
  82. short Bc_fwd;
  83. short Be_fwd;
  84. short CIR_bwd;
  85. short Bc_bwd;
  86. short Be_bwd;
  87. };
  88. /* this should be the same as dlci_conf */
  89. struct sdla_dlci_conf {
  90. short config;
  91. short CIR_fwd;
  92. short Bc_fwd;
  93. short Be_fwd;
  94. short CIR_bwd;
  95. short Bc_bwd;
  96. short Be_bwd;
  97. short Tc_fwd;
  98. short Tc_bwd;
  99. short Tf_max;
  100. short Tb_max;
  101. };
  102. #endif /* SDLA_H */