summaryrefslogtreecommitdiff
path: root/source3/include/messages.h
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-21 22:17:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:17 -0500
commitac3f08ddbe0b484375624db0e35999a8584b57f4 (patch)
tree477347104c60dc6ae205257d654b1d89c7903f35 /source3/include/messages.h
parentf96242d9331a5fcdc65445d0d0ea7177c7ddc6e0 (diff)
downloadsamba-ac3f08ddbe0b484375624db0e35999a8584b57f4.tar.gz
samba-ac3f08ddbe0b484375624db0e35999a8584b57f4.tar.bz2
samba-ac3f08ddbe0b484375624db0e35999a8584b57f4.zip
r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more than one place, so I wanted a decent routine to marshall a message_rec struct which was not there before. Tridge, this seems about the same speed as it used to be before, the librpc/ndr overhead in my tests was under the noise. Volker (This used to be commit eaefd00563173dfabb7716c5695ac0a2f7139bb6)
Diffstat (limited to 'source3/include/messages.h')
-rw-r--r--source3/include/messages.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/source3/include/messages.h b/source3/include/messages.h
index e3f29832ad..6e4cf13098 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -100,4 +100,37 @@ struct server_id {
pid_t pid;
};
+struct messaging_context;
+struct data_blob;
+
+unsigned int messages_pending_for_pid(struct messaging_context *msg_ctx,
+ struct server_id pid);
+void message_dispatch(struct messaging_context *msg_ctx);
+BOOL message_send_all(struct messaging_context *msg_ctx,
+ int msg_type,
+ const void *buf, size_t len,
+ int *n_sent);
+void message_block(void);
+void message_unblock(void);
+struct event_context *messaging_event_context(struct messaging_context *msg_ctx);
+struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
+ struct server_id server_id,
+ struct event_context *ev);
+NTSTATUS messaging_register(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ void (*fn)(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ struct data_blob *data));
+void messaging_deregister(struct messaging_context *ctx, uint32_t msg_type,
+ void *private_data);
+NTSTATUS messaging_send(struct messaging_context *msg_ctx,
+ struct server_id server,
+ uint32_t msg_type, const struct data_blob *data);
+NTSTATUS messaging_send_buf(struct messaging_context *msg_ctx,
+ struct server_id server, uint32_t msg_type,
+ const uint8 *buf, size_t len);
+
#endif