gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17053 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r17053 - gnunet/src/transport
Date: Tue, 27 Sep 2011 15:06:26 +0200

Author: wachs
Date: 2011-09-27 15:06:26 +0200 (Tue, 27 Sep 2011)
New Revision: 17053

Modified:
   gnunet/src/transport/plugin_transport_http.h
Log:
comments and clean up


Modified: gnunet/src/transport/plugin_transport_http.h
===================================================================
--- gnunet/src/transport/plugin_transport_http.h        2011-09-27 13:06:14 UTC 
(rev 17052)
+++ gnunet/src/transport/plugin_transport_http.h        2011-09-27 13:06:26 UTC 
(rev 17053)
@@ -67,13 +67,19 @@
 struct Plugin
 {
   /**
+   * General handles
+   * ---------------
+   */
+
+  /**
    * Our environment.
    */
   struct GNUNET_TRANSPORT_PluginEnvironment *env;
 
   /**
-   * List of open sessions.
+   * Linked list of open sessions.
    */
+
   struct Session *head;
 
   struct Session *tail;
@@ -83,72 +89,155 @@
    */
   struct GNUNET_NAT_Handle *nat;
 
+  /**
+   * List of own addresses
+   */
 
   /**
-   * ipv4 DLL head
+   * IPv4 addresses DLL head
    */
   struct IPv4HttpAddressWrapper *ipv4_addr_head;
 
   /**
-   * ipv4 DLL tail
+   * IPv4 addresses DLL tail
    */
   struct IPv4HttpAddressWrapper *ipv4_addr_tail;
 
   /**
-   * ipv6 DLL head
+   * IPv6 addresses DLL head
    */
   struct IPv6HttpAddressWrapper *ipv6_addr_head;
 
   /**
-   * ipv6 DLL tail
+   * IPv6 addresses DLL tail
    */
   struct IPv6HttpAddressWrapper *ipv6_addr_tail;
 
+  /**
+   * Plugin configuration
+   * --------------------
+   */
 
-  /* Plugin configuration */
-
+  /**
+   * Plugin name
+   * Equals configuration section: transport-http, transport-https
+   */
   char *name;
 
+  /**
+   * Plugin protocol
+   * http, https
+   */
   char *protocol;
 
+  /**
+   * Use IPv4?
+   * GNUNET_YES or GNUNET_NO
+   */
   int ipv4;
 
+  /**
+   * Use IPv6?
+   * GNUNET_YES or GNUNET_NO
+   */
   int ipv6;
 
+  /**
+   * Port used
+   */
   uint16_t port;
 
+  /**
+   * Maximum number of sockets the plugin can use
+   * Each http inbound /outbound connections are two connections
+   */
   int max_connections;
 
+  /**
+   * Plugin HTTPS SSL/TLS options
+   * ----------------------------
+   */
 
+  /**
+   * libCurl TLS crypto init string, can be set to enhance performance
+   *
+   * Example:
+   *
+   * Use RC4-128 instead of AES:
+   * NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+   *
+   */
+  char *crypto_init;
 
-  /* Plugin values */
+  /**
+   * TLS key
+   */
+  char *key;
 
+  /**
+   * TLS certificate
+   */
+  char *cert;
 
+  /**
+   * Plugin values
+   * -------------
+   */
+
+  /**
+   * Current number of establishes connections
+   */
   int cur_connections;
+
+  /**
+   * Last used unique HTTP connection tag
+   */
   uint32_t last_tag;
-  /*
+
+  /**
    * Server handles
+   * --------------
    */
 
+  /**
+   * MHD IPv4 daemon
+   */
   struct MHD_Daemon *server_v4;
+
+  /**
+   * MHD IPv4 task
+   */
   GNUNET_SCHEDULER_TaskIdentifier server_v4_task;
 
+  /**
+   * MHD IPv6 daemon
+   */
   struct MHD_Daemon *server_v6;
+
+  /**
+   * MHD IPv4 task
+   */
   GNUNET_SCHEDULER_TaskIdentifier server_v6_task;
 
+  /**
+   * IPv4 server socket to bind to
+   */
   struct sockaddr_in * server_addr_v4;
+
+  /**
+   * IPv6 server socket to bind to
+   */
   struct sockaddr_in6 * server_addr_v6;
 
-  char *crypto_init;
-  char *key;
-  char *cert;
-
+  /**
+   * Server semi connections
+   * A full session consists of 2 semi-connections: send and receive
+   * If not both directions are established the server keeps this sessions here
+   */
   struct Session *server_semi_head;
 
   struct Session *server_semi_tail;
 
-
-
   /*
    * Client handles
    */
@@ -158,6 +247,9 @@
    */
   CURLM *client_mh;
 
+  /**
+   * curl perform task
+   */
   GNUNET_SCHEDULER_TaskIdentifier client_perform_task;
 
 };
@@ -184,6 +276,21 @@
   struct Plugin *plugin;
 
   /**
+   * Address
+   */
+  void *addr;
+
+  /**
+   * Address length
+   */
+  size_t addrlen;
+
+  /**
+   * To whom are we talking to
+   */
+  struct GNUNET_PeerIdentity target;
+
+  /**
    * next pointer for double linked list
    */
   struct HTTP_Message *msg_head;
@@ -195,63 +302,66 @@
 
 
   /**
-   * message stream tokenizer for incoming data
+   * Message stream tokenizer for incoming data
    */
   struct GNUNET_SERVER_MessageStreamTokenizer *msg_tk;
 
   /**
-   * Continuation function to call once the transmission buffer
-   * has again space available.  NULL if there is no
-   * continuation to call.
+   * Absolute time when to receive data again
+   * Used for receive throttling
    */
-  GNUNET_TRANSPORT_TransmitContinuation transmit_cont;
+  struct GNUNET_TIME_Absolute next_receive;
 
+  /**
+   * Inbound or outbound connection
+   * Outbound: GNUNET_NO (client is used to send and receive)
+   * Inbound : GNUNET_YES (server is used to send and receive)
+   */
+  int inbound;
 
-  void *addr;
+  /**
+   * Unique HTTP/S connection tag for this connection
+   */
+  uint32_t tag;
 
-  size_t addrlen;
+  /**
+   * Client handles
+   */
 
   /**
-   * Closure for transmit_cont.
+   * Client send handle
    */
-  void *transmit_cont_cls;
+  void *client_put;
 
   /**
-   * To whom are we talking to (set to our identity
-   * if we are still waiting for the welcome message)
+   * Client receive handle
    */
-  struct GNUNET_PeerIdentity target;
+  void *client_get;
 
   /**
-   * At what time did we reset last_received last?
+   * Task to wake up client receive handle when receiving is allowed again
    */
-  //struct GNUNET_TIME_Absolute last_quota_update;
+  GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task;
 
   /**
-   * How many bytes have we received since the "last_quota_update"
-   * timestamp?
+   * Is client send handle paused since there are no data to send?
+   * GNUNET_YES/NO
    */
-  //uint64_t last_received;
+  int client_put_paused;
 
   /**
-   * Number of bytes per ms that this peer is allowed
-   * to send to us.
+   * Server handles
    */
-  //uint32_t quota;
 
+  /**
+   * Client send handle
+   */
+  void *server_recv;
 
-  int inbound;
-
-  void *client_put;
-  void *client_get;
-  int client_put_paused;
-
-  void *server_recv;
+  /**
+   * Client send handle
+   */
   void *server_send;
-  struct GNUNET_TIME_Absolute next_receive;
-  GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task;
-  uint32_t tag;
-
 };
 
 /**




reply via email to

[Prev in Thread] Current Thread [Next in Thread]