Logo Search packages:      
Sourcecode: samba-doc-ja version File versions

messages.c File Reference

Detailed Description

messages Internal messaging framework

This module is used for internal messaging between Samba daemons.

The idea is that if a part of Samba wants to do communication with another Samba process then it will do a message_register() of a dispatch function, and use message_send_pid() to send messages to that process.

The dispatch function is given the pid of the sender, and it can use that to reply by message_send_pid(). See ping_message() for a simple example.

This system doesn't have any inherent size limitations but is not very efficient for large messages or when messages are sent in very quick succession.

Definition in file messages.c.

#include "includes.h"

Go to the source code of this file.


struct  dispatch_fns
struct  message_rec
struct  msg_all
static int received_signal
static TDB_CONTEXT * tdb
void debuglevel_message (int msg_type, pid_t src, void *buf, size_t len)
void message_deregister (int msg_type)
void message_dispatch (void)
BOOL message_init (void)
static TDB_KEY message_key_pid (pid_t pid)
static BOOL message_notify (pid_t pid)
static BOOL message_recv (int *msg_type, pid_t *src, void **buf, size_t *len)
void message_register (int msg_type, void(*fn) __P((int msg_type, pid_t pid, void *buf, size_t len)))
BOOL message_send_all (TDB_CONTEXT *conn_tdb, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed, int *n_sent)
BOOL message_send_pid (pid_t pid, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed)
void ping_message (int msg_type, pid_t src, void *buf, size_t len)
static void sig_usr1 (void)
static int traverse_fn (TDB_CONTEXT *the_tdb, TDB_KEY kbuf, TDB_DATA dbuf, void *state)

Generated by  Doxygen 1.6.0   Back to index