summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-09-12 06:13:25 +0000
committerAndrew Tridgell <tridge@samba.org>2000-09-12 06:13:25 +0000
commitf0ce4f7ae3b58f45b70598e3a44539e3e12291ce (patch)
tree35c9fea99d0325807f7044bf176047aa420cd17c /source3/include
parenta19836ae5267fa967482f2baacd5e8cf8767bf79 (diff)
downloadsamba-f0ce4f7ae3b58f45b70598e3a44539e3e12291ce.tar.gz
samba-f0ce4f7ae3b58f45b70598e3a44539e3e12291ce.tar.bz2
samba-f0ce4f7ae3b58f45b70598e3a44539e3e12291ce.zip
- changed the msg_type to be an int instead of an enum so that it is
easier to add new message types to messages.h without breaking old binaries - added a MSG_FORCE_ELECTION message to force nmbd to hold an election (This used to be commit f1c49ca7ce56bc39259041a71479e84ebf53eeca)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/messages.h7
-rw-r--r--source3/include/proto.h9
2 files changed, 11 insertions, 5 deletions
diff --git a/source3/include/messages.h b/source3/include/messages.h
index 4bc4014ca0..6ab21e7433 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -22,6 +22,11 @@
#ifndef _MESSAGES_H_
#define _MESSAGES_H_
-enum message_type {MSG_DEBUG};
+/* general messages */
+#define MSG_DEBUG 1
+#define MSG_PING 2
+
+/* nmbd messages */
+#define MSG_FORCE_ELECTION 1001
#endif
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f12f7e1570..4fc539ef6e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -59,7 +59,7 @@ uint32 crc32_calc_buffer( char *buffer, uint32 count);
/*The following definitions come from lib/debug.c */
-void debug_message(enum message_type msg_type, pid_t src, void *buf, size_t len);
+void debug_message(int msg_type, pid_t src, void *buf, size_t len);
void debug_message_send(pid_t pid, int level);
void setup_logging(char *pname, BOOL interactive);
void reopen_logs( void );
@@ -153,10 +153,10 @@ void mdfour(unsigned char *out, unsigned char *in, int n);
/*The following definitions come from lib/messages.c */
BOOL message_init(void);
-BOOL message_send_pid(pid_t pid, enum message_type msg_type, void *buf, size_t len);
+BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len);
void message_dispatch(void);
-void message_register(enum message_type msg_type,
- void (*fn)(enum message_type msg_type, pid_t pid, void *buf, size_t len));
+void message_register(int msg_type,
+ void (*fn)(int msg_type, pid_t pid, void *buf, size_t len));
/*The following definitions come from lib/ms_fnmatch.c */
@@ -997,6 +997,7 @@ void check_master_browser_exists(time_t t);
void run_elections(time_t t);
void process_election(struct subnet_record *subrec, struct packet_struct *p, char *buf);
BOOL check_elections(void);
+void nmbd_message_election(int msg_type, pid_t src, void *buf, size_t len);
/*The following definitions come from nmbd/nmbd_incomingdgrams.c */