adding Ludo's gnunet-download-manager.scm back to SVN HEAD
[oweals/gnunet.git] / src / include / gnunet_os_lib.h
index 9d611af9b95e59b4d341054a053fdd5bad5f5453..c56947431e49889afa1e2c71bd3f4c105f531879 100644 (file)
@@ -66,12 +66,12 @@ enum GNUNET_OS_InstallationPathKind
   GNUNET_OS_IPK_BINDIR,
 
   /**
-   * Return the directory where libraries are installed. (lib/)
+   * Return the directory where libraries are installed. (lib/gnunet/)
    */
   GNUNET_OS_IPK_LIBDIR,
 
   /**
-   * Return the directory where data is installed (share/)
+   * Return the directory where data is installed (share/gnunet/)
    */
   GNUNET_OS_IPK_DATADIR,
 
@@ -88,9 +88,15 @@ enum GNUNET_OS_InstallationPathKind
   GNUNET_OS_IPK_SELF_PREFIX,
 
   /**
-   * Return the prefix of the path with application icons.
+   * Return the prefix of the path with application icons (share/icons/).
    */
-  GNUNET_OS_IPK_ICONDIR
+  GNUNET_OS_IPK_ICONDIR,
+
+  /**
+   * Return the prefix of the path with documentation files, including the
+   * license (share/doc/gnunet/).
+   */
+  GNUNET_OS_IPK_DOCDIR
 };
 
 
@@ -146,13 +152,19 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind);
  * @param name name of the interface (can be NULL for unknown)
  * @param isDefault is this presumably the default interface
  * @param addr address of this interface (can be NULL for unknown or unassigned)
+ * @param broadcast_addr the broadcast address (can be NULL for unknown or unassigned)
+ * @param netmask the network mask (can be NULL for unknown or unassigned))
  * @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, socklen_t addrlen);
+                                                    addr,
+                                                    const struct sockaddr *
+                                                    broadcast_addr,
+                                                    const struct sockaddr *
+                                                    netmask, socklen_t addrlen);
 
 
 /**
@@ -229,6 +241,23 @@ GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
                                 enum GNUNET_SCHEDULER_Priority prio);
 
 
+
+/**
+ * Start a process.
+ *
+ * @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 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
+ */
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process_vap (struct GNUNET_DISK_PipeHandle *pipe_stdin,
+                            struct GNUNET_DISK_PipeHandle *pipe_stdout,
+                            const char *filename, 
+                            char *const argv[]);
+
+
 /**
  * Start a process.
  *
@@ -269,7 +298,7 @@ GNUNET_OS_start_process_va (struct GNUNET_DISK_PipeHandle *pipe_stdin,
  * @return pointer to process structure of the new process, NULL on error
  */
 struct GNUNET_OS_Process *
-GNUNET_OS_start_process_v (const int *lsocks, const char *filename,
+GNUNET_OS_start_process_v (const SOCKTYPE *lsocks, const char *filename,
                            char *const argv[]);
 
 
@@ -356,7 +385,7 @@ GNUNET_OS_install_parent_control_handler (void *cls,
  * PATH environment variable as a search path.
  *
  * @param binary the name of the file to check
- * @return GNUNET_YES if the file is SUID, 
+ * @return GNUNET_YES if the file is SUID,
  *         GNUNET_NO if not SUID (but binary exists)
  *         GNUNET_SYSERR on error (no such binary or not executable)
  */