/*
This file is part of GNUnet.
- Copyright (C) 2011-2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011-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
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.
*/
/**
addr->addr_len,
GNUNET_NO,
NULL,
+ addr->local_address_info,
GNUNET_BANDWIDTH_ZERO,
GNUNET_BANDWIDTH_ZERO);
GNUNET_free (addr->plugin);
GNUNET_break (0);
return;
}
+ GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
new_address = create_address (peer,
plugin_name,
plugin_addr,
new_address->addr_len,
new_address->active,
&new_address->properties,
+ new_address->local_address_info,
GNUNET_BANDWIDTH_value_init (new_address->assigned_bw_out),
GNUNET_BANDWIDTH_value_init (new_address->assigned_bw_in));
}
"Received ADDRESS_UPDATE for peer `%s' slot %u\n",
GNUNET_i2s (peer),
(unsigned int) session_id);
-
+ GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
/* Update address */
aa->t_last_activity = GNUNET_TIME_absolute_get();
aa->properties = *prop;
aa->addr_len,
aa->active,
prop,
+ aa->local_address_info,
GNUNET_BANDWIDTH_value_init (aa->assigned_bw_out),
GNUNET_BANDWIDTH_value_init (aa->assigned_bw_in));
{
GNUNET_log(GNUNET_ERROR_TYPE_INFO,
"Shutting down addresses\n");
+ GAS_plugin_solver_lock ();
GAS_addresses_destroy_all ();
+ GAS_plugin_solver_unlock ();
GNUNET_CONTAINER_multipeermap_destroy (GSA_addresses);
GSA_addresses = NULL;
}
addr->addr_len,
addr->active,
&addr->properties,
+ addr->local_address_info,
GNUNET_BANDWIDTH_value_init (addr->assigned_bw_out),
GNUNET_BANDWIDTH_value_init (addr->assigned_bw_in));
return GNUNET_OK;
NULL, NULL, NULL, 0,
GNUNET_NO,
NULL,
+ GNUNET_HELLO_ADDRESS_INFO_NONE,
GNUNET_BANDWIDTH_ZERO,
GNUNET_BANDWIDTH_ZERO);
}
* @param plugin_addr_len length of @a plugin_addr
* @param active #GNUNET_YES if this address is actively used
* @param prop performance information
+ * @param local_address_info flags for the address
* @param bandwidth_out current outbound bandwidth assigned to address
* @param bandwidth_in current inbound bandwidth assigned to address
*/
size_t plugin_addr_len,
int active,
const struct GNUNET_ATS_Properties *prop,
+ enum GNUNET_HELLO_AddressInfo local_address_info,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
memset (&msg->properties,
0,
sizeof (struct GNUNET_ATS_Properties));
+ msg->address_local_info = htonl ((uint32_t) local_address_info);
addrp = (char *) &msg[1];
if (NULL != plugin_addr)
memcpy (addrp, plugin_addr, plugin_addr_len);
* @param plugin_addr_len length of @a plugin_addr
* @param active is address actively used
* @param prop performance information
+ * @param local_address_info additional local info for the address
* @param bandwidth_out current outbound bandwidth assigned to address
* @param bandwidth_in current inbound bandwidth assigned to address
*/
size_t plugin_addr_len,
int active,
const struct GNUNET_ATS_Properties *prop,
+ enum GNUNET_HELLO_AddressInfo local_address_info,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
{
plugin_addr, plugin_addr_len,
active,
prop,
+ local_address_info,
bandwidth_out,
bandwidth_in);
}
NULL, NULL, NULL,
0, GNUNET_NO,
NULL,
+ GNUNET_HELLO_ADDRESS_INFO_NONE,
GNUNET_BANDWIDTH_ZERO,
GNUNET_BANDWIDTH_ZERO);
GNUNET_SERVER_receive_done (client,