Changeset 745 for trunk/server/source4/lib/messaging/irpc.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source4/lib/messaging/irpc.h
r414 r745 25 25 #include "lib/messaging/messaging.h" 26 26 #include "librpc/gen_ndr/irpc.h" 27 #include "librpc/gen_ndr/server_id.h"28 27 29 28 /* … … 36 35 struct ndr_pull *ndr; 37 36 bool defer_reply; 37 bool no_reply; 38 38 struct messaging_context *msg_ctx; 39 39 struct irpc_list *irpc; … … 43 43 44 44 /* don't allow calls to take too long */ 45 #define IRPC_CALL_TIMEOUT 10 45 #define IRPC_CALL_TIMEOUT 10 46 /* wait for the calls as long as it takes */ 47 #define IRPC_CALL_TIMEOUT_INF 0 46 48 47 49 … … 55 57 (irpc_function_t)function, private_data) 56 58 57 /* make a irpc call */ 58 #define IRPC_CALL(msg_ctx, server_id, pipename, funcname, ptr, ctx) \ 59 irpc_call(msg_ctx, server_id, &ndr_table_ ## pipename, NDR_ ## funcname, ptr, ctx) 60 61 #define IRPC_CALL_SEND(msg_ctx, server_id, pipename, funcname, ptr, ctx) \ 62 irpc_call_send(msg_ctx, server_id, &ndr_table_ ## pipename, NDR_ ## funcname, ptr, ctx) 63 64 65 /* 66 a pending irpc call 67 */ 68 struct irpc_request { 69 struct messaging_context *msg_ctx; 70 const struct ndr_interface_table *table; 71 int callnum; 72 int callid; 73 void *r; 74 NTSTATUS status; 75 bool done; 76 bool reject_free; 77 TALLOC_CTX *mem_ctx; 78 struct { 79 void (*fn)(struct irpc_request *); 80 void *private_data; 81 } async; 82 }; 83 84 struct loadparm_context; 85 86 typedef void (*msg_callback_t)(struct messaging_context *msg, void *private_data, 87 uint32_t msg_type, 88 struct server_id server_id, DATA_BLOB *data); 89 90 NTSTATUS messaging_send(struct messaging_context *msg, struct server_id server, 91 uint32_t msg_type, DATA_BLOB *data); 92 NTSTATUS messaging_register(struct messaging_context *msg, void *private_data, 93 uint32_t msg_type, 94 msg_callback_t fn); 95 NTSTATUS messaging_register_tmp(struct messaging_context *msg, void *private_data, 96 msg_callback_t fn, uint32_t *msg_type); 97 struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, 98 const char *dir, 99 struct server_id server_id, 100 struct smb_iconv_convenience *iconv_convenience, 101 struct tevent_context *ev); 102 struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx, 103 const char *dir, 104 struct smb_iconv_convenience *iconv_convenience, 105 struct tevent_context *ev); 106 NTSTATUS messaging_send_ptr(struct messaging_context *msg, struct server_id server, 107 uint32_t msg_type, void *ptr); 108 void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void *private_data); 109 110 111 59 struct ndr_interface_table; 112 60 113 61 NTSTATUS irpc_register(struct messaging_context *msg_ctx, 114 62 const struct ndr_interface_table *table, 115 63 int call, irpc_function_t fn, void *private_data); 116 struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx, 117 struct server_id server_id, 118 const struct ndr_interface_table *table, 119 int callnum, void *r, TALLOC_CTX *ctx); 120 NTSTATUS irpc_call_recv(struct irpc_request *irpc); 121 NTSTATUS irpc_call(struct messaging_context *msg_ctx, 122 struct server_id server_id, 123 const struct ndr_interface_table *table, 124 int callnum, void *r, TALLOC_CTX *ctx); 64 65 struct dcerpc_binding_handle *irpc_binding_handle(TALLOC_CTX *mem_ctx, 66 struct messaging_context *msg_ctx, 67 struct server_id server_id, 68 const struct ndr_interface_table *table); 69 struct dcerpc_binding_handle *irpc_binding_handle_by_name(TALLOC_CTX *mem_ctx, 70 struct messaging_context *msg_ctx, 71 const char *dest_task, 72 const struct ndr_interface_table *table); 73 void irpc_binding_handle_add_security_token(struct dcerpc_binding_handle *h, 74 struct security_token *token); 125 75 126 76 NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name); … … 128 78 void irpc_remove_name(struct messaging_context *msg_ctx, const char *name); 129 79 NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status); 130 struct server_id messaging_get_server_id(struct messaging_context *msg_ctx);131 80 132 81 #endif
Note:
See TracChangeset
for help on using the changeset viewer.