GNUnet  0.20.0
gnunet-service-transport_manipulation.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010-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 #ifndef GNUNET_SERVICE_TRANSPORT_MANIPULATION_H
28 #define GNUNET_SERVICE_TRANSPORT_MANIPULATION_H
29 
30 #include "platform.h"
36 #include "transport.h"
37 
38 
44 void
46 
47 
58 void
59 GST_manipulation_send (const struct GNUNET_PeerIdentity *target,
60  const void *msg,
61  size_t msg_size,
64  void *cont_cls);
65 
66 
78 GST_manipulation_recv (void *cls,
79  const struct GNUNET_HELLO_Address *address,
80  struct GNUNET_ATS_Session *session,
81  const struct GNUNET_MessageHeader *message);
82 
83 
92 void
94  struct GNUNET_ATS_Session *session,
95  struct GNUNET_ATS_Properties *prop);
96 
97 
103 void
105 
106 
110 void
111 GST_manipulation_init (void);
112 
113 
117 void
118 GST_manipulation_stop (void);
119 
120 #endif
121 /* end of file gnunet-service-transport_neighbours.h */
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
static struct GNUNET_TIME_Relative timeout
Desired timeout for the lookup (default is no timeout).
Definition: gnunet-abd.c:61
static char * address
GNS address for this phone.
void GST_manipulation_manipulate_metrics(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, struct GNUNET_ATS_Properties *prop)
Function that will be called to manipulate ATS information according to current manipulation settings...
void GST_manipulation_set_metric(const struct TrafficMetricMessage *tm)
Set traffic metric to manipulate.
void GST_manipulation_send(const struct GNUNET_PeerIdentity *target, const void *msg, size_t msg_size, struct GNUNET_TIME_Relative timeout, GST_NeighbourSendContinuation cont, void *cont_cls)
Adapter function between transport's send function and transport plugins.
struct GNUNET_TIME_Relative GST_manipulation_recv(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
Adapter function between transport plugins and transport receive function manipulation delays for nex...
void GST_manipulation_init(void)
Initialize traffic manipulation.
void GST_manipulation_peer_disconnect(const struct GNUNET_PeerIdentity *peer)
Notify manipulation about disconnect so it can discard queued messages.
void GST_manipulation_stop(void)
Stop traffic manipulation.
neighbour manipulation API, allows manipulation of performance metrics (delay and towards ATS)
void(* GST_NeighbourSendContinuation)(void *cls, int success, size_t bytes_payload, size_t bytes_on_wire)
Function called after the transmission is done.
ATS performance characteristics for an address.
Session handle for connections.
An address for communicating with a peer.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for relative time used by GNUnet, in microseconds.
Message from the library to the transport service asking for binary addresses known for a peer.
Definition: transport.h:494
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
common internal definitions for transport service