home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / h / econet < prev    next >
Encoding:
Text File  |  1995-08-22  |  43.3 KB  |  1,299 lines

  1. #ifndef econet_H
  2. #define econet_H
  3.  
  4. /* C header file for Econet
  5.  * written by DefMod (Jul 24 1995) on Tue Aug 22 14:43:17 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. /**********************************
  18.  * SWI names and SWI reason codes *
  19.  **********************************/
  20. #undef  Econet_CreateReceive
  21. #define Econet_CreateReceive                    0x40000
  22. #undef  XEconet_CreateReceive
  23. #define XEconet_CreateReceive                   0x60000
  24. #undef  Econet_ExamineReceive
  25. #define Econet_ExamineReceive                   0x40001
  26. #undef  XEconet_ExamineReceive
  27. #define XEconet_ExamineReceive                  0x60001
  28. #undef  Econet_ReadReceive
  29. #define Econet_ReadReceive                      0x40002
  30. #undef  XEconet_ReadReceive
  31. #define XEconet_ReadReceive                     0x60002
  32. #undef  Econet_AbandonReceive
  33. #define Econet_AbandonReceive                   0x40003
  34. #undef  XEconet_AbandonReceive
  35. #define XEconet_AbandonReceive                  0x60003
  36. #undef  Econet_WaitForReception
  37. #define Econet_WaitForReception                 0x40004
  38. #undef  XEconet_WaitForReception
  39. #define XEconet_WaitForReception                0x60004
  40. #undef  Econet_EnumerateReceive
  41. #define Econet_EnumerateReceive                 0x40005
  42. #undef  XEconet_EnumerateReceive
  43. #define XEconet_EnumerateReceive                0x60005
  44. #undef  Econet_StartTransmit
  45. #define Econet_StartTransmit                    0x40006
  46. #undef  XEconet_StartTransmit
  47. #define XEconet_StartTransmit                   0x60006
  48. #undef  Econet_PollTransmit
  49. #define Econet_PollTransmit                     0x40007
  50. #undef  XEconet_PollTransmit
  51. #define XEconet_PollTransmit                    0x60007
  52. #undef  Econet_AbandonTransmit
  53. #define Econet_AbandonTransmit                  0x40008
  54. #undef  XEconet_AbandonTransmit
  55. #define XEconet_AbandonTransmit                 0x60008
  56. #undef  Econet_DoTransmit
  57. #define Econet_DoTransmit                       0x40009
  58. #undef  XEconet_DoTransmit
  59. #define XEconet_DoTransmit                      0x60009
  60. #undef  Econet_ReadLocalStationAndNet
  61. #define Econet_ReadLocalStationAndNet           0x4000A
  62. #undef  XEconet_ReadLocalStationAndNet
  63. #define XEconet_ReadLocalStationAndNet          0x6000A
  64. #undef  Econet_ConvertStatusToString
  65. #define Econet_ConvertStatusToString            0x4000B
  66. #undef  XEconet_ConvertStatusToString
  67. #define XEconet_ConvertStatusToString           0x6000B
  68. #undef  Econet_ConvertStatusToError
  69. #define Econet_ConvertStatusToError             0x4000C
  70. #undef  XEconet_ConvertStatusToError
  71. #define XEconet_ConvertStatusToError            0x6000C
  72. #undef  Econet_ReadProtection
  73. #define Econet_ReadProtection                   0x4000D
  74. #undef  XEconet_ReadProtection
  75. #define XEconet_ReadProtection                  0x6000D
  76. #undef  Econet_SetProtection
  77. #define Econet_SetProtection                    0x4000E
  78. #undef  XEconet_SetProtection
  79. #define XEconet_SetProtection                   0x6000E
  80. #undef  Econet_ReadStationNumber
  81. #define Econet_ReadStationNumber                0x4000F
  82. #undef  XEconet_ReadStationNumber
  83. #define XEconet_ReadStationNumber               0x6000F
  84. #undef  Econet_PrintBanner
  85. #define Econet_PrintBanner                      0x40010
  86. #undef  XEconet_PrintBanner
  87. #define XEconet_PrintBanner                     0x60010
  88. #undef  Econet_ReadTransportType
  89. #define Econet_ReadTransportType                0x40011
  90. #undef  XEconet_ReadTransportType
  91. #define XEconet_ReadTransportType               0x60011
  92. #undef  Econet_ReleasePort
  93. #define Econet_ReleasePort                      0x40012
  94. #undef  XEconet_ReleasePort
  95. #define XEconet_ReleasePort                     0x60012
  96. #undef  Econet_AllocatePort
  97. #define Econet_AllocatePort                     0x40013
  98. #undef  XEconet_AllocatePort
  99. #define XEconet_AllocatePort                    0x60013
  100. #undef  Econet_DeAllocatePort
  101. #define Econet_DeAllocatePort                   0x40014
  102. #undef  XEconet_DeAllocatePort
  103. #define XEconet_DeAllocatePort                  0x60014
  104. #undef  Econet_ClaimPort
  105. #define Econet_ClaimPort                        0x40015
  106. #undef  XEconet_ClaimPort
  107. #define XEconet_ClaimPort                       0x60015
  108. #undef  Econet_StartImmediate
  109. #define Econet_StartImmediate                   0x40016
  110. #undef  XEconet_StartImmediate
  111. #define XEconet_StartImmediate                  0x60016
  112. #undef  Econet_DoImmediate
  113. #define Econet_DoImmediate                      0x40017
  114. #undef  XEconet_DoImmediate
  115. #define XEconet_DoImmediate                     0x60017
  116. #undef  Econet_AbandonAndReadReceive
  117. #define Econet_AbandonAndReadReceive            0x40018
  118. #undef  XEconet_AbandonAndReadReceive
  119. #define XEconet_AbandonAndReadReceive           0x60018
  120. #undef  Econet_Version
  121. #define Econet_Version                          0x40019
  122. #undef  XEconet_Version
  123. #define XEconet_Version                         0x60019
  124. #undef  Econet_NetworkState
  125. #define Econet_NetworkState                     0x4001A
  126. #undef  XEconet_NetworkState
  127. #define XEconet_NetworkState                    0x6001A
  128. #undef  Econet_PacketSize
  129. #define Econet_PacketSize                       0x4001B
  130. #undef  XEconet_PacketSize
  131. #define XEconet_PacketSize                      0x6001B
  132. #undef  Econet_ReadTransportName
  133. #define Econet_ReadTransportName                0x4001C
  134. #undef  XEconet_ReadTransportName
  135. #define XEconet_ReadTransportName               0x6001C
  136. #undef  Econet_InetRxDirect
  137. #define Econet_InetRxDirect                     0x4001D
  138. #undef  XEconet_InetRxDirect
  139. #define XEconet_InetRxDirect                    0x6001D
  140. #undef  Econet_EnumerateMap
  141. #define Econet_EnumerateMap                     0x4001E
  142. #undef  XEconet_EnumerateMap
  143. #define XEconet_EnumerateMap                    0x6001E
  144. #undef  Econet_EnumerateTransmit
  145. #define Econet_EnumerateTransmit                0x4001F
  146. #undef  XEconet_EnumerateTransmit
  147. #define XEconet_EnumerateTransmit               0x6001F
  148. #undef  Econet_HardwareAddresses
  149. #define Econet_HardwareAddresses                0x40020
  150. #undef  XEconet_HardwareAddresses
  151. #define XEconet_HardwareAddresses               0x60020
  152. #undef  Econet_NetworkParameters
  153. #define Econet_NetworkParameters                0x40021
  154. #undef  XEconet_NetworkParameters
  155. #define XEconet_NetworkParameters               0x60021
  156. #undef  EconetV
  157. #define EconetV                                 0x21
  158. #undef  Service_ReallocatePorts
  159. #define Service_ReallocatePorts                 0x48
  160. #undef  Service_EconetDying
  161. #define Service_EconetDying                     0x56
  162. #undef  Service_ProtocolDying
  163. #define Service_ProtocolDying                   0x83
  164. #undef  Service_FindNetworkDriver
  165. #define Service_FindNetworkDriver               0x84
  166. #undef  Service_NetworkDriverStatus
  167. #define Service_NetworkDriverStatus             0x8B
  168. #undef  Event_EconetUserRPC
  169. #define Event_EconetUserRPC                     0x8
  170. #undef  Event_EconetRx
  171. #define Event_EconetRx                          0xE
  172. #undef  Event_EconetTx
  173. #define Event_EconetTx                          0xF
  174. #undef  Event_EconetOSProc
  175. #define Event_EconetOSProc                      0x10
  176.  
  177. /************************************
  178.  * Structure and union declarations *
  179.  ************************************/
  180. typedef struct econet_rx_cb_                    *econet_rx_cb;
  181. typedef struct econet_tx_cb_                    *econet_tx_cb;
  182.  
  183. /********************
  184.  * Type definitions *
  185.  ********************/
  186. typedef int econet_status;
  187.       /*Completion statuses*/
  188.  
  189. typedef int econet_immediate_op;
  190.  
  191. typedef void *econet_immediate_os_procedure;
  192.  
  193. typedef bits econet_protection;
  194.  
  195. typedef int econet_transport_type;
  196.  
  197. typedef int econet_state;
  198.  
  199. typedef int econet_action;
  200.  
  201. typedef bits econet_map_flags;
  202.  
  203. /************************
  204.  * Constant definitions *
  205.  ************************/
  206. #define econet_STATUS_TRANSMITTED               ((econet_status) 0x0u)
  207. #define econet_STATUS_LINE_JAMMED               ((econet_status) 0x1u)
  208. #define econet_STATUS_NET_ERROR                 ((econet_status) 0x2u)
  209. #define econet_STATUS_NOT_LISTENING             ((econet_status) 0x3u)
  210. #define econet_STATUS_NO_CLOCK                  ((econet_status) 0x4u)
  211. #define econet_STATUS_TX_READY                  ((econet_status) 0x5u)
  212. #define econet_STATUS_TRANSMITTING              ((econet_status) 0x6u)
  213. #define econet_STATUS_RX_READY                  ((econet_status) 0x7u)
  214. #define econet_STATUS_RECEIVING                 ((econet_status) 0x8u)
  215. #define econet_STATUS_RECEIVED                  ((econet_status) 0x9u)
  216. #define econet_STATUS_NO_REPLY                  ((econet_status) 0xAu)
  217. #define econet_STATUS_ESCAPE                    ((econet_status) 0xBu)
  218. #define econet_STATUS_NOT_PRESENT               ((econet_status) 0xCu)
  219. #define error_ECONET_TX_READY                   0x300u
  220.       /*Tx ready*/
  221. #define error_ECONET_TRANSMITTING               0x301u
  222.       /*Transmitting */
  223. #define error_ECONET_RX_READY                   0x302u
  224.       /*Receive block open*/
  225. #define error_ECONET_RECEIVING                  0x303u
  226.       /*Receiving */
  227. #define error_ECONET_RECEIVED                   0x304u
  228.       /*Received */
  229. #define error_ECONET_TRANSMITTED                0x305u
  230.       /*Transmitted OK*/
  231. #define error_ECONET_BAD_STATION                0x306u
  232.       /*Bad station number*/
  233. #define error_ECONET_BAD_NETWORK                0x307u
  234.       /*Bad network number*/
  235. #define error_ECONET_UNABLE_TO_DEFAULT          0x308u
  236.       /*Full net address required*/
  237. #define error_ECONET_BAD_PORT                   0x309u
  238.       /*Bad port number*/
  239. #define error_ECONET_BAD_CONTROL                0x30Au
  240.       /*Bad flag byte value*/
  241. #define error_ECONET_BAD_BUFFER                 0x30Bu
  242.       /*Bad buffer address*/
  243. #define error_ECONET_BAD_SIZE                   0x30Cu
  244.       /*Bad buffer size*/
  245. #define error_ECONET_BAD_MASK                   0x30Du
  246.       /*Bad mask*/
  247. #define error_ECONET_BAD_COUNT                  0x30Eu
  248.       /*Bad count*/
  249. #define error_ECONET_BAD_DELAY                  0x30Fu
  250.       /*Bad delay*/
  251. #define error_ECONET_BAD_STATUS                 0x310u
  252.       /*Bad status*/
  253. #define error_ECONET_NO_HARDWARE                0x311u
  254.       /*No Econet hardware*/
  255. #define error_ECONET_NO_ECONET                  0x312u
  256.       /*No 'Econet' installed*/
  257. #define error_ECONET_NO_MORE_DOMAINS            0x313u
  258.       /*No more domains*/
  259. #define error_ECONET_BAD_DOMAIN                 0x314u
  260.       /*Bad domain number*/
  261. #define error_ECONET_UN_REGISTERED_DOMAIN       0x315u
  262.       /*Unknown domain*/
  263. #define error_ECONET_PORT_NOT_ALLOCATED         0x316u
  264.       /*Port not already allocated*/
  265. #define error_ECONET_PORT_ALLOCATED             0x317u
  266.       /*Port not unallocated*/
  267. #define error_ECONET_NO_MORE_PORTS              0x318u
  268.       /*All ports allocated*/
  269. #define econet_IMMEDIATE_PEEK                   ((econet_immediate_op) 0x1u)
  270. #define econet_IMMEDIATE_POKE                   ((econet_immediate_op) 0x2u)
  271. #define econet_IMMEDIATE_JSR                    ((econet_immediate_op) 0x3u)
  272. #define econet_IMMEDIATE_USER_PROCEDURE_CALL    ((econet_immediate_op) 0x4u)
  273. #define econet_IMMEDIATE_OS_PROCEDURE_CALL      ((econet_immediate_op) 0x5u)
  274. #define econet_IMMEDIATE_HALT                   ((econet_immediate_op) 0x6u)
  275. #define econet_IMMEDIATE_CONTINUE               ((econet_immediate_op) 0x7u)
  276. #define econet_IMMEDIATE_MACHINE_PEEK           ((econet_immediate_op) 0x8u)
  277. #define econet_IMMEDIATE_GET_REGISTERS          ((econet_immediate_op) 0x9u)
  278. #define econet_OS_CHAR_FROM_NOTIFY              ((econet_immediate_os_procedure) 0x0u)
  279. #define econet_OS_INITIALISE_REMOTE             ((econet_immediate_os_procedure) 0x1u)
  280. #define econet_OS_GET_VIEW_PARAMETERS           ((econet_immediate_os_procedure) 0x2u)
  281. #define econet_OS_CAUSE_FATAL_ERROR             ((econet_immediate_os_procedure) 0x3u)
  282. #define econet_OS_CHAR_FROM_REMOTE              ((econet_immediate_os_procedure) 0x4u)
  283. #define econet_PROTECTION_PEEK                  ((econet_protection) 0x1u)
  284. #define econet_PROTECTION_POKE                  ((econet_protection) 0x2u)
  285. #define econet_PROTECTION_JSR                   ((econet_protection) 0x4u)
  286. #define econet_PROTECTION_USER_PROCEDURE_CALL   ((econet_protection) 0x8u)
  287. #define econet_PROTECTION_OS_PROCEDURE_CALL     ((econet_protection) 0x10u)
  288. #define econet_PROTECTION_HALT                  ((econet_protection) 0x20u)
  289. #define econet_PROTECTION_CONTINUE              ((econet_protection) 0x40u)
  290. #define econet_PROTECTION_MACHINE_PEEK          ((econet_protection) 0x80u)
  291. #define econet_PROTECTION_GET_REGISTERS         ((econet_protection) 0x100u)
  292. #define econet_PROTECTION_WRITE_CMOS            ((econet_protection) 0x80000000u)
  293. #define econet_TRANSPORT_NOT_KNOWN              ((econet_transport_type) 0x0u)
  294. #define econet_TRANSPORT_INTERNET               ((econet_transport_type) 0x1u)
  295. #define econet_TRANSPORT_ECONET                 ((econet_transport_type) 0x2u)
  296. #define econet_TRANSPORT_NEXUS                  ((econet_transport_type) 0x3u)
  297. #define econet_STATE_OK                         ((econet_state) 0x0u)
  298. #define econet_STATE_NO_CLOCK                   ((econet_state) 0x1u)
  299. #define econet_NET_FS_START_LOAD                ((econet_action) 0x10u)
  300. #define econet_NET_FS_PART_LOAD                 ((econet_action) 0x11u)
  301. #define econet_NET_FS_FINISH_LOAD               ((econet_action) 0x12u)
  302. #define econet_NET_FS_START_SAVE                ((econet_action) 0x20u)
  303. #define econet_NET_FS_PART_SAVE                 ((econet_action) 0x21u)
  304. #define econet_NET_FS_FINISH_SAVE               ((econet_action) 0x22u)
  305. #define econet_NET_FS_START_CREATE              ((econet_action) 0x30u)
  306. #define econet_NET_FS_PART_CREATE               ((econet_action) 0x31u)
  307. #define econet_NET_FS_FINISH_CREATE             ((econet_action) 0x32u)
  308. #define econet_NET_FS_START_GET_BYTES           ((econet_action) 0x40u)
  309. #define econet_NET_FS_PART_GET_BYTES            ((econet_action) 0x41u)
  310. #define econet_NET_FS_FINISH_GET_BYTES          ((econet_action) 0x42u)
  311. #define econet_NET_FS_START_PUT_BYTES           ((econet_action) 0x50u)
  312. #define econet_NET_FS_PART_PUT_BYTES            ((econet_action) 0x51u)
  313. #define econet_NET_FS_FINISH_PUT_BYTES          ((econet_action) 0x52u)
  314. #define econet_NET_FS_START_WAIT                ((econet_action) 0x60u)
  315. #define econet_NET_FS_FINISH_WAIT               ((econet_action) 0x62u)
  316. #define econet_NET_FS_START_BROADCAST_LOAD      ((econet_action) 0x70u)
  317. #define econet_NET_FS_PART_BROADCAST_LOAD       ((econet_action) 0x71u)
  318. #define econet_NET_FS_FINISH_BROADCAST_LOAD     ((econet_action) 0x72u)
  319. #define econet_NET_FS_START_BROADCAST_SAVE      ((econet_action) 0x80u)
  320. #define econet_NET_FS_PART_BROADCAST_SAVE       ((econet_action) 0x81u)
  321. #define econet_NET_FS_FINISH_BROADCAST_SAVE     ((econet_action) 0x82u)
  322. #define econet_ECONET_START_TRANSMISSION        ((econet_action) 0xC0u)
  323. #define econet_ECONET_FINISH_TRANSMISSION       ((econet_action) 0xC2u)
  324. #define econet_ECONET_START_RECEPTION           ((econet_action) 0xD0u)
  325. #define econet_ECONET_FINISH_RECEPTION          ((econet_action) 0xD2u)
  326. #define econet_SECOND                           4000000
  327.       /*1s in Econet units*/
  328. #define econet_KHZ                              1
  329.       /*1kHz in Econet units*/
  330.  
  331. /*************************
  332.  * Function declarations *
  333.  *************************/
  334.  
  335. #ifdef __cplusplus
  336.    extern "C" {
  337. #endif
  338.  
  339. /* ------------------------------------------------------------------------
  340.  * Function:      econet_create_receive()
  341.  *
  342.  * Description:   Creates a receive control block
  343.  *
  344.  * Input:         port - value of R0 on entry
  345.  *                station - value of R1 on entry
  346.  *                net - value of R2 on entry
  347.  *                buffer - value of R3 on entry
  348.  *                size - value of R4 on entry
  349.  *
  350.  * Output:        rx_cb - value of R0 on exit (X version only)
  351.  *                nonlocal - value of R2 on exit
  352.  *
  353.  * Returns:       R0 (non-X version only)
  354.  *
  355.  * Other notes:   Calls SWI 0x40000.
  356.  */
  357.  
  358. extern os_error *xeconet_create_receive (byte port,
  359.       byte station,
  360.       byte net,
  361.       byte *buffer,
  362.       int size,
  363.       econet_rx_cb *rx_cb,
  364.       bool *nonlocal);
  365. extern econet_rx_cb econet_create_receive (byte port,
  366.       byte station,
  367.       byte net,
  368.       byte *buffer,
  369.       int size,
  370.       bool *nonlocal);
  371.  
  372. /* ------------------------------------------------------------------------
  373.  * Function:      econet_examine_receive()
  374.  *
  375.  * Description:   Reads the status of a receive control block
  376.  *
  377.  * Input:         rx_cb - value of R0 on entry
  378.  *
  379.  * Output:        status - value of R0 on exit (X version only)
  380.  *
  381.  * Returns:       R0 (non-X version only)
  382.  *
  383.  * Other notes:   Calls SWI 0x40001.
  384.  */
  385.  
  386. extern os_error *xeconet_examine_receive (econet_rx_cb rx_cb,
  387.       econet_status *status);
  388. __swi (0x40001) econet_status econet_examine_receive (econet_rx_cb rx_cb);
  389.  
  390. /* ------------------------------------------------------------------------
  391.  * Function:      econet_read_receive()
  392.  *
  393.  * Description:   Reads information about a reception, including the size
  394.  *                of data
  395.  *
  396.  * Input:         rx_cb - value of R0 on entry
  397.  *
  398.  * Output:        status - value of R0 on exit (X version only)
  399.  *                flag - value of R1 on exit
  400.  *                port - value of R2 on exit
  401.  *                station - value of R3 on exit
  402.  *                net - value of R4 on exit
  403.  *                buffer - value of R5 on exit
  404.  *                size - value of R6 on exit
  405.  *
  406.  * Returns:       R0 (non-X version only)
  407.  *
  408.  * Other notes:   Calls SWI 0x40002.
  409.  */
  410.  
  411. extern os_error *xeconet_read_receive (econet_rx_cb rx_cb,
  412.       econet_status *status,
  413.       byte *flag,
  414.       byte *port,
  415.       byte *station,
  416.       byte *net,
  417.       byte **buffer,
  418.       int *size);
  419. extern econet_status econet_read_receive (econet_rx_cb rx_cb,
  420.       byte *flag,
  421.       byte *port,
  422.       byte *station,
  423.       byte *net,
  424.       byte **buffer,
  425.       int *size);
  426.  
  427. /* ------------------------------------------------------------------------
  428.  * Function:      econet_abandon_receive()
  429.  *
  430.  * Description:   Abandons a receive control block
  431.  *
  432.  * Input:         rx_cb - value of R0 on entry
  433.  *
  434.  * Output:        status - value of R0 on exit (X version only)
  435.  *
  436.  * Returns:       R0 (non-X version only)
  437.  *
  438.  * Other notes:   Calls SWI 0x40003.
  439.  */
  440.  
  441. extern os_error *xeconet_abandon_receive (econet_rx_cb rx_cb,
  442.       econet_status *status);
  443. __swi (0x40003) econet_status econet_abandon_receive (econet_rx_cb rx_cb);
  444.  
  445. /* ------------------------------------------------------------------------
  446.  * Function:      econet_wait_for_reception()
  447.  *
  448.  * Description:   Polls a receive control block, reads its status, and
  449.  *                abandons it
  450.  *
  451.  * Input:         rx_cb - value of R0 on entry
  452.  *                delay - value of R1 on entry
  453.  *                abort_on_escape - value of R2 on entry
  454.  *
  455.  * Output:        status - value of R0 on exit (X version only)
  456.  *                flag - value of R1 on exit
  457.  *                port - value of R2 on exit
  458.  *                station - value of R3 on exit
  459.  *                net - value of R4 on exit
  460.  *                buffer - value of R5 on exit
  461.  *                size - value of R6 on exit
  462.  *
  463.  * Returns:       R0 (non-X version only)
  464.  *
  465.  * Other notes:   Calls SWI 0x40004.
  466.  */
  467.  
  468. extern os_error *xeconet_wait_for_reception (econet_rx_cb rx_cb,
  469.       int delay,
  470.       bool abort_on_escape,
  471.       econet_status *status,
  472.       byte *flag,
  473.       byte *port,
  474.       byte *station,
  475.       byte *net,
  476.       byte **buffer,
  477.       int *size);
  478. extern econet_status econet_wait_for_reception (econet_rx_cb rx_cb,
  479.       int delay,
  480.       bool abort_on_escape,
  481.       byte *flag,
  482.       byte *port,
  483.       byte *station,
  484.       byte *net,
  485.       byte **buffer,
  486.       int *size);
  487.  
  488. /* ------------------------------------------------------------------------
  489.  * Function:      econet_enumerate_receive()
  490.  *
  491.  * Description:   Returns the handles of open receive control blocks
  492.  *
  493.  * Input:         rx_cb_no - value of R0 on entry
  494.  *
  495.  * Output:        rx_cb - value of R0 on exit (X version only)
  496.  *
  497.  * Returns:       R0 (non-X version only)
  498.  *
  499.  * Other notes:   Calls SWI 0x40005.
  500.  */
  501.  
  502. extern os_error *xeconet_enumerate_receive (int rx_cb_no,
  503.       econet_rx_cb *rx_cb);
  504. __swi (0x40005) econet_rx_cb econet_enumerate_receive (int rx_cb_no);
  505.  
  506. /* ------------------------------------------------------------------------
  507.  * Function:      econet_start_transmit()
  508.  *
  509.  * Description:   Creates a transmit control block and starts a
  510.  *                transmission
  511.  *
  512.  * Input:         flags - value of R0 on entry
  513.  *                port - value of R1 on entry
  514.  *                station - value of R2 on entry
  515.  *                net - value of R3 on entry
  516.  *                buffer - value of R4 on entry
  517.  *                size - value of R5 on entry
  518.  *                count - value of R6 on entry
  519.  *                delay - value of R7 on entry
  520.  *
  521.  * Output:        tx_cb - value of R0 on exit (X version only)
  522.  *                nonlocal - value of R4 on exit
  523.  *
  524.  * Returns:       R0 (non-X version only)
  525.  *
  526.  * Other notes:   Calls SWI 0x40006.
  527.  */
  528.  
  529. extern os_error *xeconet_start_transmit (byte flags,
  530.       byte port,
  531.       byte station,
  532.       byte net,
  533.       byte *buffer,
  534.       int size,
  535.       int count,
  536.       int delay,
  537.       econet_tx_cb *tx_cb,
  538.       bool *nonlocal);
  539. extern econet_tx_cb econet_start_transmit (byte flags,
  540.       byte port,
  541.       byte station,
  542.       byte net,
  543.       byte *buffer,
  544.       int size,
  545.       int count,
  546.       int delay,
  547.       bool *nonlocal);
  548.  
  549. /* ------------------------------------------------------------------------
  550.  * Function:      econet_poll_transmit()
  551.  *
  552.  * Description:   Reads the status of a transmit control block
  553.  *
  554.  * Input:         tx_cb - value of R0 on entry
  555.  *
  556.  * Output:        status - value of R0 on exit (X version only)
  557.  *
  558.  * Returns:       R0 (non-X version only)
  559.  *
  560.  * Other notes:   Calls SWI 0x40007.
  561.  */
  562.  
  563. extern os_error *xeconet_poll_transmit (econet_tx_cb tx_cb,
  564.       econet_status *status);
  565. __swi (0x40007) econet_status econet_poll_transmit (econet_tx_cb tx_cb);
  566.  
  567. /* ------------------------------------------------------------------------
  568.  * Function:      econet_abandon_transmit()
  569.  *
  570.  * Description:   Abandons a transmit control block
  571.  *
  572.  * Input:         tx_cb - value of R0 on entry
  573.  *
  574.  * Output:        status - value of R0 on exit (X version only)
  575.  *
  576.  * Returns:       R0 (non-X version only)
  577.  *
  578.  * Other notes:   Calls SWI 0x40008.
  579.  */
  580.  
  581. extern os_error *xeconet_abandon_transmit (econet_tx_cb tx_cb,
  582.       econet_status *status);
  583. __swi (0x40008) econet_status econet_abandon_transmit (econet_tx_cb tx_cb);
  584.  
  585. /* ------------------------------------------------------------------------
  586.  * Function:      econet_do_transmit()
  587.  *
  588.  * Description:   Creates a transmit control block, polls it, reads its
  589.  *                status, and abandons it
  590.  *
  591.  * Input:         flags - value of R0 on entry
  592.  *                port - value of R1 on entry
  593.  *                station - value of R2 on entry
  594.  *                net - value of R3 on entry
  595.  *                buffer - value of R4 on entry
  596.  *                size - value of R5 on entry
  597.  *                count - value of R6 on entry
  598.  *                delay - value of R7 on entry
  599.  *
  600.  * Output:        status - value of R0 on exit (X version only)
  601.  *                nonlocal - value of R4 on exit
  602.  *
  603.  * Returns:       R0 (non-X version only)
  604.  *
  605.  * Other notes:   Calls SWI 0x40009.
  606.  */
  607.  
  608. extern os_error *xeconet_do_transmit (byte flags,
  609.       byte port,
  610.       byte station,
  611.       byte net,
  612.       byte *buffer,
  613.       int size,
  614.       int count,
  615.       int delay,
  616.       econet_status *status,
  617.       bool *nonlocal);
  618. extern econet_status econet_do_transmit (byte flags,
  619.       byte port,
  620.       byte station,
  621.       byte net,
  622.       byte *buffer,
  623.       int size,
  624.       int count,
  625.       int delay,
  626.       bool *nonlocal);
  627.  
  628. /* ------------------------------------------------------------------------
  629.  * Function:      econet_read_local_station_and_net()
  630.  *
  631.  * Description:   Returns a computer's station number and net number
  632.  *
  633.  * Output:        station - value of R0 on exit
  634.  *                net - value of R1 on exit
  635.  *
  636.  * Other notes:   Calls SWI 0x4000A.
  637.  */
  638.  
  639. extern os_error *xeconet_read_local_station_and_net (byte *station,
  640.       byte *net);
  641. extern void econet_read_local_station_and_net (byte *station,
  642.       byte *net);
  643.  
  644. /* ------------------------------------------------------------------------
  645.  * Function:      econet_convert_status_to_string()
  646.  *
  647.  * Description:   Converts a status to a string
  648.  *
  649.  * Input:         status - value of R0 on entry
  650.  *                buffer - value of R1 on entry
  651.  *                size - value of R2 on entry
  652.  *                station - value of R3 on entry
  653.  *                net - value of R4 on entry
  654.  *
  655.  * Output:        end - value of R1 on exit (X version only)
  656.  *
  657.  * Returns:       R1 (non-X version only)
  658.  *
  659.  * Other notes:   Calls SWI 0x4000B.
  660.  */
  661.  
  662. extern os_error *xeconet_convert_status_to_string (econet_status status,
  663.       char *buffer,
  664.       int size,
  665.       byte station,
  666.       byte net,
  667.       char **end);
  668. extern char *econet_convert_status_to_string (econet_status status,
  669.       char *buffer,
  670.       int size,
  671.       byte station,
  672.       byte net);
  673.  
  674. /* ------------------------------------------------------------------------
  675.  * Function:      econet_convert_status_to_error()
  676.  *
  677.  * Description:   Converts a status to a string, and then generates an
  678.  *                error
  679.  *
  680.  * Input:         status - value of R0 on entry
  681.  *                buffer - value of R1 on entry
  682.  *                size - value of R2 on entry
  683.  *                station - value of R3 on entry
  684.  *                net - value of R4 on entry
  685.  *
  686.  * Other notes:   Calls SWI 0x4000C.
  687.  */
  688.  
  689. extern os_error *xeconet_convert_status_to_error (econet_status status,
  690.       os_error *buffer,
  691.       int size,
  692.       byte station,
  693.       byte net);
  694. extern void econet_convert_status_to_error (econet_status status,
  695.       os_error *buffer,
  696.       int size,
  697.       byte station,
  698.       byte net);
  699.  
  700. /* ------------------------------------------------------------------------
  701.  * Function:      econet_read_protection()
  702.  *
  703.  * Description:   Reads the current protection word for immediate
  704.  *                operations
  705.  *
  706.  * Output:        protection - value of R0 on exit (X version only)
  707.  *
  708.  * Returns:       R0 (non-X version only)
  709.  *
  710.  * Other notes:   Calls SWI 0x4000D.
  711.  */
  712.  
  713. extern os_error *xeconet_read_protection (econet_protection *protection);
  714. __swi (0x4000D) econet_protection econet_read_protection (void);
  715.  
  716. /* ------------------------------------------------------------------------
  717.  * Function:      econet_set_protection()
  718.  *
  719.  * Description:   Sets or reads the protection word for immediate
  720.  *                operations
  721.  *
  722.  * Input:         eor_mask - value of R0 on entry
  723.  *                and_mask - value of R1 on entry
  724.  *
  725.  * Output:        old_protection - value of R0 on exit (X version only)
  726.  *
  727.  * Returns:       R0 (non-X version only)
  728.  *
  729.  * Other notes:   Calls SWI 0x4000E.
  730.  */
  731.  
  732. extern os_error *xeconet_set_protection (econet_protection eor_mask,
  733.       econet_protection and_mask,
  734.       econet_protection *old_protection);
  735. __swi (0x4000E) econet_protection econet_set_protection (econet_protection eor_mask,
  736.       econet_protection and_mask);
  737.  
  738. /* ------------------------------------------------------------------------
  739.  * Function:      econet_read_station_number()
  740.  *
  741.  * Description:   Extracts a station and/or net number from a specified
  742.  *                string
  743.  *
  744.  * Input:         s - value of R1 on entry
  745.  *
  746.  * Output:        end - value of R1 on exit (X version only)
  747.  *                station - Station number, or -1 (not specified)
  748.  *                net - Net number, or -1 (not specified)
  749.  *
  750.  * Returns:       R1 (non-X version only)
  751.  *
  752.  * Other notes:   Calls SWI 0x4000F.
  753.  */
  754.  
  755. extern os_error *xeconet_read_station_number (char const *s,
  756.       char **end,
  757.       int *station,
  758.       int *net);
  759. extern char *econet_read_station_number (char const *s,
  760.       int *station,
  761.       int *net);
  762.  
  763. /* ------------------------------------------------------------------------
  764.  * Function:      econet_print_banner()
  765.  *
  766.  * Description:   Prints an Econet message followed by a new line
  767.  *
  768.  * Other notes:   Calls SWI 0x40010.
  769.  */
  770.  
  771. extern os_error *xeconet_print_banner (void);
  772. __swi (0x40010) void econet_print_banner (void);
  773.  
  774. /* ------------------------------------------------------------------------
  775.  * Function:      econet_read_transport_type()
  776.  *
  777.  * Description:   Returns the underlying transport type to a given station
  778.  *
  779.  * Input:         station - value of R0 on entry
  780.  *                net - value of R1 on entry
  781.  *
  782.  * Output:        transport_type - value of R2 on exit (X version only)
  783.  *
  784.  * Returns:       R2 (non-X version only)
  785.  *
  786.  * Other notes:   Calls SWI 0x40011 with R2 = 0x2.
  787.  */
  788.  
  789. extern os_error *xeconet_read_transport_type (byte station,
  790.       byte net,
  791.       econet_transport_type *transport_type);
  792. extern econet_transport_type econet_read_transport_type (byte station,
  793.       byte net);
  794.  
  795. /* ------------------------------------------------------------------------
  796.  * Function:      econet_release_port()
  797.  *
  798.  * Description:   Releases a port number that was previously claimed
  799.  *
  800.  * Input:         port - value of R0 on entry
  801.  *
  802.  * Other notes:   Calls SWI 0x40012.
  803.  */
  804.  
  805. extern os_error *xeconet_release_port (byte port);
  806. __swi (0x40012) void econet_release_port (byte port);
  807.  
  808. /* ------------------------------------------------------------------------
  809.  * Function:      econet_allocate_port()
  810.  *
  811.  * Description:   Allocates a unique port number
  812.  *
  813.  * Output:        port - value of R0 on exit (X version only)
  814.  *
  815.  * Returns:       R0 (non-X version only)
  816.  *
  817.  * Other notes:   Calls SWI 0x40013.
  818.  */
  819.  
  820. extern os_error *xeconet_allocate_port (byte *port);
  821. __swi (0x40013) byte econet_allocate_port (void);
  822.  
  823. /* ------------------------------------------------------------------------
  824.  * Function:      econet_de_allocate_port()
  825.  *
  826.  * Description:   Deallocates a port number that was previously allocated
  827.  *
  828.  * Input:         port - value of R0 on entry
  829.  *
  830.  * Other notes:   Calls SWI 0x40014.
  831.  */
  832.  
  833. extern os_error *xeconet_de_allocate_port (byte port);
  834. __swi (0x40014) void econet_de_allocate_port (byte port);
  835.  
  836. /* ------------------------------------------------------------------------
  837.  * Function:      econet_claim_port()
  838.  *
  839.  * Description:   Claims a specific port number
  840.  *
  841.  * Input:         port - value of R0 on entry
  842.  *
  843.  * Other notes:   Calls SWI 0x40015.
  844.  */
  845.  
  846. extern os_error *xeconet_claim_port (byte port);
  847. __swi (0x40015) void econet_claim_port (byte port);
  848.  
  849. /* ------------------------------------------------------------------------
  850.  * Function:      econet_start_immediate()
  851.  *
  852.  * Description:   Creates a transmit control block and starts an immediate
  853.  *                operation
  854.  *
  855.  * Input:         op_type - value of R0 on entry
  856.  *                procedure - value of R1 on entry
  857.  *                station - value of R2 on entry
  858.  *                net - value of R3 on entry
  859.  *                buffer - value of R4 on entry
  860.  *                size - value of R5 on entry
  861.  *                count - value of R6 on entry
  862.  *                delay - value of R7 on entry
  863.  *
  864.  * Output:        tx_cb - value of R0 on exit (X version only)
  865.  *                nonlocal - value of R4 on exit
  866.  *
  867.  * Returns:       R0 (non-X version only)
  868.  *
  869.  * Other notes:   Calls SWI 0x40016.
  870.  */
  871.  
  872. extern os_error *xeconet_start_immediate (econet_immediate_op op_type,
  873.       econet_immediate_os_procedure procedure,
  874.       byte station,
  875.       byte net,
  876.       byte *buffer,
  877.       int size,
  878.       int count,
  879.       int delay,
  880.       econet_tx_cb *tx_cb,
  881.       bool *nonlocal);
  882. extern econet_tx_cb econet_start_immediate (econet_immediate_op op_type,
  883.       econet_immediate_os_procedure procedure,
  884.       byte station,
  885.       byte net,
  886.       byte *buffer,
  887.       int size,
  888.       int count,
  889.       int delay,
  890.       bool *nonlocal);
  891.  
  892. /* ------------------------------------------------------------------------
  893.  * Function:      econet_do_immediate()
  894.  *
  895.  * Description:   Creates a transmit control block for an immediate
  896.  *                operation, polls it, reads its status, and abandons it
  897.  *
  898.  * Input:         op_type - value of R0 on entry
  899.  *                procedure - value of R1 on entry
  900.  *                station - value of R2 on entry
  901.  *                net - value of R3 on entry
  902.  *                buffer - value of R4 on entry
  903.  *                size - value of R5 on entry
  904.  *                count - value of R6 on entry
  905.  *                delay - value of R7 on entry
  906.  *
  907.  * Output:        status - value of R0 on exit (X version only)
  908.  *                nonlocal - value of R4 on exit
  909.  *
  910.  * Returns:       R0 (non-X version only)
  911.  *
  912.  * Other notes:   Calls SWI 0x40017.
  913.  */
  914.  
  915. extern os_error *xeconet_do_immediate (econet_immediate_op op_type,
  916.       econet_immediate_os_procedure procedure,
  917.       byte station,
  918.       byte net,
  919.       byte *buffer,
  920.       int size,
  921.       int count,
  922.       int delay,
  923.       econet_status *status,
  924.       bool *nonlocal);
  925. extern econet_status econet_do_immediate (econet_immediate_op op_type,
  926.       econet_immediate_os_procedure procedure,
  927.       byte station,
  928.       byte net,
  929.       byte *buffer,
  930.       int size,
  931.       int count,
  932.       int delay,
  933.       bool *nonlocal);
  934.  
  935. /* ------------------------------------------------------------------------
  936.  * Function:      econet_abandon_and_read_receive()
  937.  *
  938.  * Description:   Abandons a reception and returns information about it,
  939.  *                including the size of data
  940.  *
  941.  * Input:         rx_cb - value of R0 on entry
  942.  *
  943.  * Output:        status - value of R0 on exit (X version only)
  944.  *                flag - value of R1 on exit
  945.  *                port - value of R2 on exit
  946.  *                station - value of R3 on exit
  947.  *                net - value of R4 on exit
  948.  *                buffer - value of R5 on exit
  949.  *                size - value of R6 on exit
  950.  *
  951.  * Returns:       R0 (non-X version only)
  952.  *
  953.  * Other notes:   Calls SWI 0x40018.
  954.  */
  955.  
  956. extern os_error *xeconet_abandon_and_read_receive (econet_rx_cb rx_cb,
  957.       econet_status *status,
  958.       byte *flag,
  959.       byte *port,
  960.       byte *station,
  961.       byte *net,
  962.       byte **buffer,
  963.       int *size);
  964. extern econet_status econet_abandon_and_read_receive (econet_rx_cb rx_cb,
  965.       byte *flag,
  966.       byte *port,
  967.       byte *station,
  968.       byte *net,
  969.       byte **buffer,
  970.       int *size);
  971.  
  972. /* ------------------------------------------------------------------------
  973.  * Function:      econet_version()
  974.  *
  975.  * Description:   Returns the version of software for the underlying
  976.  *                transport to a given station
  977.  *
  978.  * Input:         station - value of R0 on entry
  979.  *                net - value of R1 on entry
  980.  *
  981.  * Output:        version - value of R2 on exit (X version only)
  982.  *
  983.  * Returns:       R2 (non-X version only)
  984.  *
  985.  * Other notes:   Calls SWI 0x40019.
  986.  */
  987.  
  988. extern os_error *xeconet_version (byte station,
  989.       byte net,
  990.       int *version);
  991. extern int econet_version (byte station,
  992.       byte net);
  993.  
  994. /* ------------------------------------------------------------------------
  995.  * Function:      econet_network_state()
  996.  *
  997.  * Description:   Returns the state of the underlying transport to a given
  998.  *                station
  999.  *
  1000.  * Input:         station - value of R0 on entry
  1001.  *                net - value of R1 on entry
  1002.  *
  1003.  * Output:        state - value of R2 on exit (X version only)
  1004.  *
  1005.  * Returns:       R2 (non-X version only)
  1006.  *
  1007.  * Other notes:   Calls SWI 0x4001A.
  1008.  */
  1009.  
  1010. extern os_error *xeconet_network_state (byte station,
  1011.       byte net,
  1012.       econet_state *state);
  1013. extern econet_state econet_network_state (byte station,
  1014.       byte net);
  1015.  
  1016. /* ------------------------------------------------------------------------
  1017.  * Function:      econet_packet_size()
  1018.  *
  1019.  * Description:   Returns the maximum packet size recommended on the
  1020.  *                underlying transport to a given station
  1021.  *
  1022.  * Input:         station - value of R0 on entry
  1023.  *                net - value of R1 on entry
  1024.  *
  1025.  * Output:        packet_limit - value of R2 on exit (X version only)
  1026.  *
  1027.  * Returns:       R2 (non-X version only)
  1028.  *
  1029.  * Other notes:   Calls SWI 0x4001B.
  1030.  */
  1031.  
  1032. extern os_error *xeconet_packet_size (byte station,
  1033.       byte net,
  1034.       int *packet_limit);
  1035. extern int econet_packet_size (byte station,
  1036.       byte net);
  1037.  
  1038. /* ------------------------------------------------------------------------
  1039.  * Function:      econet_read_transport_name()
  1040.  *
  1041.  * Description:   Returns the name of the underlying transport to a given
  1042.  *                station
  1043.  *
  1044.  * Input:         station - value of R0 on entry
  1045.  *                net - value of R1 on entry
  1046.  *
  1047.  * Output:        transport_name - value of R2 on exit (X version only)
  1048.  *
  1049.  * Returns:       R2 (non-X version only)
  1050.  *
  1051.  * Other notes:   Calls SWI 0x4001C.
  1052.  */
  1053.  
  1054. extern os_error *xeconet_read_transport_name (byte station,
  1055.       byte net,
  1056.       char **transport_name);
  1057. extern char *econet_read_transport_name (byte station,
  1058.       byte net);
  1059.  
  1060. /* ------------------------------------------------------------------------
  1061.  * Function:      econet_enumerate_map()
  1062.  *
  1063.  * Description:   Enumerates subnetwork addresses within an AUN site
  1064.  *                network - RISC O S 3.5+
  1065.  *
  1066.  * Input:         flags - value of R0 on entry
  1067.  *                context - value of R4 on entry
  1068.  *
  1069.  * Output:        net - value of R1 on exit
  1070.  *                net_name - value of R2 on exit
  1071.  *                ip_subnetwork_address - value of R3 on exit
  1072.  *                context_out - value of R4 on exit (X version only)
  1073.  *
  1074.  * Returns:       R4 (non-X version only)
  1075.  *
  1076.  * Other notes:   Calls SWI 0x4001E.
  1077.  */
  1078.  
  1079. extern os_error *xeconet_enumerate_map (econet_map_flags flags,
  1080.       int context,
  1081.       byte *net,
  1082.       char **net_name,
  1083.       int *ip_subnetwork_address,
  1084.       int *context_out);
  1085. extern int econet_enumerate_map (econet_map_flags flags,
  1086.       int context,
  1087.       byte *net,
  1088.       char **net_name,
  1089.       int *ip_subnetwork_address);
  1090.  
  1091. /* ------------------------------------------------------------------------
  1092.  * Function:      econet_enumerate_transmit()
  1093.  *
  1094.  * Description:   Returns the handles of open transmit blocks - RISC O S
  1095.  *                3.5+
  1096.  *
  1097.  * Input:         tx_cb_no - value of R0 on entry
  1098.  *
  1099.  * Output:        tx_cb - value of R0 on exit (X version only)
  1100.  *
  1101.  * Returns:       R0 (non-X version only)
  1102.  *
  1103.  * Other notes:   Calls SWI 0x4001F.
  1104.  */
  1105.  
  1106. extern os_error *xeconet_enumerate_transmit (int tx_cb_no,
  1107.       econet_tx_cb *tx_cb);
  1108. __swi (0x4001F) econet_tx_cb econet_enumerate_transmit (int tx_cb_no);
  1109.  
  1110. /* ------------------------------------------------------------------------
  1111.  * Function:      econet_hardware_addresses()
  1112.  *
  1113.  * Description:   Returns the address of the Econet hardware and interrupt
  1114.  *                control registers - RISC O S 3.5+
  1115.  *
  1116.  * Output:        hardware_address - value of R0 on exit
  1117.  *                register_address - value of R1 on exit
  1118.  *                register_mask - value of R2 on exit
  1119.  *
  1120.  * Other notes:   Calls SWI 0x40020.
  1121.  */
  1122.  
  1123. extern os_error *xeconet_hardware_addresses (byte **hardware_address,
  1124.       byte **register_address,
  1125.       bits *register_mask);
  1126. extern void econet_hardware_addresses (byte **hardware_address,
  1127.       byte **register_address,
  1128.       bits *register_mask);
  1129.  
  1130. /* ------------------------------------------------------------------------
  1131.  * Function:      econet_network_parameters()
  1132.  *
  1133.  * Description:   Returns the Econet clock period and frequency - RISC O S
  1134.  *                3.5+
  1135.  *
  1136.  * Output:        period - value of R0 on exit
  1137.  *                frequency - value of R1 on exit
  1138.  *
  1139.  * Other notes:   Calls SWI 0x40021.
  1140.  */
  1141.  
  1142. extern os_error *xeconet_network_parameters (int *period,
  1143.       int *frequency);
  1144. extern void econet_network_parameters (int *period,
  1145.       int *frequency);
  1146.  
  1147. /* ------------------------------------------------------------------------
  1148.  * Function:      econetv()
  1149.  *
  1150.  * Description:   Econet module vector
  1151.  *
  1152.  * Input:         action - value of R0 on entry
  1153.  *                count - value of R1 on entry
  1154.  *
  1155.  * Other notes:   Calls SWI 0x34 with R9 = 0x21.
  1156.  */
  1157.  
  1158. extern os_error *xeconetv (econet_action action,
  1159.       int count);
  1160. extern void econetv (econet_action action,
  1161.       int count);
  1162.  
  1163. /* ------------------------------------------------------------------------
  1164.  * Function:      service_reallocate_ports()
  1165.  *
  1166.  * Description:   Econet restarting
  1167.  *
  1168.  * Other notes:   Calls SWI 0x30 with R1 = 0x48.
  1169.  */
  1170.  
  1171. extern os_error *xservice_reallocate_ports (void);
  1172. extern void service_reallocate_ports (void);
  1173.  
  1174. /* ------------------------------------------------------------------------
  1175.  * Function:      service_econet_dying()
  1176.  *
  1177.  * Description:   Econet is about to leave
  1178.  *
  1179.  * Other notes:   Calls SWI 0x30 with R1 = 0x56.
  1180.  */
  1181.  
  1182. extern os_error *xservice_econet_dying (void);
  1183. extern void service_econet_dying (void);
  1184.  
  1185. /* ------------------------------------------------------------------------
  1186.  * Function:      service_protocol_dying()
  1187.  *
  1188.  * Description:   Part of the AUN driver control interface
  1189.  *
  1190.  * Other notes:   Calls SWI 0x30 with R1 = 0x83.
  1191.  */
  1192.  
  1193. extern os_error *xservice_protocol_dying (void);
  1194. extern void service_protocol_dying (void);
  1195.  
  1196. /* ------------------------------------------------------------------------
  1197.  * Function:      service_find_network_driver()
  1198.  *
  1199.  * Description:   Part of the AUN driver control interface
  1200.  *
  1201.  * Other notes:   Calls SWI 0x30 with R1 = 0x84.
  1202.  */
  1203.  
  1204. extern os_error *xservice_find_network_driver (void);
  1205. extern void service_find_network_driver (void);
  1206.  
  1207. /* ------------------------------------------------------------------------
  1208.  * Function:      service_network_driver_status()
  1209.  *
  1210.  * Description:   Part of the AUN driver control interface
  1211.  *
  1212.  * Other notes:   Calls SWI 0x30 with R1 = 0x8B.
  1213.  */
  1214.  
  1215. extern os_error *xservice_network_driver_status (void);
  1216. extern void service_network_driver_status (void);
  1217.  
  1218. /* ------------------------------------------------------------------------
  1219.  * Function:      event_econet_user_rpc()
  1220.  *
  1221.  * Description:   Econet user remote procedure event
  1222.  *
  1223.  * Input:         args - value of R1 on entry
  1224.  *                procedure - value of R2 on entry
  1225.  *                station - value of R3 on entry
  1226.  *                net - value of R4 on entry
  1227.  *
  1228.  * Other notes:   Calls SWI 0x22 with R0 = 0x8.
  1229.  */
  1230.  
  1231. extern os_error *xevent_econet_user_rpc (byte const *args,
  1232.       econet_immediate_os_procedure procedure,
  1233.       byte station,
  1234.       byte net);
  1235. extern void event_econet_user_rpc (byte const *args,
  1236.       econet_immediate_os_procedure procedure,
  1237.       byte station,
  1238.       byte net);
  1239.  
  1240. /* ------------------------------------------------------------------------
  1241.  * Function:      event_econet_rx()
  1242.  *
  1243.  * Description:   Econet receive event
  1244.  *
  1245.  * Input:         rx_cb - value of R1 on entry
  1246.  *                status - value of R2 on entry
  1247.  *
  1248.  * Other notes:   Calls SWI 0x22 with R0 = 0xE.
  1249.  */
  1250.  
  1251. extern os_error *xevent_econet_rx (econet_rx_cb rx_cb,
  1252.       econet_status status);
  1253. extern void event_econet_rx (econet_rx_cb rx_cb,
  1254.       econet_status status);
  1255.  
  1256. /* ------------------------------------------------------------------------
  1257.  * Function:      event_econet_tx()
  1258.  *
  1259.  * Description:   Econet transmit event
  1260.  *
  1261.  * Input:         tx_cb - value of R1 on entry
  1262.  *                status - value of R2 on entry
  1263.  *
  1264.  * Other notes:   Calls SWI 0x22 with R0 = 0xF.
  1265.  */
  1266.  
  1267. extern os_error *xevent_econet_tx (econet_tx_cb tx_cb,
  1268.       econet_status status);
  1269. extern void event_econet_tx (econet_tx_cb tx_cb,
  1270.       econet_status status);
  1271.  
  1272. /* ------------------------------------------------------------------------
  1273.  * Function:      event_econet_os_proc()
  1274.  *
  1275.  * Description:   Econet OS remote procedure event
  1276.  *
  1277.  * Input:         args - value of R1 on entry
  1278.  *                procedure - value of R2 on entry
  1279.  *                station - value of R3 on entry
  1280.  *                net - value of R4 on entry
  1281.  *
  1282.  * Other notes:   Calls SWI 0x22 with R0 = 0x10.
  1283.  */
  1284.  
  1285. extern os_error *xevent_econet_os_proc (byte const *args,
  1286.       econet_immediate_os_procedure procedure,
  1287.       byte station,
  1288.       byte net);
  1289. extern void event_econet_os_proc (byte const *args,
  1290.       econet_immediate_os_procedure procedure,
  1291.       byte station,
  1292.       byte net);
  1293.  
  1294. #ifdef __cplusplus
  1295.    }
  1296. #endif
  1297.  
  1298. #endif
  1299.