GNUnet  0.10.x
gnunet-service-ats_addresses.c
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2011-2015 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
27 #include "platform.h"
32 
33 
38 
39 
43 static void
45 {
47  "# addresses",
48  GNUNET_CONTAINER_multipeermap_size (GSA_addresses),
49  GNUNET_NO);
50 }
51 
52 
58 static void
59 free_address (struct ATS_Address *addr)
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 }
79 
80 
86 static void
88 {
89  unsigned int c;
90 
91  for (c = 0; c < GAS_normalization_queue_length; c++)
92  norm->atsi_abs[c] = UINT64_MAX;
93 }
94 
95 
107 static struct ATS_Address *
109  const char *plugin_name,
110  const void *plugin_addr,
111  size_t plugin_addr_len,
112  uint32_t local_address_info,
113  uint32_t session_id)
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);
124  aa->plugin = GNUNET_strdup (plugin_name);
125  aa->session_id = session_id;
127  init_norm (&aa->norm_delay);
128  init_norm (&aa->norm_distance);
131  return aa;
132 }
133 
134 
139 {
143  uint32_t session_id;
144 
149 
150 };
151 
152 
161 static int
162 find_address_cb (void *cls,
163  const struct GNUNET_PeerIdentity *key,
164  void *value)
165 {
166  struct FindAddressContext *fac = cls;
167  struct ATS_Address *aa = value;
168 
169  if (aa->session_id == fac->session_id)
170  {
171  fac->exact_address = aa;
172  return GNUNET_NO;
173  }
174  return GNUNET_YES;
175 }
176 
177 
185 static struct ATS_Address *
187  uint32_t session_id)
188 {
189  struct FindAddressContext fac;
190 
191  fac.exact_address = NULL;
192  fac.session_id = session_id;
194  peer,
195  &find_address_cb, &fac);
196  return fac.exact_address;
197 }
198 
199 
211 void
213  const char *plugin_name,
214  const void *plugin_addr,
215  size_t plugin_addr_len,
216  uint32_t local_address_info,
217  uint32_t session_id,
218  const struct GNUNET_ATS_Properties *prop)
219 {
220  struct ATS_Address *new_address;
221 
222  if (NULL != find_exact_address (peer,
223  session_id))
224  {
225  GNUNET_break (0);
226  return;
227  }
229  new_address = create_address (peer,
230  plugin_name,
231  plugin_addr,
232  plugin_addr_len,
233  local_address_info,
234  session_id);
235  /* Add a new address */
236  new_address->properties = *prop;
237  new_address->t_added = GNUNET_TIME_absolute_get();
238  new_address->t_last_activity = GNUNET_TIME_absolute_get();
240  GNUNET_CONTAINER_multipeermap_put (GSA_addresses,
241  peer,
242  new_address,
246  "Adding new address for peer `%s' slot %u\n",
247  GNUNET_i2s (peer),
248  session_id);
249  /* Tell solver about new address */
251  GAS_plugin_new_address (new_address);
252  GAS_normalization_update_property (new_address); // FIXME: needed?
254  /* Notify performance clients about new address */
256  new_address->plugin,
257  new_address->addr,
258  new_address->addr_len,
259  new_address->active,
260  &new_address->properties,
261  new_address->local_address_info,
264 }
265 
266 
274 void
276  uint32_t session_id,
277  const struct GNUNET_ATS_Properties *prop)
278 {
279  struct ATS_Address *aa;
280 
281  /* Get existing address */
282  aa = find_exact_address (peer,
283  session_id);
284  if (NULL == aa)
285  {
286  GNUNET_break (0);
287  return;
288  }
289  if (NULL == aa->solver_information)
290  {
291  GNUNET_break (0);
292  return;
293  }
295  "Received ADDRESS_UPDATE for peer `%s' slot %u\n",
296  GNUNET_i2s (peer),
297  (unsigned int) session_id);
299  /* Update address */
301  aa->properties = *prop;
302  /* Notify performance clients about updated address */
304  aa->plugin,
305  aa->addr,
306  aa->addr_len,
307  aa->active,
308  prop,
309  aa->local_address_info,
312 
314 }
315 
316 
323 void
325  uint32_t session_id)
326 {
327  struct ATS_Address *ea;
328 
329  /* Get existing address */
330  ea = find_exact_address (peer,
331  session_id);
332  if (NULL == ea)
333  {
334  GNUNET_break (0);
335  return;
336  }
338  "Received ADDRESS_DESTROYED for peer `%s' session %u\n",
339  GNUNET_i2s (peer),
340  session_id);
341  free_address (ea);
342 }
343 
344 
351 void
353 {
354  GSA_addresses
356  GNUNET_NO);
358 }
359 
360 
369 static int
371  const struct GNUNET_PeerIdentity *key,
372  void *value)
373 {
374  struct ATS_Address *aa = value;
375 
376  free_address (aa);
377  return GNUNET_OK;
378 }
379 
380 
384 void
386 {
388  "Destroying all addresses\n");
389  if (0 ==
390  GNUNET_CONTAINER_multipeermap_size (GSA_addresses))
391  return;
395  NULL);
397 }
398 
399 
403 void
405 {
407  "Shutting down addresses\n");
412  GSA_addresses = NULL;
413 }
414 
415 
420 {
425 
429  void *it_cls;
430 };
431 
432 
441 static int
442 peerinfo_it (void *cls,
443  const struct GNUNET_PeerIdentity *key,
444  void *value)
445 {
446  struct PeerInfoIteratorContext *pi_ctx = cls;
447  struct ATS_Address *addr = value;
448 
449  pi_ctx->it (pi_ctx->it_cls,
450  &addr->peer,
451  addr->plugin,
452  addr->addr,
453  addr->addr_len,
454  addr->active,
455  &addr->properties,
456  addr->local_address_info,
459  return GNUNET_OK;
460 }
461 
462 
470 void
473  void *pi_it_cls)
474 {
475  struct PeerInfoIteratorContext pi_ctx;
476 
477  if (NULL == pi_it)
478  {
479  /* does not make sense without callback */
480  GNUNET_break (0);
481  return;
482  }
484  "Returning information for %s from a total of %u known addresses\n",
485  (NULL == peer)
486  ? "all peers"
487  : GNUNET_i2s (peer),
488  (unsigned int) GNUNET_CONTAINER_multipeermap_size (GSA_addresses));
489  pi_ctx.it = pi_it;
490  pi_ctx.it_cls = pi_it_cls;
491  if (NULL == peer)
493  &peerinfo_it,
494  &pi_ctx);
495  else
497  peer,
498  &peerinfo_it, &pi_ctx);
499  pi_it (pi_it_cls,
500  NULL, NULL, NULL, 0,
501  GNUNET_NO,
502  NULL,
506 }
507 
508 
514 {
519 
523  int all;
524 
528  uint32_t id;
529 
530 };
531 
532 
548 static void
550  const struct GNUNET_PeerIdentity *id,
551  const char *plugin_name,
552  const void *plugin_addr,
553  size_t plugin_addr_len,
554  int active,
555  const struct GNUNET_ATS_Properties *prop,
556  enum GNUNET_HELLO_AddressInfo local_address_info,
557  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
558  struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
559 
560 {
561  struct GNUNET_MQ_Envelope *env;
562  struct PeerInformationMessage *msg;
563  char *addrp;
564  size_t plugin_name_length;
565  size_t msize;
566 
567  if (NULL != plugin_name)
568  plugin_name_length = strlen (plugin_name) + 1;
569  else
570  plugin_name_length = 0;
571  msize = plugin_addr_len + plugin_name_length;
572 
573  GNUNET_assert (sizeof (struct PeerInformationMessage) + msize
575  env = GNUNET_MQ_msg_extra (msg,
576  msize,
578  msg->id = htonl (ai->id);
579  if (NULL != id)
580  msg->peer = *id;
581  msg->address_length = htons (plugin_addr_len);
582  msg->address_active = ntohl (active);
583  msg->plugin_name_length = htons (plugin_name_length);
585  msg->bandwidth_in = bandwidth_in;
586  if (NULL != prop)
588  prop);
589  msg->address_local_info = htonl ((uint32_t) local_address_info);
590  addrp = (char *) &msg[1];
591  GNUNET_memcpy (addrp,
592  plugin_addr,
593  plugin_addr_len);
594  if (NULL != plugin_name)
595  strcpy (&addrp[plugin_addr_len],
596  plugin_name);
598  env);
599 }
600 
601 
617 static void
619  const struct GNUNET_PeerIdentity *id,
620  const char *plugin_name,
621  const void *plugin_addr,
622  size_t plugin_addr_len,
623  int active,
624  const struct GNUNET_ATS_Properties *prop,
625  enum GNUNET_HELLO_AddressInfo local_address_info,
628 {
629  struct AddressIteration *ai = cls;
630 
631  if ( (NULL == id) &&
632  (NULL == plugin_name) &&
633  (NULL == plugin_addr) )
634  {
636  "Address iteration done for one peer\n");
637  return;
638  }
640  "Callback for %s peer `%s' plugin `%s' BW out %u, BW in %u\n",
641  (active == GNUNET_YES) ? "ACTIVE" : "INACTIVE",
642  GNUNET_i2s (id),
643  plugin_name,
644  (unsigned int) ntohl (bandwidth_out.value__),
645  (unsigned int) ntohl (bandwidth_in.value__));
646  /* Transmit result (either if address is active, or if
647  client wanted all addresses) */
648  if ( (GNUNET_YES != ai->all) &&
649  (GNUNET_YES != active))
650  return;
651  transmit_req_addr (ai,
652  id,
653  plugin_name,
654  plugin_addr, plugin_addr_len,
655  active,
656  prop,
657  local_address_info,
658  bandwidth_out,
659  bandwidth_in);
660 }
661 
662 
669 void
671  const struct AddressListRequestMessage *alrm)
672 {
673  struct AddressIteration ai;
674  struct GNUNET_PeerIdentity allzeros;
675 
677  "Received ADDRESSLIST_REQUEST message\n");
678  ai.all = ntohl (alrm->all);
679  ai.id = ntohl (alrm->id);
680  ai.client = client;
681 
682  memset (&allzeros,
683  '\0',
684  sizeof (struct GNUNET_PeerIdentity));
685  if (0 == GNUNET_is_zero (&alrm->peer))
686  {
687  /* Return addresses for all peers */
690  &ai);
691  }
692  else
693  {
694  /* Return addresses for a specific peer */
697  &ai);
698  }
700  "Finished handling `%s' message\n",
701  "ADDRESSLIST_REQUEST");
702  transmit_req_addr (&ai,
703  NULL, NULL, NULL,
704  0, GNUNET_NO,
705  NULL,
709 }
710 
711 
712 
713 /* end of gnunet-service-ats_addresses.c */
static void init_norm(struct GAS_NormalizationInfo *norm)
Initialize norm.
Information we need for the callbacks to return a list of addresses back to the client.
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
uint32_t id
Which ID should be included in the response?
static void update_addresses_stat()
Update statistic on number of addresses.
uint32_t session_id
Session ID, can never be 0.
#define GAS_normalization_queue_length
struct GNUNET_ATS_Properties properties
ATS performance information for this address.
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.
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...
uint16_t address_length
Definition: ats.h:294
int active
Is this the active address for this peer?
struct GNUNET_MQ_Handle * GNUNET_SERVICE_client_get_mq(struct GNUNET_SERVICE_Client *c)
Obtain the message queue of c.
Definition: service.c:2734
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.
Closure for find_address_cb()
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in
Definition: ats.h:324
uint64_t atsi_abs[3]
Averaging queue.
const void * addr
Address (in plugin-specific binary format).
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:299
uint32_t address_local_info
Local-only information of the address, see enum GNUNET_HELLO_AddressInfo.
Definition: ats.h:335
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.
uint32_t id
ID used to match replies to this request.
Definition: ats.h:358
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...
ats service address: management of ATS properties and preferences normalization
static struct GNUNET_HashCode session_id
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.
ats service plugin management
#define GNUNET_NO
Definition: gnunet_common.h:81
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
size_t addr_len
Address length, number of bytes in addr.
char * plugin
Plugin name.
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.
struct GNUNET_SERVICE_Client * client
Actual handle to the client.
void GAS_addresses_destroy_all()
Remove all addresses.
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).
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
struct GNUNET_STATISTICS_Handle * GSA_stats
Handle for statistics.
ATS performance characteristics for an address.
struct GNUNET_ATS_PropertiesNBO properties
Performance properties of the address.
Definition: ats.h:329
static int find_address_cb(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Find session matching given session ID.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GNUNET_PeerIdentity peer
Definition: ats.h:304
struct ATS_Address * exact_address
Where to store matching address result.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
ats service, interaction with &#39;performance&#39; API
uint32_t value__
The actual value (bytes per second).
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.
Handle to a client that is connected to a service.
Definition: service.c:249
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.
#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
#define GNUNET_memcpy(dst, src, n)
static char * value
Value of the record to add/remove.
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out
Definition: ats.h:319
Closure for peerinfo_it().
static struct ATS_Address * find_exact_address(const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
Find the exact address.
int all
Are we sending all addresses, or only those that are active?
static char * plugin_name
Solver plugin name as string.
struct GAS_NormalizationInfo norm_utilization_out
Normalized utilization outbound for this address.
Internal representation of the hash map.
Information provided by ATS normalization.
void GNUNET_STATISTICS_set(struct GNUNET_STATISTICS_Handle *handle, const char *name, uint64_t value, int make_persistent)
Set statistic value for the peer.
void(* GNUNET_ATS_PeerInfo_Iterator)(void *cls, const struct GNUNET_PeerIdentity *id, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, const int address_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()
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:118
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.
struct GNUNET_TIME_Absolute t_added
Time when address was added.
Address with additional information.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_TRANSPORT_AddressIdentifier * ai
Handle to the operation that publishes our address.
void * solver_information
Solver-specific information for this address.
Client to service: please give us an overview of the addresses.
Definition: ats.h:348
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
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
void GAS_addresses_destroy(const struct GNUNET_PeerIdentity *peer, uint32_t session_id)
Remove an address for a peer.
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
#define GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE
Type of the &#39;struct AddressListResponseMessage&#39; sent by ATS to client with information about addresse...
ats service address management
#define GNUNET_is_zero(a)
Check that memory in a is all zeros.
uint32_t fac(uint32_t x)
Factorial.
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message...
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.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
int32_t all
GNUNET_YES to get information about all addresses, GNUNET_NO to only return addresses that are in use...
Definition: ats.h:369
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.
uint32_t assigned_bw_out
Outbound bandwidth assigned by solver.
struct GAS_NormalizationInfo norm_utilization_in
Normalized utilization inbound for this address.
#define GNUNET_log(kind,...)
struct GAS_NormalizationInfo norm_delay
Normalized delay information for this address.
#define GNUNET_YES
Definition: gnunet_common.h:80
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
void GAS_addresses_init()
Initialize address subsystem.
void GAS_addresses_done()
Shutdown address subsystem.
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.
uint32_t address_active
Definition: ats.h:309
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.
GNUNET_HELLO_AddressInfo
Additional local information about an address.
struct GNUNET_PeerIdentity peer
Which peer do we care about? All zeros for all.
Definition: ats.h:363
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.
enum GNUNET_HELLO_AddressInfo local_address_info
Field to store local flags.
static int destroy_all_address_it(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Destroy all addresses iterator.
#define GNUNET_malloc(size)
Wrapper around malloc.
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...
struct GAS_NormalizationInfo norm_distance
Normalized distance information for this address.
uint32_t session_id
Session Id to look for.
#define GNUNET_free(ptr)
Wrapper around free.
Category of last resort.
Definition: gnunet_nt_lib.h:40
void GAS_handle_request_address_list(struct GNUNET_SERVICE_Client *client, const struct AddressListRequestMessage *alrm)
Handle &#39;address list request&#39; messages from clients.
static void free_address(struct ATS_Address *addr)
Free the given address.
struct GNUNET_TIME_Absolute t_last_activity
Time when address had last activity (update, in uses)