SET service: accurate results for symmetric mode
[oweals/gnunet.git] / src / include / gnunet_os_lib.h
index f815c95cd726d950b01be867d64abeff272153f3..431988042ff6e8db1fe09b47c9a1c920d05a49c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 
 /**
@@ -229,13 +229,14 @@ GNUNET_OS_get_libexec_binary_path (const char *progname);
  * @param addrlen length of the address
  * @return #GNUNET_OK to continue iteration, #GNUNET_SYSERR to abort
  */
-typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls,
-                                                    const char *name,
-                                                    int isDefault,
-                                                    const struct sockaddr *addr,
-                                                    const struct sockaddr *broadcast_addr,
-                                                    const struct sockaddr *netmask,
-                                                    socklen_t addrlen);
+typedef int
+(*GNUNET_OS_NetworkInterfaceProcessor) (void *cls,
+                                        const char *name,
+                                        int isDefault,
+                                        const struct sockaddr *addr,
+                                        const struct sockaddr *broadcast_addr,
+                                        const struct sockaddr *netmask,
+                                        socklen_t addrlen);
 
 
 /**
@@ -310,6 +311,7 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
  * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
  * @param pipe_stdin pipe to use to send input to child process (or NULL)
  * @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get error output from child process (or NULL)
  * @param filename name of the binary
  * @param argv NULL-terminated array of arguments to the process
  * @return pointer to process structure of the new process, NULL on error
@@ -319,6 +321,7 @@ GNUNET_OS_start_process_vap (int pipe_control,
                              enum GNUNET_OS_InheritStdioFlags std_inheritance,
                             struct GNUNET_DISK_PipeHandle *pipe_stdin,
                             struct GNUNET_DISK_PipeHandle *pipe_stdout,
+                            struct GNUNET_DISK_PipeHandle *pipe_stderr,
                             const char *filename,
                             char *const argv[]);
 
@@ -330,6 +333,7 @@ GNUNET_OS_start_process_vap (int pipe_control,
  * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
  * @param pipe_stdin pipe to use to send input to child process (or NULL)
  * @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get error output from child process (or NULL)
  * @param filename name of the binary
  * @param ... NULL-terminated list of arguments to the process
  * @return pointer to process structure of the new process, NULL on error
@@ -339,6 +343,7 @@ GNUNET_OS_start_process (int pipe_control,
                          enum GNUNET_OS_InheritStdioFlags std_inheritance,
                         struct GNUNET_DISK_PipeHandle *pipe_stdin,
                          struct GNUNET_DISK_PipeHandle *pipe_stdout,
+                         struct GNUNET_DISK_PipeHandle *pipe_stderr,
                          const char *filename, ...);
 
 
@@ -349,6 +354,7 @@ GNUNET_OS_start_process (int pipe_control,
  * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
  * @param pipe_stdin pipe to use to send input to child process (or NULL)
  * @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get error output from child process (or NULL)
  * @param filename name of the binary
  * @param va NULL-terminated list of arguments to the process
  * @return pointer to process structure of the new process, NULL on error
@@ -358,6 +364,7 @@ GNUNET_OS_start_process_va (int pipe_control,
                             enum GNUNET_OS_InheritStdioFlags std_inheritance,
                            struct GNUNET_DISK_PipeHandle *pipe_stdin,
                             struct GNUNET_DISK_PipeHandle *pipe_stdout,
+                            struct GNUNET_DISK_PipeHandle *pipe_stderr,
                             const char *filename, va_list va);
 
 /**
@@ -463,7 +470,7 @@ GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
 
 /**
  * Wait for a process to terminate.  The return code is discarded.
- * You must not use 'GNUNET_OS_process_status' on the same process
+ * You must not use #GNUNET_OS_process_status() on the same process
  * after calling this function!  This function is blocking and should
  * thus only be used if the child process is known to have terminated
  * or to terminate very soon.
@@ -478,7 +485,7 @@ GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
 /**
  * Connects this process to its parent via pipe;
  * essentially, the parent control handler will read signal numbers
- * from the 'GNUNET_OS_CONTROL_PIPE' (as given in an environment
+ * from the #GNUNET_OS_CONTROL_PIPE (as given in an environment
  * variable) and raise those signals.
  *
  * @param cls closure (unused)
@@ -508,7 +515,9 @@ GNUNET_OS_install_parent_control_handler (void *cls,
  *         #GNUNET_SYSERR on error (no such binary or not executable)
  */
 int
-GNUNET_OS_check_helper_binary (const char *binary, int check_suid, const char * params);
+GNUNET_OS_check_helper_binary (const char *binary,
+                               int check_suid,
+                               const char *params);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */