2 This file is part of GNUnet.
3 (C) 2010,2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
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 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file transport/gnunet-service-transport_neighbours.h
23 * @brief neighbour management API
24 * @author Christian Grothoff
26 #ifndef GNUNET_SERVICE_TRANSPORT_MANIPULATION_H
27 #define GNUNET_SERVICE_TRANSPORT_MANIPULATION_H
30 #include "gnunet-service-transport_blacklist.h"
31 #include "gnunet-service-transport_clients.h"
32 #include "gnunet-service-transport_hello.h"
33 #include "gnunet-service-transport_neighbours.h"
34 #include "gnunet-service-transport_plugins.h"
35 #include "gnunet-service-transport_validation.h"
36 #include "gnunet-service-transport.h"
37 #include "transport.h"
41 GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client,
42 const struct GNUNET_MessageHeader *message);
45 GST_manipulation_send (const struct GNUNET_PeerIdentity *target, const void *msg,
46 size_t msg_size, struct GNUNET_TIME_Relative timeout,
47 GST_NeighbourSendContinuation cont, void *cont_cls);
49 struct GNUNET_TIME_Relative
50 GST_manipulation_recv (void *cls,
51 const struct GNUNET_PeerIdentity *peer,
52 const struct GNUNET_MessageHeader *message,
53 struct Session *session,
54 const char *sender_address,
55 uint16_t sender_address_len);
58 * Function that will be called to figure if an address is an loopback,
59 * LAN, WAN etc. address
62 * @param peer the peer
63 * @param address binary address
64 * @param address_len length of the address
65 * @param session the session
66 * @param ats the ats information
67 * @param ats_count the number of ats information
70 GST_manipulation_metrics_recv (void *cls,
71 struct GNUNET_PeerIdentity *peer,
74 struct Session *session,
75 struct GNUNET_ATS_Information *ats,
79 GST_manipulation_init (const struct GNUNET_CONFIGURATION_Handle *GST_cfg,
80 GNUNET_TRANSPORT_UpdateAddressMetrics metric_update_cb);
83 GST_manipulation_stop ();
86 /* end of file gnunet-service-transport_neighbours.h */