Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/lib/messaging/irpc.h

    r414 r745  
    2525#include "lib/messaging/messaging.h"
    2626#include "librpc/gen_ndr/irpc.h"
    27 #include "librpc/gen_ndr/server_id.h"
    2827
    2928/*
     
    3635        struct ndr_pull *ndr;
    3736        bool defer_reply;
     37        bool no_reply;
    3838        struct messaging_context *msg_ctx;
    3939        struct irpc_list *irpc;
     
    4343
    4444/* 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
    4648
    4749
     
    5557                          (irpc_function_t)function, private_data)
    5658
    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 
     59struct ndr_interface_table;
    11260
    11361NTSTATUS irpc_register(struct messaging_context *msg_ctx,
    11462                       const struct ndr_interface_table *table,
    11563                       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
     65struct 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);
     69struct 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);
     73void irpc_binding_handle_add_security_token(struct dcerpc_binding_handle *h,
     74                                            struct security_token *token);
    12575
    12676NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name);
     
    12878void irpc_remove_name(struct messaging_context *msg_ctx, const char *name);
    12979NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status);
    130 struct server_id messaging_get_server_id(struct messaging_context *msg_ctx);
    13180
    13281#endif
Note: See TracChangeset for help on using the changeset viewer.