Add #ifndef __PRIVILEGES_H__ / #define / #endif logic to prevent multiple
[obnox/wireshark/wip.git] / sync_pipe.h
index 6be873c197ca39c941cfa2da7b218370ba493e99..b5d80cb706312a0dfe5d2378741abf9d61d36e8c 100644 (file)
@@ -1,10 +1,11 @@
 /* sync_pipe.h
- * Low-level synchronization pipe routines for use by Ethereal and dumpcap
+ * Low-level synchronization pipe routines for use by Wireshark/TShark
+ * and dumpcap
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -54,6 +55,7 @@
 #define SP_BAD_FILTER   'B'     /* error message for bad capture filter */
 #define SP_PACKET_COUNT 'P'     /* count of packets captured since last message */
 #define SP_DROPS        'D'     /* count of packets dropped in capture */
+#define SP_SUCCESS      'S'     /* success indication, no extra data */
 /*
  * Win32 only: Indications sent out on the signal pipe (from parent to child)
  * (UNIX-like sends signals for this)
 
 /* write a single message header to the recipient pipe */
 extern int
-pipe_write_header(int pipe, char indicator, int length);
+pipe_write_header(int pipe_fd, char indicator, int length);
 
 /* write a message to the recipient pipe in the standard format 
    (3 digit message length (excluding length and indicator field), 
    1 byte message indicator and the rest is the message).
    If msg is NULL, the message has only a length and indicator. */
 extern void
-pipe_write_block(int pipe, char indicator, const char *msg);
+pipe_write_block(int pipe_fd, char indicator, const char *msg);
 
 /** the child encountered an error, notify the parent */
 extern void 
-sync_pipe_errmsg_to_parent(const char *error_msg,
+sync_pipe_errmsg_to_parent(int pipe_fd, const char *error_msg,
                            const char *secondary_error_msg);
 
 #endif /* sync_pipe.h */