GNUnet  0.11.x
Data Structures | Functions | Variables
gnunet-service-ats_addresses.c File Reference

ats service address management More...

#include "platform.h"
#include "gnunet-service-ats_addresses.h"
#include "gnunet-service-ats_performance.h"
#include "gnunet-service-ats_normalization.h"
#include "gnunet-service-ats_plugins.h"
Include dependency graph for gnunet-service-ats_addresses.c:

Go to the source code of this file.

Data Structures

struct  FindAddressContext
 Closure for find_address_cb() More...
 
struct  PeerInfoIteratorContext
 Closure for peerinfo_it(). More...
 
struct  AddressIteration
 Information we need for the callbacks to return a list of addresses back to the client. More...
 

Functions

static void update_addresses_stat ()
 Update statistic on number of addresses. More...
 
static void free_address (struct ATS_Address *addr)
 Free the given address. More...
 
static void init_norm (struct GAS_NormalizationInfo *norm)
 Initialize norm. More...
 
static struct ATS_Addresscreate_address (const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, uint32_t local_address_info, uint32_t session_id)
 Create a ATS_address with the given information. More...
 
static int find_address_cb (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
 Find session matching given session ID. More...
 
static struct ATS_Addressfind_exact_address (const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
 Find the exact address. More...
 
void GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, uint32_t local_address_info, uint32_t session_id, const struct GNUNET_ATS_Properties *prop)
 Add a new address for a peer. More...
 
void GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, uint32_t session_id, const struct GNUNET_ATS_Properties *prop)
 Update an address with new performance information for a peer. More...
 
void GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
 Remove an address for a peer. More...
 
void GAS_addresses_init ()
 Initialize address subsystem. More...
 
static int destroy_all_address_it (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
 Destroy all addresses iterator. More...
 
void GAS_addresses_destroy_all ()
 Remove all addresses. More...
 
void GAS_addresses_done ()
 Shutdown address subsystem. More...
 
static int peerinfo_it (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
 Iterator to iterate over a peer's addresses. More...
 
void GAS_addresses_get_peer_info (const struct GNUNET_PeerIdentity *peer, GNUNET_ATS_PeerInfo_Iterator pi_it, void *pi_it_cls)
 Return information all peers currently known to ATS. More...
 
static void transmit_req_addr (struct AddressIteration *ai, const struct GNUNET_PeerIdentity *id, const char *plugin_name, const void *plugin_addr, 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)
 Send a GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE with the given address details to the client identified in ai. More...
 
static void req_addr_peerinfo_it (void *cls, const struct GNUNET_PeerIdentity *id, const char *plugin_name, const void *plugin_addr, 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)
 Iterator for GAS_addresses_get_peer_info(), called with peer-specific information to be passed back to the client. More...
 
void GAS_handle_request_address_list (struct GNUNET_SERVICE_Client *client, const struct AddressListRequestMessage *alrm)
 Handle 'address list request' messages from clients. More...
 

Variables

struct GNUNET_CONTAINER_MultiPeerMapGSA_addresses
 A multihashmap to store all addresses. More...
 

Detailed Description

ats service address management

Author
Matthias Wachs
Christian Grothoff

Definition in file gnunet-service-ats_addresses.c.

Function Documentation

◆ update_addresses_stat()

static void update_addresses_stat ( )
static

Update statistic on number of addresses.

Definition at line 44 of file gnunet-service-ats_addresses.c.

References GNUNET_CONTAINER_multipeermap_size(), GNUNET_NO, GNUNET_STATISTICS_set(), and GSA_stats.

Referenced by free_address(), GAS_addresses_add(), and GAS_addresses_init().

45 {
47  "# addresses",
49  GNUNET_NO);
50 }
#define GNUNET_NO
Definition: gnunet_common.h:78
struct GNUNET_STATISTICS_Handle * GSA_stats
Handle for statistics.
void GNUNET_STATISTICS_set(struct GNUNET_STATISTICS_Handle *handle, const char *name, uint64_t value, int make_persistent)
Set statistic value for the peer.
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
unsigned int GNUNET_CONTAINER_multipeermap_size(const struct GNUNET_CONTAINER_MultiPeerMap *map)
Get the number of key-value pairs in the map.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_address()

static void free_address ( struct ATS_Address addr)
static

Free the given address.

Parameters
addraddress to destroy

Definition at line 59 of file gnunet-service-ats_addresses.c.

References ATS_Address::addr, ATS_Address::addr_len, GAS_performance_notify_all_clients(), GAS_plugin_delete_address(), GNUNET_assert, GNUNET_BANDWIDTH_ZERO, GNUNET_CONTAINER_multipeermap_remove(), GNUNET_free, GNUNET_NO, GNUNET_YES, ATS_Address::local_address_info, ATS_Address::peer, ATS_Address::plugin, and update_addresses_stat().

Referenced by destroy_all_address_it(), and GAS_addresses_destroy().

60 {
63  &addr->peer,
64  addr));
68  addr->plugin,
69  addr->addr,
70  addr->addr_len,
71  GNUNET_NO,
72  NULL,
73  addr->local_address_info,
76  GNUNET_free (addr->plugin);
77  GNUNET_free (addr);
78 }
static void update_addresses_stat()
Update statistic on number of addresses.
void GAS_plugin_delete_address(struct ATS_Address *address)
Tell the solver that the given address is no longer valid can cannot be used any longer.
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
const void * addr
Address (in plugin-specific binary format).
int GNUNET_CONTAINER_multipeermap_remove(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Remove the given key-value pair from the map.
#define GNUNET_NO
Definition: gnunet_common.h:78
size_t addr_len
Address length, number of bytes in addr.
char * plugin
Plugin name.
void GAS_performance_notify_all_clients(const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, 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)
Transmit the given performance information to all performance clients.
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
#define GNUNET_BANDWIDTH_ZERO
Convenience definition to use for 0-bandwidth.
#define GNUNET_YES
Definition: gnunet_common.h:77
enum GNUNET_HELLO_AddressInfo local_address_info
Field to store local flags.
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_norm()

static void init_norm ( struct GAS_NormalizationInfo norm)
static

Initialize norm.

Sets all historic values to undefined.

Parameters
normnormalization data to initialize

Definition at line 87 of file gnunet-service-ats_addresses.c.

References GAS_NormalizationInfo::atsi_abs, and GAS_normalization_queue_length.

Referenced by create_address().

88 {
89  unsigned int c;
90 
91  for (c = 0; c < GAS_normalization_queue_length; c++)
92  norm->atsi_abs[c] = UINT64_MAX;
93 }
#define GAS_normalization_queue_length
uint64_t atsi_abs[3]
Averaging queue.
Here is the caller graph for this function:

◆ create_address()

static struct ATS_Address* create_address ( const struct GNUNET_PeerIdentity peer,
const char *  plugin_name,
const void *  plugin_addr,
size_t  plugin_addr_len,
uint32_t  local_address_info,
uint32_t  session_id 
)
static

Create a ATS_address with the given information.

Parameters
peerpeer
plugin_nameplugin
plugin_addraddress
plugin_addr_lenaddress length
local_address_infoadditional local info for the address
session_idsession identifier, can never be 0
Returns
the ATS_Address

Definition at line 108 of file gnunet-service-ats_addresses.c.

References ATS_Address::addr, ATS_Address::addr_len, GNUNET_malloc, GNUNET_memcpy, GNUNET_strdup, init_norm(), ATS_Address::local_address_info, ATS_Address::norm_delay, ATS_Address::norm_distance, ATS_Address::norm_utilization_in, ATS_Address::norm_utilization_out, peer, ATS_Address::peer, ATS_Address::plugin, session_id, and ATS_Address::session_id.

Referenced by GAS_addresses_add().

114 {
115  struct ATS_Address *aa;
116 
117  aa = GNUNET_malloc (sizeof(struct ATS_Address) + plugin_addr_len);
118  aa->peer = *peer;
119  aa->addr_len = plugin_addr_len;
120  aa->addr = &aa[1];
121  GNUNET_memcpy (&aa[1],
122  plugin_addr,
123  plugin_addr_len);
125  aa->session_id = session_id;
127  init_norm (&aa->norm_delay);
128  init_norm (&aa->norm_distance);
131  return aa;
132 }
static void init_norm(struct GAS_NormalizationInfo *norm)
Initialize norm.
uint32_t session_id
Session ID, can never be 0.
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
const void * addr
Address (in plugin-specific binary format).
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
static struct GNUNET_HashCode session_id
char * plugin
Plugin name.
size_t addr_len
Address length, number of bytes in addr.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
struct GAS_NormalizationInfo norm_utilization_out
Normalized utilization outbound for this address.
Address with additional information.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GAS_NormalizationInfo norm_utilization_in
Normalized utilization inbound for this address.
struct GAS_NormalizationInfo norm_delay
Normalized delay information for this address.
static char * plugin_name
Name of our plugin.
enum GNUNET_HELLO_AddressInfo local_address_info
Field to store local flags.
#define GNUNET_malloc(size)
Wrapper around malloc.
struct GAS_NormalizationInfo norm_distance
Normalized distance information for this address.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_address_cb()

static int find_address_cb ( void *  cls,
const struct GNUNET_PeerIdentity key,
void *  value 
)
static

Find session matching given session ID.

Parameters
clsa struct FindAddressContext
keypeer id
valuethe address to compare with
Returns
GNUNET_YES to continue, GNUNET_NO if address is found

Definition at line 161 of file gnunet-service-ats_addresses.c.

References FindAddressContext::exact_address, fac(), GNUNET_NO, GNUNET_YES, FindAddressContext::session_id, ATS_Address::session_id, and value.

Referenced by find_exact_address().

164 {
165  struct FindAddressContext *fac = cls;
166  struct ATS_Address *aa = value;
167 
168  if (aa->session_id == fac->session_id)
169  {
170  fac->exact_address = aa;
171  return GNUNET_NO;
172  }
173  return GNUNET_YES;
174 }
uint32_t session_id
Session ID, can never be 0.
Closure for find_address_cb()
#define GNUNET_NO
Definition: gnunet_common.h:78
struct ATS_Address * exact_address
Where to store matching address result.
static char * value
Value of the record to add/remove.
Address with additional information.
uint32_t fac(uint32_t x)
Factorial.
#define GNUNET_YES
Definition: gnunet_common.h:77
uint32_t session_id
Session Id to look for.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_exact_address()

static struct ATS_Address* find_exact_address ( const struct GNUNET_PeerIdentity peer,
uint32_t  session_id 
)
static

Find the exact address.

Parameters
peerpeer
session_idsession id, can never be 0
Returns
an ATS_address or NULL

Definition at line 185 of file gnunet-service-ats_addresses.c.

References FindAddressContext::exact_address, find_address_cb(), GNUNET_CONTAINER_multipeermap_get_multiple(), and FindAddressContext::session_id.

Referenced by GAS_addresses_add(), GAS_addresses_destroy(), and GAS_addresses_update().

187 {
188  struct FindAddressContext fac;
189 
190  fac.exact_address = NULL;
191  fac.session_id = session_id;
193  peer,
194  &find_address_cb, &fac);
195  return fac.exact_address;
196 }
Closure for find_address_cb()
static struct GNUNET_HashCode session_id
static int find_address_cb(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Find session matching given session ID.
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
uint32_t fac(uint32_t x)
Factorial.
int GNUNET_CONTAINER_multipeermap_get_multiple(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map that match a particular key.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_add()

void GAS_addresses_add ( const struct GNUNET_PeerIdentity peer,
const char *  plugin_name,
const void *  plugin_addr,
size_t  plugin_addr_len,
uint32_t  local_address_info,
uint32_t  session_id,
const struct GNUNET_ATS_Properties prop 
)

Add a new address for a peer.

Parameters
peerpeer
plugin_nametransport plugin name
plugin_addrplugin address
plugin_addr_lenlength of the plugin address in plugin_addr
local_address_infothe local address for the address
session_idsession id, can be 0
propperformance information for this address

Definition at line 211 of file gnunet-service-ats_addresses.c.

References ATS_Address::active, ATS_Address::addr, ATS_Address::addr_len, ATS_Address::assigned_bw_in, ATS_Address::assigned_bw_out, create_address(), find_exact_address(), GAS_normalization_update_property(), GAS_performance_notify_all_clients(), GAS_plugin_new_address(), GAS_plugin_solver_lock(), GAS_plugin_solver_unlock(), GNUNET_assert, GNUNET_BANDWIDTH_value_init(), GNUNET_break, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_CONTAINER_multipeermap_put(), GNUNET_ERROR_TYPE_INFO, GNUNET_i2s(), GNUNET_log, GNUNET_NT_UNSPECIFIED, GNUNET_OK, GNUNET_TIME_absolute_get(), ATS_Address::local_address_info, ATS_Address::peer, ATS_Address::plugin, ATS_Address::properties, GNUNET_ATS_Properties::scope, ATS_Address::t_added, ATS_Address::t_last_activity, and update_addresses_stat().

Referenced by GAS_handle_address_add().

218 {
219  struct ATS_Address *new_address;
220 
221  if (NULL != find_exact_address (peer,
222  session_id))
223  {
224  GNUNET_break (0);
225  return;
226  }
228  new_address = create_address (peer,
229  plugin_name,
230  plugin_addr,
231  plugin_addr_len,
233  session_id);
234  /* Add a new address */
235  new_address->properties = *prop;
236  new_address->t_added = GNUNET_TIME_absolute_get ();
237  new_address->t_last_activity = GNUNET_TIME_absolute_get ();
240  peer,
241  new_address,
245  "Adding new address for peer `%s' slot %u\n",
246  GNUNET_i2s (peer),
247  session_id);
248  /* Tell solver about new address */
250  GAS_plugin_new_address (new_address);
251  GAS_normalization_update_property (new_address); // FIXME: needed?
253  /* Notify performance clients about new address */
255  new_address->plugin,
256  new_address->addr,
257  new_address->addr_len,
258  new_address->active,
259  &new_address->properties,
260  new_address->local_address_info,
262  new_address->assigned_bw_out),
264  new_address->assigned_bw_in));
265 }
static void update_addresses_stat()
Update statistic on number of addresses.
struct GNUNET_ATS_Properties properties
ATS performance information for this address.
void GAS_plugin_new_address(struct ATS_Address *new_address)
Tell the solver that the given address can now be used for talking to the respective peer...
int active
Is this the active address for this peer?
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
void GAS_plugin_solver_lock()
Stop instant solving, there are many state updates happening in bulk right now.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
const void * addr
Address (in plugin-specific binary format).
static struct ATS_Address * create_address(const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, uint32_t local_address_info, uint32_t session_id)
Create a ATS_address with the given information.
static struct GNUNET_HashCode session_id
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
size_t addr_len
Address length, number of bytes in addr.
char * plugin
Plugin name.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
void GAS_performance_notify_all_clients(const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, 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)
Transmit the given performance information to all performance clients.
void GAS_plugin_solver_unlock()
Resume instant solving, we are done with the bulk state updates.
uint32_t assigned_bw_in
Inbound bandwidth assigned by solver.
void GAS_normalization_update_property(struct ATS_Address *address)
Update and normalize atsi performance information.
static struct ATS_Address * find_exact_address(const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
Find the exact address.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:118
struct GNUNET_TIME_Absolute t_added
Time when address was added.
Address with additional information.
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init(uint32_t bytes_per_second)
Create a new bandwidth value.
Definition: bandwidth.c:39
enum GNUNET_NetworkType scope
Which network scope does the respective address belong to? This property does not change...
Allow multiple values with the same key.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
uint32_t assigned_bw_out
Outbound bandwidth assigned by solver.
#define GNUNET_log(kind,...)
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
static char * plugin_name
Name of our plugin.
enum GNUNET_HELLO_AddressInfo local_address_info
Field to store local flags.
Category of last resort.
Definition: gnunet_nt_lib.h:40
struct GNUNET_TIME_Absolute t_last_activity
Time when address had last activity (update, in uses)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_update()

void GAS_addresses_update ( const struct GNUNET_PeerIdentity peer,
uint32_t  session_id,
const struct GNUNET_ATS_Properties prop 
)

Update an address with new performance information for a peer.

Parameters
peerpeer
session_idsession id, never 0
propperformance information for this address

Definition at line 276 of file gnunet-service-ats_addresses.c.

References ATS_Address::active, ATS_Address::addr, ATS_Address::addr_len, ATS_Address::assigned_bw_in, ATS_Address::assigned_bw_out, find_exact_address(), GAS_normalization_update_property(), GAS_performance_notify_all_clients(), GNUNET_BANDWIDTH_value_init(), GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_NT_UNSPECIFIED, GNUNET_TIME_absolute_get(), ATS_Address::local_address_info, ATS_Address::peer, ATS_Address::plugin, ATS_Address::properties, GNUNET_ATS_Properties::scope, ATS_Address::solver_information, and ATS_Address::t_last_activity.

Referenced by GAS_handle_address_update().

279 {
280  struct ATS_Address *aa;
281 
282  /* Get existing address */
283  aa = find_exact_address (peer,
284  session_id);
285  if (NULL == aa)
286  {
287  GNUNET_break (0);
288  return;
289  }
290  if (NULL == aa->solver_information)
291  {
292  GNUNET_break (0);
293  return;
294  }
296  "Received ADDRESS_UPDATE for peer `%s' slot %u\n",
297  GNUNET_i2s (peer),
298  (unsigned int) session_id);
300  /* Update address */
302  aa->properties = *prop;
303  /* Notify performance clients about updated address */
305  aa->plugin,
306  aa->addr,
307  aa->addr_len,
308  aa->active,
309  prop,
310  aa->local_address_info,
312  aa->assigned_bw_out),
314  aa->assigned_bw_in));
315 
317 }
struct GNUNET_ATS_Properties properties
ATS performance information for this address.
int active
Is this the active address for this peer?
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
const void * addr
Address (in plugin-specific binary format).
static struct GNUNET_HashCode session_id
size_t addr_len
Address length, number of bytes in addr.
char * plugin
Plugin name.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
void GAS_performance_notify_all_clients(const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, 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)
Transmit the given performance information to all performance clients.
uint32_t assigned_bw_in
Inbound bandwidth assigned by solver.
void GAS_normalization_update_property(struct ATS_Address *address)
Update and normalize atsi performance information.
static struct ATS_Address * find_exact_address(const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
Find the exact address.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:118
Address with additional information.
void * solver_information
Solver-specific information for this address.
struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init(uint32_t bytes_per_second)
Create a new bandwidth value.
Definition: bandwidth.c:39
enum GNUNET_NetworkType scope
Which network scope does the respective address belong to? This property does not change...
uint32_t assigned_bw_out
Outbound bandwidth assigned by solver.
#define GNUNET_log(kind,...)
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
enum GNUNET_HELLO_AddressInfo local_address_info
Field to store local flags.
Category of last resort.
Definition: gnunet_nt_lib.h:40
struct GNUNET_TIME_Absolute t_last_activity
Time when address had last activity (update, in uses)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_destroy()

void GAS_addresses_destroy ( const struct GNUNET_PeerIdentity peer,
uint32_t  session_id 
)

Remove an address for a peer.

Parameters
peerpeer
session_idsession id, can never be 0

Definition at line 327 of file gnunet-service-ats_addresses.c.

References find_exact_address(), free_address(), GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), and GNUNET_log.

Referenced by GAS_handle_address_destroyed().

329 {
330  struct ATS_Address *ea;
331 
332  /* Get existing address */
333  ea = find_exact_address (peer,
334  session_id);
335  if (NULL == ea)
336  {
337  GNUNET_break (0);
338  return;
339  }
341  "Received ADDRESS_DESTROYED for peer `%s' session %u\n",
342  GNUNET_i2s (peer),
343  session_id);
344  free_address (ea);
345 }
static struct GNUNET_HashCode session_id
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
static struct ATS_Address * find_exact_address(const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
Find the exact address.
Address with additional information.
#define GNUNET_log(kind,...)
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
static void free_address(struct ATS_Address *addr)
Free the given address.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_init()

void GAS_addresses_init ( void  )

Initialize address subsystem.

The addresses subsystem manages the addresses known and current performance information. It has a solver component responsible for the resource allocation. It tells the solver about changes and receives updates when the solver changes the resource allocation.

Definition at line 355 of file gnunet-service-ats_addresses.c.

References GNUNET_CONTAINER_multipeermap_create(), GNUNET_NO, and update_addresses_stat().

Referenced by run().

356 {
359  GNUNET_NO);
361 }
static void update_addresses_stat()
Update statistic on number of addresses.
#define GNUNET_NO
Definition: gnunet_common.h:78
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy_all_address_it()

static int destroy_all_address_it ( void *  cls,
const struct GNUNET_PeerIdentity key,
void *  value 
)
static

Destroy all addresses iterator.

Parameters
clsNULL
keypeer identity (unused)
valuethe 'struct ATS_Address' to free
Returns
GNUNET_OK (continue to iterate)

Definition at line 373 of file gnunet-service-ats_addresses.c.

References free_address(), GNUNET_OK, and value.

Referenced by GAS_addresses_destroy_all().

376 {
377  struct ATS_Address *aa = value;
378 
379  free_address (aa);
380  return GNUNET_OK;
381 }
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
static char * value
Value of the record to add/remove.
Address with additional information.
static void free_address(struct ATS_Address *addr)
Free the given address.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_destroy_all()

void GAS_addresses_destroy_all ( void  )

Remove all addresses.

Definition at line 388 of file gnunet-service-ats_addresses.c.

References destroy_all_address_it(), GAS_plugin_solver_lock(), GAS_plugin_solver_unlock(), GNUNET_CONTAINER_multipeermap_iterate(), GNUNET_CONTAINER_multipeermap_size(), GNUNET_ERROR_TYPE_INFO, and GNUNET_log.

Referenced by GAS_addresses_done(), and GAS_scheduling_remove_client().

389 {
391  "Destroying all addresses\n");
392  if (0 ==
394  return;
398  NULL);
400 }
void GAS_plugin_solver_lock()
Stop instant solving, there are many state updates happening in bulk right now.
void GAS_plugin_solver_unlock()
Resume instant solving, we are done with the bulk state updates.
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
#define GNUNET_log(kind,...)
unsigned int GNUNET_CONTAINER_multipeermap_size(const struct GNUNET_CONTAINER_MultiPeerMap *map)
Get the number of key-value pairs in the map.
static int destroy_all_address_it(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Destroy all addresses iterator.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_done()

void GAS_addresses_done ( void  )

Shutdown address subsystem.

Definition at line 407 of file gnunet-service-ats_addresses.c.

References GAS_addresses_destroy_all(), GAS_plugin_solver_lock(), GAS_plugin_solver_unlock(), GNUNET_CONTAINER_multipeermap_destroy(), GNUNET_ERROR_TYPE_INFO, and GNUNET_log.

Referenced by cleanup_task(), and run().

408 {
410  "Shutting down addresses\n");
415  GSA_addresses = NULL;
416 }
void GAS_plugin_solver_lock()
Stop instant solving, there are many state updates happening in bulk right now.
void GAS_addresses_destroy_all()
Remove all addresses.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
void GAS_plugin_solver_unlock()
Resume instant solving, we are done with the bulk state updates.
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
#define GNUNET_log(kind,...)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ peerinfo_it()

static int peerinfo_it ( void *  cls,
const struct GNUNET_PeerIdentity key,
void *  value 
)
static

Iterator to iterate over a peer's addresses.

Parameters
clsa struct PeerInfoIteratorContext
keythe peer id
valuethe struct ATS_address
Returns
GNUNET_OK to continue

Definition at line 445 of file gnunet-service-ats_addresses.c.

References ATS_Address::active, ATS_Address::addr, ATS_Address::addr_len, ATS_Address::assigned_bw_in, ATS_Address::assigned_bw_out, GNUNET_BANDWIDTH_value_init(), GNUNET_OK, PeerInfoIteratorContext::it, PeerInfoIteratorContext::it_cls, ATS_Address::local_address_info, ATS_Address::peer, ATS_Address::plugin, ATS_Address::properties, and value.

Referenced by GAS_addresses_get_peer_info().

448 {
449  struct PeerInfoIteratorContext *pi_ctx = cls;
450  struct ATS_Address *addr = value;
451 
452  pi_ctx->it (pi_ctx->it_cls,
453  &addr->peer,
454  addr->plugin,
455  addr->addr,
456  addr->addr_len,
457  addr->active,
458  &addr->properties,
459  addr->local_address_info,
462  return GNUNET_OK;
463 }
struct GNUNET_ATS_Properties properties
ATS performance information for this address.
int active
Is this the active address for this peer?
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
const void * addr
Address (in plugin-specific binary format).
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
size_t addr_len
Address length, number of bytes in addr.
char * plugin
Plugin name.
uint32_t assigned_bw_in
Inbound bandwidth assigned by solver.
static char * value
Value of the record to add/remove.
Closure for peerinfo_it().
Address with additional information.
GNUNET_ATS_PeerInfo_Iterator it
Function to call for each address.
struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init(uint32_t bytes_per_second)
Create a new bandwidth value.
Definition: bandwidth.c:39
uint32_t assigned_bw_out
Outbound bandwidth assigned by solver.
enum GNUNET_HELLO_AddressInfo local_address_info
Field to store local flags.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_addresses_get_peer_info()

void GAS_addresses_get_peer_info ( const struct GNUNET_PeerIdentity peer,
GNUNET_ATS_PeerInfo_Iterator  pi_it,
void *  pi_it_cls 
)

Return information all peers currently known to ATS.

Parameters
peerthe respective peer, NULL for 'all' peers
pi_itthe iterator to call for every peer
pi_it_clsthe closure for pi_it

Definition at line 474 of file gnunet-service-ats_addresses.c.

References GNUNET_BANDWIDTH_ZERO, GNUNET_break, GNUNET_CONTAINER_multipeermap_get_multiple(), GNUNET_CONTAINER_multipeermap_iterate(), GNUNET_CONTAINER_multipeermap_size(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELLO_ADDRESS_INFO_NONE, GNUNET_i2s(), GNUNET_log, GNUNET_NO, PeerInfoIteratorContext::it, PeerInfoIteratorContext::it_cls, and peerinfo_it().

Referenced by GAS_handle_request_address_list(), and GAS_performance_add_client().

477 {
478  struct PeerInfoIteratorContext pi_ctx;
479 
480  if (NULL == pi_it)
481  {
482  /* does not make sense without callback */
483  GNUNET_break (0);
484  return;
485  }
487  "Returning information for %s from a total of %u known addresses\n",
488  (NULL == peer)
489  ? "all peers"
490  : GNUNET_i2s (peer),
491  (unsigned int) GNUNET_CONTAINER_multipeermap_size (
492  GSA_addresses));
493  pi_ctx.it = pi_it;
494  pi_ctx.it_cls = pi_it_cls;
495  if (NULL == peer)
497  &peerinfo_it,
498  &pi_ctx);
499  else
501  peer,
502  &peerinfo_it, &pi_ctx);
503  pi_it (pi_it_cls,
504  NULL, NULL, NULL, 0,
505  GNUNET_NO,
506  NULL,
510 }
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
Closure for peerinfo_it().
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
No additional information.
#define GNUNET_BANDWIDTH_ZERO
Convenience definition to use for 0-bandwidth.
#define GNUNET_log(kind,...)
static int peerinfo_it(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Iterator to iterate over a peer&#39;s addresses.
unsigned int GNUNET_CONTAINER_multipeermap_size(const struct GNUNET_CONTAINER_MultiPeerMap *map)
Get the number of key-value pairs in the map.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
int GNUNET_CONTAINER_multipeermap_get_multiple(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map that match a particular key.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transmit_req_addr()

static void transmit_req_addr ( struct AddressIteration ai,
const struct GNUNET_PeerIdentity id,
const char *  plugin_name,
const void *  plugin_addr,
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 
)
static

Send a GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE with the given address details to the client identified in ai.

Parameters
aiour address information context (identifies the client)
idthe peer id this address is for
plugin_namename of the plugin that supports this address
plugin_addraddress
plugin_addr_lenlength of plugin_addr
activeGNUNET_YES if this address is actively used
propperformance information
local_address_infoflags for the address
bandwidth_outcurrent outbound bandwidth assigned to address
bandwidth_incurrent inbound bandwidth assigned to address

Definition at line 552 of file gnunet-service-ats_addresses.c.

References PeerInformationMessage::address_active, PeerInformationMessage::address_length, PeerInformationMessage::address_local_info, PeerInformationMessage::bandwidth_in, PeerInformationMessage::bandwidth_out, AddressIteration::client, env, GNUNET_assert, GNUNET_ATS_properties_hton(), GNUNET_MAX_MESSAGE_SIZE, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_SERVICE_client_get_mq(), id, PeerInformationMessage::id, AddressIteration::id, msg, PeerInformationMessage::peer, PeerInformationMessage::plugin_name_length, and PeerInformationMessage::properties.

Referenced by GAS_handle_request_address_list(), and req_addr_peerinfo_it().

563 {
564  struct GNUNET_MQ_Envelope *env;
565  struct PeerInformationMessage *msg;
566  char *addrp;
567  size_t plugin_name_length;
568  size_t msize;
569 
570  if (NULL != plugin_name)
571  plugin_name_length = strlen (plugin_name) + 1;
572  else
573  plugin_name_length = 0;
574  msize = plugin_addr_len + plugin_name_length;
575 
576  GNUNET_assert (sizeof(struct PeerInformationMessage) + msize
578  env = GNUNET_MQ_msg_extra (msg,
579  msize,
581  msg->id = htonl (ai->id);
582  if (NULL != id)
583  msg->peer = *id;
584  msg->address_length = htons (plugin_addr_len);
585  msg->address_active = ntohl (active);
586  msg->plugin_name_length = htons (plugin_name_length);
588  msg->bandwidth_in = bandwidth_in;
589  if (NULL != prop)
591  prop);
592  msg->address_local_info = htonl ((uint32_t) local_address_info);
593  addrp = (char *) &msg[1];
594  GNUNET_memcpy (addrp,
595  plugin_addr,
596  plugin_addr_len);
597  if (NULL != plugin_name)
598  strcpy (&addrp[plugin_addr_len],
599  plugin_name);
601  env);
602 }
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
uint32_t id
Which ID should be included in the response?
uint16_t address_length
Definition: ats.h:288
struct GNUNET_MQ_Handle * GNUNET_SERVICE_client_get_mq(struct GNUNET_SERVICE_Client *c)
Obtain the message queue of c.
Definition: service.c:2437
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in
Definition: ats.h:318
void GNUNET_ATS_properties_hton(struct GNUNET_ATS_PropertiesNBO *nbo, const struct GNUNET_ATS_Properties *hbo)
Convert ATS properties from host to network byte order.
uint16_t plugin_name_length
Definition: ats.h:293
uint32_t address_local_info
Local-only information of the address, see enum GNUNET_HELLO_AddressInfo.
Definition: ats.h:329
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
struct GNUNET_SERVICE_Client * client
Actual handle to the client.
struct GNUNET_ATS_PropertiesNBO properties
Performance properties of the address.
Definition: ats.h:323
struct GNUNET_PeerIdentity peer
Definition: ats.h:298
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct...
Definition: gnunet_mq_lib.h:52
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out
Definition: ats.h:313
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
#define GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE
Type of the &#39;struct AddressListResponseMessage&#39; sent by ATS to client with information about addresse...
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message...
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:353
uint32_t address_active
Definition: ats.h:303
static char * plugin_name
Name of our plugin.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ req_addr_peerinfo_it()

static void req_addr_peerinfo_it ( void *  cls,
const struct GNUNET_PeerIdentity id,
const char *  plugin_name,
const void *  plugin_addr,
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 
)
static

Iterator for GAS_addresses_get_peer_info(), called with peer-specific information to be passed back to the client.

Parameters
clsclosure with our struct AddressIteration *
idthe peer id
plugin_nameplugin name
plugin_addraddress
plugin_addr_lenlength of plugin_addr
activeis address actively used
propperformance information
local_address_infoadditional local info for the address
bandwidth_outcurrent outbound bandwidth assigned to address
bandwidth_incurrent inbound bandwidth assigned to address

Definition at line 621 of file gnunet-service-ats_addresses.c.

References ai, AddressIteration::all, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_YES, transmit_req_addr(), and GNUNET_BANDWIDTH_Value32NBO::value__.

Referenced by GAS_handle_request_address_list().

631 {
632  struct AddressIteration *ai = cls;
633 
634  if ((NULL == id) &&
635  (NULL == plugin_name) &&
636  (NULL == plugin_addr))
637  {
639  "Address iteration done for one peer\n");
640  return;
641  }
643  "Callback for %s peer `%s' plugin `%s' BW out %u, BW in %u\n",
644  (active == GNUNET_YES) ? "ACTIVE" : "INACTIVE",
645  GNUNET_i2s (id),
646  plugin_name,
647  (unsigned int) ntohl (bandwidth_out.value__),
648  (unsigned int) ntohl (bandwidth_in.value__));
649  /* Transmit result (either if address is active, or if
650  client wanted all addresses) */
651  if ((GNUNET_YES != ai->all) &&
652  (GNUNET_YES != active))
653  return;
654  transmit_req_addr (ai,
655  id,
656  plugin_name,
657  plugin_addr, plugin_addr_len,
658  active,
659  prop,
660  local_address_info,
661  bandwidth_out,
662  bandwidth_in);
663 }
Information we need for the callbacks to return a list of addresses back to the client.
static void transmit_req_addr(struct AddressIteration *ai, const struct GNUNET_PeerIdentity *id, const char *plugin_name, const void *plugin_addr, 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)
Send a GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE with the given address details to the client iden...
uint32_t value__
The actual value (bytes per second).
int all
Are we sending all addresses, or only those that are active?
static struct GNUNET_TRANSPORT_AddressIdentifier * ai
Handle to the operation that publishes our address.
#define GNUNET_log(kind,...)
#define GNUNET_YES
Definition: gnunet_common.h:77
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
static char * plugin_name
Name of our plugin.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GAS_handle_request_address_list()

void GAS_handle_request_address_list ( struct GNUNET_SERVICE_Client client,
const struct AddressListRequestMessage alrm 
)

Handle 'address list request' messages from clients.

Parameters
clsclient that sent the request
alrmthe request message

Definition at line 673 of file gnunet-service-ats_addresses.c.

References AddressListRequestMessage::all, AddressIteration::all, AddressIteration::client, GAS_addresses_get_peer_info(), GNUNET_BANDWIDTH_ZERO, GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELLO_ADDRESS_INFO_NONE, GNUNET_is_zero, GNUNET_log, GNUNET_NO, AddressListRequestMessage::id, AddressIteration::id, AddressListRequestMessage::peer, req_addr_peerinfo_it(), and transmit_req_addr().

Referenced by handle_request_address_list().

675 {
676  struct AddressIteration ai;
677  struct GNUNET_PeerIdentity allzeros;
678 
680  "Received ADDRESSLIST_REQUEST message\n");
681  ai.all = ntohl (alrm->all);
682  ai.id = ntohl (alrm->id);
683  ai.client = client;
684 
685  memset (&allzeros,
686  '\0',
687  sizeof(struct GNUNET_PeerIdentity));
688  if (0 == GNUNET_is_zero (&alrm->peer))
689  {
690  /* Return addresses for all peers */
693  &ai);
694  }
695  else
696  {
697  /* Return addresses for a specific peer */
700  &ai);
701  }
703  "Finished handling `%s' message\n",
704  "ADDRESSLIST_REQUEST");
706  NULL, NULL, NULL,
707  0, GNUNET_NO,
708  NULL,
712 }
Information we need for the callbacks to return a list of addresses back to the client.
uint32_t id
ID used to match replies to this request.
Definition: ats.h:351
static void transmit_req_addr(struct AddressIteration *ai, const struct GNUNET_PeerIdentity *id, const char *plugin_name, const void *plugin_addr, 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)
Send a GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE with the given address details to the client iden...
#define GNUNET_NO
Definition: gnunet_common.h:78
void GAS_addresses_get_peer_info(const struct GNUNET_PeerIdentity *peer, GNUNET_ATS_PeerInfo_Iterator pi_it, void *pi_it_cls)
Return information all peers currently known to ATS.
static struct GNUNET_TRANSPORT_AddressIdentifier * ai
Handle to the operation that publishes our address.
#define GNUNET_is_zero(a)
Check that memory in a is all zeros.
int32_t all
GNUNET_YES to get information about all addresses, GNUNET_NO to only return addresses that are in use...
Definition: ats.h:362
The identity of the host (wraps the signing key of the peer).
No additional information.
#define GNUNET_BANDWIDTH_ZERO
Convenience definition to use for 0-bandwidth.
#define GNUNET_log(kind,...)
struct GNUNET_PeerIdentity peer
Which peer do we care about? All zeros for all.
Definition: ats.h:356
static void req_addr_peerinfo_it(void *cls, const struct GNUNET_PeerIdentity *id, const char *plugin_name, const void *plugin_addr, 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)
Iterator for GAS_addresses_get_peer_info(), called with peer-specific information to be passed back t...
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ GSA_addresses

struct GNUNET_CONTAINER_MultiPeerMap* GSA_addresses

A multihashmap to store all addresses.

A multipeermap mapping peer identities to struct ATS_Address.

Definition at line 37 of file gnunet-service-ats_addresses.c.

Referenced by GAS_normalization_update_property(), GAS_plugin_init(), and handle_feedback().