REST/NAMESTORE: rework API
[oweals/gnunet.git] / src / transport / plugin_transport_http_client.c
index b1a92f1081bf66f545a7c46faa214a6b1c0d4f30..3c8dc21e5589a01d96fd3486a78bdbe87a1735ef 100644 (file)
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
+    
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 
 /**
@@ -263,7 +268,7 @@ struct GNUNET_ATS_Session
   /**
    * ATS network type.
    */
-  enum GNUNET_ATS_Network_Type scope;
+  enum GNUNET_NetworkType scope;
 };
 
 
@@ -1917,7 +1922,7 @@ client_connect (struct GNUNET_ATS_Session *s)
  * @param session the session
  * @return the network type
  */
-static enum GNUNET_ATS_Network_Type
+static enum GNUNET_NetworkType
 http_client_plugin_get_network (void *cls,
                                 struct GNUNET_ATS_Session *session)
 {
@@ -1932,7 +1937,7 @@ http_client_plugin_get_network (void *cls,
  * @param address the address
  * @return the network type
  */
-static enum GNUNET_ATS_Network_Type
+static enum GNUNET_NetworkType
 http_client_plugin_get_network_for_address (void *cls,
                                             const struct GNUNET_HELLO_Address *address)
 {
@@ -1994,7 +1999,7 @@ http_client_plugin_get_session (void *cls,
   struct HTTP_Client_Plugin *plugin = cls;
   struct GNUNET_ATS_Session *s;
   struct sockaddr *sa;
-  enum GNUNET_ATS_Network_Type net_type;
+  enum GNUNET_NetworkType net_type;
   size_t salen = 0;
   int res;
 
@@ -2017,7 +2022,7 @@ http_client_plugin_get_session (void *cls,
   }
 
   /* Determine network location */
-  net_type = GNUNET_ATS_NET_UNSPECIFIED;
+  net_type = GNUNET_NT_UNSPECIFIED;
   sa = http_common_socket_from_address (address->address,
                                         address->address_length,
                                         &res);
@@ -2040,9 +2045,9 @@ http_client_plugin_get_session (void *cls,
   else if (GNUNET_NO == res)
   {
     /* Cannot convert to sockaddr -> is external hostname */
-    net_type = GNUNET_ATS_NET_WAN;
+    net_type = GNUNET_NT_WAN;
   }
-  if (GNUNET_ATS_NET_UNSPECIFIED == net_type)
+  if (GNUNET_NT_UNSPECIFIED == net_type)
   {
     GNUNET_break (0);
     return NULL;