/dcerpc/ncklib/comprot.h

https://github.com/BeyondTrust/pbis-open · C Header · 348 lines · 232 code · 47 blank · 69 comment · 0 complexity · 0dfd6e71ab94fec6352ade3e2a239359 MD5 · raw file

  1. /*
  2. *
  3. * (c) Copyright 1989 OPEN SOFTWARE FOUNDATION, INC.
  4. * (c) Copyright 1989 HEWLETT-PACKARD COMPANY
  5. * (c) Copyright 1989 DIGITAL EQUIPMENT CORPORATION
  6. * To anyone who acknowledges that this file is provided "AS IS"
  7. * without any express or implied warranty:
  8. * permission to use, copy, modify, and distribute this
  9. * file for any purpose is hereby granted without fee, provided that
  10. * the above copyright notices and this notice appears in all source
  11. * code copies, and that none of the names of Open Software
  12. * Foundation, Inc., Hewlett-Packard Company, or Digital Equipment
  13. * Corporation be used in advertising or publicity pertaining to
  14. * distribution of the software without specific, written prior
  15. * permission. Neither Open Software Foundation, Inc., Hewlett-
  16. * Packard Company, nor Digital Equipment Corporation makes any
  17. * representations about the suitability of this software for any
  18. * purpose.
  19. *
  20. */
  21. /*
  22. */
  23. #ifndef _COMPROT_H
  24. #define _COMPROT_H
  25. /*
  26. **
  27. ** NAME
  28. **
  29. ** comprot.h
  30. **
  31. ** FACILITY:
  32. **
  33. ** Remote Procedure Call (RPC)
  34. **
  35. ** ABSTRACT:
  36. **
  37. ** Generic interface to RPC Protocol Services.
  38. **
  39. **
  40. */
  41. #include <dce/dce.h>
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45. /***********************************************************************/
  46. /*
  47. * The Call EPV.
  48. */
  49. typedef rpc_call_rep_t *(*rpc_prot_call_start_fn_t) (
  50. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  51. unsigned32 /* in */ /*call_options*/,
  52. rpc_if_rep_p_t /* in */ /*ifspec_h*/,
  53. unsigned32 /* in */ /*opn*/,
  54. rpc_transfer_syntax_t /* in */ * /*transfer_syntax*/,
  55. unsigned32 /* out */ * /*st*/
  56. );
  57. typedef void (*rpc_prot_call_transmit_fn_t) (
  58. rpc_call_rep_p_t /* in */ /*call_r*/,
  59. rpc_iovector_p_t /* in */ /*call_args*/,
  60. unsigned32 /* out */ * /*st*/
  61. );
  62. typedef void (*rpc_prot_call_transceive_fn_t) (
  63. rpc_call_rep_p_t /* in */ /*call_r*/,
  64. rpc_iovector_p_t /* in */ /*in_call_args*/,
  65. rpc_iovector_elt_t /* out */ * /*out_call_args*/,
  66. ndr_format_t /* out */ * /*remote_ndr_format*/,
  67. unsigned32 /* out */ * /*st*/
  68. );
  69. typedef void (*rpc_prot_call_receive_fn_t) (
  70. rpc_call_rep_p_t /* in */ /*call_r*/,
  71. rpc_iovector_elt_t /* out */ * /*call_args*/,
  72. unsigned32 /* out */ * /*st*/
  73. );
  74. typedef void (*rpc_prot_call_end_fn_t) (
  75. rpc_call_rep_p_t /* in,out */ * /*call_r*/,
  76. unsigned32 /* out */ * /*st*/
  77. );
  78. typedef void (*rpc_prot_call_blk_til_free_fn_t) (
  79. rpc_call_rep_p_t /* in */ /*call_r*/,
  80. unsigned32 /* out */ * /*st*/
  81. );
  82. typedef void (*rpc_prot_call_transmit_fault_fn_t) (
  83. rpc_call_rep_p_t /* in */ /*call_r*/,
  84. rpc_iovector_p_t /* in */ /*call_fault_info*/,
  85. unsigned32 /* out */ * /*st*/
  86. );
  87. typedef void (*rpc_prot_call_cancel_fn_t) (
  88. rpc_call_rep_p_t /* in */ /*call_r*/,
  89. unsigned32 /* out */ * /*st*/
  90. );
  91. typedef void (*rpc_prot_call_receive_flt_fn_t) (
  92. rpc_call_rep_p_t /* in */ /*call_r*/,
  93. rpc_iovector_elt_t /* out */ * /*fault_info*/,
  94. ndr_format_t /* out */ * /*remote_ndr_format*/,
  95. unsigned32 /* out */ * /*st*/
  96. );
  97. typedef boolean32 (*rpc_prot_call_did_mgr_execute_fn_t) (
  98. rpc_call_rep_p_t /* in */ /*call_r*/,
  99. unsigned32 /* out */ * /*st*/
  100. );
  101. typedef struct
  102. {
  103. rpc_prot_call_start_fn_t call_start;
  104. rpc_prot_call_transmit_fn_t call_transmit;
  105. rpc_prot_call_transceive_fn_t call_transceive;
  106. rpc_prot_call_receive_fn_t call_receive;
  107. rpc_prot_call_end_fn_t call_end;
  108. rpc_prot_call_blk_til_free_fn_t call_block_until_free;
  109. rpc_prot_call_transmit_fault_fn_t call_transmit_fault;
  110. rpc_prot_call_cancel_fn_t call_cancel;
  111. rpc_prot_call_receive_flt_fn_t call_receive_fault;
  112. rpc_prot_call_did_mgr_execute_fn_t call_did_mgr_execute;
  113. } rpc_prot_call_epv_t, *rpc_prot_call_epv_p_t;
  114. /***********************************************************************/
  115. /*
  116. * The Management EPV.
  117. */
  118. typedef unsigned32 (*rpc_prot_mgt_inq_call_sent_fn_t) (
  119. void
  120. );
  121. typedef unsigned32 (*rpc_prot_mgt_inq_call_rcvd_fn_t) (
  122. void
  123. );
  124. typedef unsigned32 (*rpc_prot_mgt_inq_pkts_sent_fn_t) (
  125. void
  126. );
  127. typedef unsigned32 (*rpc_prot_mgt_inq_pkts_rcvd_fn_t) (
  128. void
  129. );
  130. typedef struct
  131. {
  132. rpc_prot_mgt_inq_call_sent_fn_t mgmt_inq_calls_sent;
  133. rpc_prot_mgt_inq_call_rcvd_fn_t mgmt_inq_calls_rcvd;
  134. rpc_prot_mgt_inq_pkts_sent_fn_t mgmt_inq_pkts_sent;
  135. rpc_prot_mgt_inq_pkts_rcvd_fn_t mgmt_inq_pkts_rcvd;
  136. } rpc_prot_mgmt_epv_t, *rpc_prot_mgmt_epv_p_t;
  137. /***********************************************************************/
  138. /*
  139. * The Binding EPV.
  140. */
  141. typedef rpc_binding_rep_t *(*rpc_prot_binding_alloc_fn_t) (
  142. boolean32 /* in */ /*is_server*/,
  143. unsigned32 /* out */ * /*st*/
  144. );
  145. typedef void (*rpc_prot_binding_init_fn_t) (
  146. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  147. unsigned32 /* out */ * /*st*/
  148. );
  149. typedef void (*rpc_prot_binding_reset_fn_t) (
  150. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  151. unsigned32 /* out */ * /*st*/
  152. );
  153. typedef void (*rpc_prot_binding_changed_fn_t) (
  154. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  155. unsigned32 /* out */ * /*st*/
  156. );
  157. typedef void (*rpc_prot_binding_free_fn_t) (
  158. rpc_binding_rep_p_t /* in,out */ * /*binding_r*/,
  159. unsigned32 /* out */ * /*st*/
  160. );
  161. typedef void (*rpc_prot_binding_inq_addr_fn_t) (
  162. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  163. rpc_addr_p_t /* out */ * /*rpc_addr*/,
  164. unsigned32 /* out */ * /*st*/
  165. );
  166. typedef void (*rpc_prot_binding_inq_client_fn_t) (
  167. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  168. rpc_client_handle_t /* out */ * /*client_h*/,
  169. unsigned32 /* out */ * /*st*/
  170. );
  171. typedef void (*rpc_prot_binding_copy_fn_t) (
  172. rpc_binding_rep_p_t /* in */ /*src_binding_r*/,
  173. rpc_binding_rep_p_t /* in */ /*dst_binding_r*/,
  174. unsigned32 /* out */ * /*st*/
  175. );
  176. typedef void (*rpc_prot_binding_cross_fork_fn_t) (
  177. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  178. unsigned32 /* out */ * /*st*/
  179. );
  180. typedef struct
  181. {
  182. rpc_prot_binding_alloc_fn_t binding_alloc;
  183. rpc_prot_binding_init_fn_t binding_init;
  184. rpc_prot_binding_reset_fn_t binding_reset;
  185. rpc_prot_binding_changed_fn_t binding_changed;
  186. rpc_prot_binding_free_fn_t binding_free;
  187. rpc_prot_binding_inq_addr_fn_t binding_inq_addr;
  188. rpc_prot_binding_inq_client_fn_t binding_inq_client;
  189. rpc_prot_binding_copy_fn_t binding_copy;
  190. rpc_prot_binding_cross_fork_fn_t binding_cross_fork;
  191. } rpc_prot_binding_epv_t, *rpc_prot_binding_epv_p_t;
  192. /***********************************************************************/
  193. /*
  194. * The Network EPV.
  195. */
  196. typedef void (*rpc_prot_net_use_protseq_fn_t) (
  197. rpc_protseq_id_t /* in */ /*pseq_id*/,
  198. unsigned32 /* in */ /*max_calls*/,
  199. rpc_addr_p_t /* in */ /*rpc_addr*/,
  200. unsigned_char_p_t /* in */ /*endpoint*/,
  201. unsigned32 /* out */ * /*st*/
  202. );
  203. typedef void (*rpc_prot_net_mon_fn_t) (
  204. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  205. rpc_client_handle_t /* in */ /*client_h*/,
  206. rpc_network_rundown_fn_t /* in */ /*rundown*/,
  207. unsigned32 /* out */ * /*st*/
  208. );
  209. typedef void (*rpc_prot_net_stop_mon_fn_t) (
  210. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  211. rpc_client_handle_t /* in */ /*client_h*/,
  212. unsigned32 /* out */ * /*st*/
  213. );
  214. typedef void (*rpc_prot_net_maint_fn_t) (
  215. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  216. unsigned32 /* out */ * /*st*/
  217. );
  218. typedef void (*rpc_prot_net_stop_maint_fn_t) (
  219. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  220. unsigned32 /* out */ * /*st*/
  221. );
  222. typedef void (*rpc_prot_net_close_fn_t) (
  223. rpc_binding_rep_p_t /* in */ /*binding_r*/,
  224. unsigned32 /* out */ * /*st*/
  225. );
  226. typedef void (*rpc_prot_net_select_disp_fn_t) (
  227. rpc_socket_t /* in */ /*desc*/,
  228. pointer_t /* in */ /*priv_info*/,
  229. boolean32 /* in */ /*is_active*/,
  230. unsigned32 /* out */ * /*st*/
  231. );
  232. typedef void (*rpc_prot_net_inq_prot_vers_fn_t) (
  233. unsigned8 /* out */ * /*prot_id*/,
  234. unsigned32 /* out */ * /*version_major*/,
  235. unsigned32 /* out */ * /*version_minor*/,
  236. unsigned32 /* out */ * /*st*/
  237. );
  238. typedef struct
  239. {
  240. rpc_prot_net_use_protseq_fn_t network_use_protseq;
  241. rpc_prot_net_mon_fn_t network_mon;
  242. rpc_prot_net_stop_mon_fn_t network_stop_mon;
  243. rpc_prot_net_maint_fn_t network_maint;
  244. rpc_prot_net_stop_maint_fn_t network_stop_maint;
  245. rpc_prot_net_select_disp_fn_t network_select_disp;
  246. rpc_prot_net_inq_prot_vers_fn_t network_inq_prot_vers;
  247. rpc_prot_net_close_fn_t network_close;
  248. } rpc_prot_network_epv_t, *rpc_prot_network_epv_p_t;
  249. /***********************************************************************/
  250. /*
  251. * Signature of the fork handling routines.
  252. *
  253. */
  254. typedef void (*rpc_prot_fork_handler_fn_t) (
  255. rpc_fork_stage_id_t operation
  256. );
  257. /***********************************************************************/
  258. /*
  259. * Signature of the init routine provided.
  260. *
  261. * Note: double underscores were added to these names just to diffrentiate
  262. * them from the names of structure members that bother VAXC
  263. */
  264. typedef void (*rpc_prot_init_fn_t) (
  265. rpc_prot_call_epv_p_t * /*call__epv*/,
  266. rpc_prot_mgmt_epv_p_t * /*mgmt__epv*/,
  267. rpc_prot_binding_epv_p_t * /*binding__epv*/,
  268. rpc_prot_network_epv_p_t * /*network__epv*/,
  269. rpc_prot_fork_handler_fn_t * /*fork_handler*/,
  270. unsigned32 * /*st*/
  271. );
  272. /*
  273. * Declarations of the RPC Protocol Service init routines.
  274. */
  275. void rpc__ncacn_init (
  276. rpc_prot_call_epv_p_t * /*call_epv*/,
  277. rpc_prot_mgmt_epv_p_t * /*mgmt_epv*/,
  278. rpc_prot_binding_epv_p_t * /*binding_epv*/,
  279. rpc_prot_network_epv_p_t * /*network_epv*/,
  280. rpc_prot_fork_handler_fn_t * /*fork_handler*/,
  281. unsigned32 * /*st*/
  282. );
  283. void rpc__ncadg_init (
  284. rpc_prot_call_epv_p_t * /*call_epv*/,
  285. rpc_prot_mgmt_epv_p_t * /*mgmt_epv*/,
  286. rpc_prot_binding_epv_p_t * /*binding_epv*/,
  287. rpc_prot_network_epv_p_t * /*network_epv*/,
  288. rpc_prot_fork_handler_fn_t * /*fork_handler*/,
  289. unsigned32 * /*st*/
  290. );
  291. void rpc__ncatp_init (
  292. rpc_prot_call_epv_p_t * /*call_epv*/,
  293. rpc_prot_mgmt_epv_p_t * /*mgmt_epv*/,
  294. rpc_prot_binding_epv_p_t * /*binding_epv*/,
  295. rpc_prot_network_epv_p_t * /*network_epv*/,
  296. unsigned32 * /*st*/
  297. );
  298. #ifdef __cplusplus
  299. }
  300. #endif
  301. #endif /* _COMPROT_H */