-tlsa rr added to namestore
[oweals/gnunet.git] / src / include / gnunet_stream_lib.h
index 2823724833781e4899a2178ccf5759f26434ef85..a134470c75b7ccca763fcdb0133e065f79afdd7c 100644 (file)
@@ -85,6 +85,13 @@ typedef void (*GNUNET_STREAM_OpenCallback) (void *cls,
                                            struct GNUNET_STREAM_Socket *socket);
 
 
+/**
+ * Callback for signalling stream listen success; See
+ * GNUNET_STREAM_OPTION_SIGNAL_LISTEN_SUCCESS
+ */
+typedef void (*GNUNET_STREAM_ListenSuccessCallback) (void);
+
+
 /**
  * Options for the stream.
  */
@@ -109,7 +116,20 @@ enum GNUNET_STREAM_Option
      * Option to set the write sequence number. Takes a uint32_t as parameter
      * to set the value of the write sequence number
      */
-    GNUNET_STREAM_OPTION_TESTING_SET_WRITE_SEQUENCE_NUMBER
+    GNUNET_STREAM_OPTION_TESTING_SET_WRITE_SEQUENCE_NUMBER,
+
+    /**
+     * Listen socket timeout in milliseconds given as uint32_t
+     */
+    GNUNET_STREAM_OPTION_LISTEN_TIMEOUT,
+
+    /**
+     * Option to register a callback when stream listening is
+     * successfull. Takes parameter of the form
+     * GNUNET_STREAM_ListenSuccessCallback. The callback is only called if
+     * listen is successful
+     */
+    GNUNET_STREAM_OPTION_SIGNAL_LISTEN_SUCCESS
   };
 
 
@@ -120,7 +140,8 @@ enum GNUNET_STREAM_Option
  * @param target the target peer to which the stream has to be opened
  * @param app_port the application port number which uniquely identifies this
  *            stream
- * @param open_cb this function will be called after stream has be established 
+ * @param open_cb this function will be called after stream has be established;
+ *          cannot be NULL
  * @param open_cb_cls the closure for open_cb
  * @param ... options to the stream, terminated by GNUNET_STREAM_OPTION_END
  * @return if successful it returns the stream socket; NULL if stream cannot be