new operation queue for limiting overlay connects
[oweals/gnunet.git] / src / transport / plugin_transport_http.h
index 986d7d7975cabb985cdacabae53e990bce9cbf66..1ac2f985940416862fa89604b8f960b4b3b36559 100644 (file)
@@ -96,27 +96,41 @@ struct Plugin
   /**
    * IPv4 addresses DLL head
    */
-  struct IPv4HttpAddressWrapper *ipv4_addr_head;
+  struct HttpAddressWrapper *addr_head;
 
   /**
    * IPv4 addresses DLL tail
    */
-  struct IPv4HttpAddressWrapper *ipv4_addr_tail;
+  struct HttpAddressWrapper *addr_tail;
+
 
   /**
-   * IPv6 addresses DLL head
+   * Plugin configuration
+   * --------------------
    */
-  struct IPv6HttpAddressWrapper *ipv6_addr_head;
 
   /**
-   * IPv6 addresses DLL tail
+   * External hostname the plugin can be connected to, can be different to
+   * the host's FQDN, used e.g. for reverse proxying
    */
-  struct IPv6HttpAddressWrapper *ipv6_addr_tail;
+  char *external_hostname;
 
   /**
-   * Plugin configuration
-   * --------------------
+   * External hostname the plugin can be connected to, can be different to
+   * the host's FQDN, used e.g. for reverse proxying
+   */
+  struct HttpAddress *ext_addr;
+
+  /**
+   * External address length
    */
+  size_t ext_addr_len;
+
+  /**
+   * Task calling transport service about external address
+   */
+  GNUNET_SCHEDULER_TaskIdentifier notify_ext_task;
+
 
   /**
    * Plugin name
@@ -283,6 +297,22 @@ struct Plugin
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
+/**
+ * HTTP addresses including a full URI
+ */
+struct HttpAddress
+{
+  /**
+   * Length of the address following in NBO
+   */
+  uint32_t addr_len GNUNET_PACKED;
+
+  /**
+   * Address following
+   */
+  void *addr GNUNET_PACKED;
+};
+
 /**
  * IPv4 addresses
  */
@@ -339,6 +369,10 @@ struct ServerConnection
  */
 struct Session
 {
+  /**
+   * To whom are we talking to
+   */
+  struct GNUNET_PeerIdentity target;
 
   /**
    * Stored in a linked list.
@@ -370,11 +404,6 @@ struct Session
    */
   uint32_t ats_address_network_type;
 
-  /**
-   * To whom are we talking to
-   */
-  struct GNUNET_PeerIdentity target;
-
   /**
    * next pointer for double linked list
    */