guix-env: some update.
[oweals/gnunet.git] / src / ats / test_ats_api.c
index 97fdd65c10c2e9c5adbf7378b3494a2d28f6dab3..5bf80e50b1e71652a7ca8c1c894fc770c250b90f 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2010-2015 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2010-2015 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file ats/test_ats_api.c
@@ -40,19 +40,21 @@ static struct Command test_commands[] = {
     .details.add_address = {
       .pid = 0,
       .addr_num = 0,
+      .addr_flags = GNUNET_HELLO_ADDRESS_INFO_NONE,
       .session = 0,
       .properties = {
         .scope = GNUNET_ATS_NET_LAN
       }
     }
   },
-  /* adding same address again should fail */
+  /* 1: adding same address again should fail */
   {
     .code = CMD_ADD_ADDRESS,
     .label = "add-address-0-0:FAIL",
     .details.add_address = {
       .pid = 0,
       .addr_num = 0,
+      .addr_flags = GNUNET_HELLO_ADDRESS_INFO_NONE,
       .session = 0,
       .properties = {
         .scope = GNUNET_ATS_NET_LAN
@@ -60,7 +62,7 @@ static struct Command test_commands[] = {
       .expect_fail = 1
     }
   },
-  /* some solver still require explicit start */
+  /* 2: some solver still require explicit start */
   {
     .code = CMD_REQUEST_CONNECTION_START,
     .label = "request-0",
@@ -68,21 +70,21 @@ static struct Command test_commands[] = {
       .pid = 0
     }
   },
-  /* check we got an address */
+  /* 3: check we got an address */
   {
     .code = CMD_AWAIT_ADDRESS_SUGGESTION,
     .details.await_address_suggestion = {
       .add_label = "add-address-0-0"
     }
   },
-  /* check monitor also got the address */
+  /* 4: check monitor also got the address */
   {
     .code = CMD_AWAIT_ADDRESS_INFORMATION,
     .details.await_address_information = {
       .add_label = "add-address-0-0"
     }
   },
-  /* test session API */
+  /* 5: test session API */
   {
     .code = CMD_ADD_SESSION,
     .label = "add-session-0-0-1",
@@ -97,7 +99,7 @@ static struct Command test_commands[] = {
       .add_session_label = "add-session-0-0-1",
     }
   },
-  /* test preference API */
+  /* 7: test preference API */
   {
     .code = CMD_CHANGE_PREFERENCE,
     .details.change_preference = {
@@ -113,7 +115,7 @@ static struct Command test_commands[] = {
       /* FIXME: preference details */
     }
   },
-  /* test sanity check address listing */
+  /* 9: test sanity check address listing */
   {
     .code = CMD_LIST_ADDRESSES,
     .details.list_addresses = {
@@ -125,28 +127,28 @@ static struct Command test_commands[] = {
       .max_active_calls = 1
     }
   },
-  /* remove address testing */
+  /* 10: remove address testing */
   {
     .code = CMD_DEL_ADDRESS,
     .details.del_address = {
       .add_label = "add-address-0-0"
     }
   },
-  /* check we got disconnected */
+  /* 11: check we got disconnected */
   {
     .code = CMD_AWAIT_DISCONNECT_SUGGESTION,
     .details.await_disconnect_suggestion = {
       .pid = 0
     }
   },
-  /* just for symmetry, also stop asking for the connection */
+  /* 12: just for symmetry, also stop asking for the connection */
   {
     .code = CMD_REQUEST_CONNECTION_STOP,
     .details.request_connection_stop = {
       .connect_label = "request-0",
     }
   },
-  /* add address again */
+  /* 13: add address again */
   {
     .code = CMD_ADD_ADDRESS,
     .label = "add-address-0-0:1",
@@ -159,7 +161,7 @@ static struct Command test_commands[] = {
       }
     }
   },
-  /* some solver still require explicit start */
+  /* 14: some solver still require explicit start */
   {
     .code = CMD_REQUEST_CONNECTION_START,
     .label = "request-0",
@@ -167,55 +169,56 @@ static struct Command test_commands[] = {
       .pid = 0
     }
   },
-  /* check we got an address */
+  /* 15: check we got an address */
   {
     .code = CMD_AWAIT_ADDRESS_SUGGESTION,
     .details.await_address_suggestion = {
       .add_label = "add-address-0-0:1"
     }
   },
-  /* add alternative address */
+  /* 16: add alternative address */
   {
     .code = CMD_ADD_ADDRESS,
     .label = "add-address-0-1",
     .details.add_address = {
       .pid = 0,
       .addr_num = 1,
+      .addr_flags = GNUNET_HELLO_ADDRESS_INFO_NONE,
       .session = 0,
       .properties = {
         .scope = GNUNET_ATS_NET_LAN
       }
     }
   },
-  /* remove original address */
+  /* 17: remove original address */
   {
     .code = CMD_DEL_ADDRESS,
     .details.del_address = {
       .add_label = "add-address-0-0:1"
     }
   },
-  /* check we switched to alternative address */
+  /* 18: check we switched to alternative address */
   {
     .code = CMD_AWAIT_ADDRESS_SUGGESTION,
     .details.await_address_suggestion = {
       .add_label = "add-address-0-1"
     }
   },
-  /* remove alternative address */
+  /* 19: remove alternative address */
   {
     .code = CMD_DEL_ADDRESS,
     .details.del_address = {
       .add_label = "add-address-0-1"
     }
   },
-  /* check we got disconnected */
+  /* 20: check we got disconnected */
   {
     .code = CMD_AWAIT_DISCONNECT_SUGGESTION,
     .details.await_disconnect_suggestion = {
       .pid = 0
     }
   },
-  /* just for symmetry, also stop asking for the connection */
+  /* 21: just for symmetry, also stop asking for the connection */
   {
     .code = CMD_REQUEST_CONNECTION_STOP,
     .details.request_connection_stop = {