GNUnet  0.19.5
gnunet-service-transport_validation.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010,2011 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 
26 #ifndef GNUNET_SERVICE_TRANSPORT_VALIDATION_H
27 #define GNUNET_SERVICE_TRANSPORT_VALIDATION_H
28 
31 #include "gnunet_util_lib.h"
32 #include "gnunet_hello_lib.h"
33 
39 void
40 GST_validation_start (unsigned int max_fds);
41 
42 
46 void
47 GST_validation_stop (void);
48 
49 
59 void
61  int in_use);
62 
63 
73 int
75  const struct GNUNET_MessageHeader *hdr,
76  const struct GNUNET_HELLO_Address *sender_address,
77  struct GNUNET_ATS_Session *session);
78 
79 
88 int
90  const struct GNUNET_MessageHeader *hdr);
91 
92 
100 int
102 
103 
109 void
111 
112 
126 typedef void
127 (*GST_ValidationAddressCallback) (void *cls,
128  struct GNUNET_TIME_Absolute valid_until,
129  struct GNUNET_TIME_Absolute validation_block,
130  const struct GNUNET_HELLO_Address *address);
131 
132 
140 void
142  GST_ValidationAddressCallback cb, void *cb_cls);
143 
144 
145 #endif
146 /* end of file gnunet-service-transport_validation.h */
static char * address
GNS address for this phone.
int GST_validation_handle_ping(const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *hdr, const struct GNUNET_HELLO_Address *sender_address, struct GNUNET_ATS_Session *session)
We've received a PING.
int GST_validation_handle_hello(const struct GNUNET_MessageHeader *hello)
We've received a HELLO, check which addresses are new and trigger validation.
void(* GST_ValidationAddressCallback)(void *cls, struct GNUNET_TIME_Absolute valid_until, struct GNUNET_TIME_Absolute validation_block, const struct GNUNET_HELLO_Address *address)
Function called for each address (or address status change) that the validation module is aware of (f...
void GST_validation_start(unsigned int max_fds)
Start the validation subsystem.
void GST_validation_handle_address(const struct GNUNET_HELLO_Address *address)
Validate an individual address.
void GST_validation_stop(void)
Stop the validation subsystem.
void GST_validation_get_addresses(const struct GNUNET_PeerIdentity *target, GST_ValidationAddressCallback cb, void *cb_cls)
Call the given function for each address for the given target.
void GST_validation_set_address_use(const struct GNUNET_HELLO_Address *address, int in_use)
Update if we are using an address for a connection actively right now.
int GST_validation_handle_pong(const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *hdr)
We've received a PONG.
Helper library for handling HELLOs.
API to create, modify and access statistics.
Transport service plugin API.
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 absolute times used by GNUnet, in microseconds.