GNUnet  0.11.x
gnunet_transport_hello_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009-2016 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 
36 #ifndef GNUNET_TRANSPORT_HELLO_SERVICE_H
37 #define GNUNET_TRANSPORT_HELLO_SERVICE_H
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #if 0 /* keep Emacsens' auto-indent happy */
42 }
43 #endif
44 #endif
45 
46 #include "gnunet_util_lib.h"
47 #include "gnunet_ats_service.h"
48 
52 #define GNUNET_TRANSPORT_HELLO_VERSION 0x00000000
53 
54 
62 {
67 
73 
79 
85 
92 
99 
105 
110 };
111 
112 
121  void *cls,
122  const struct GNUNET_MessageHeader *hello);
123 
124 
129 
130 
145  void *rec_cls);
146 
147 
153 void
155 
156 
167  void *cls,
168  const struct GNUNET_PeerIdentity *peer,
169  const char *address,
170  enum GNUNET_NetworkType nt,
172 
173 
183 int
186  void *cb_cls);
187 
188 
189 #if 0 /* keep Emacsens' auto-indent happy */
190 {
191 #endif
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 /* ifndef GNUNET_TRANSPORT_HELLO_SERVICE_H */
197 #endif
198  /* end of group */
200 
201 /* end of gnunet_transport_hello_service.h */
Addresses useful in the local wireless network, i.e.
Addresses useful in the local wired network, i.e.
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
void(* GNUNET_TRANSPORT_HelloUpdateCallback)(void *cls, const struct GNUNET_MessageHeader *hello)
Function called whenever there is an update to the HELLO of this peer.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:35
int GNUNET_TRANSPORT_hello_parse(const struct GNUNET_MessageHeader *hello, GNUNET_TRANSPORT_AddressCallback cb, void *cb_cls)
Parse a HELLO message that we have received into its constituent addresses.
GNUNET_TRANSPORT_HelloUpdateCallback rec
Callback to call once we got our HELLO.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
static struct GNUNET_NAT_AUTO_Test * nt
Handle to a NAT test operation.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
static struct GNUNET_MQ_Envelope * ac
Handle to current GNUNET_PEERINFO_add_peer() operation.
Addresses that are global and are insensitive (i.e.
static struct GNUNET_TRANSPORT_HelloGetHandle * ghh
Handle to get our current HELLO.
GNUNET_TRANSPORT_AddressClass
Some addresses contain sensitive information or are not suitable for global distribution.
Addresses that fall into no other category (i.e.
The identity of the host (wraps the signing key of the peer).
configuration data
Definition: configuration.c:85
struct GNUNET_TRANSPORT_HelloGetHandle * GNUNET_TRANSPORT_hello_get(const struct GNUNET_CONFIGURATION_Handle *cfg, enum GNUNET_TRANSPORT_AddressClass ac, GNUNET_TRANSPORT_HelloUpdateCallback rec, void *rec_cls)
Obtain updates on changes to the HELLO message for this peer.
Automatic transport selection and outbound bandwidth determination.
Functions to call with this peer&#39;s HELLO.
Header for all communications.
Time for absolute times used by GNUnet, in microseconds.
void(* GNUNET_TRANSPORT_AddressCallback)(void *cls, const struct GNUNET_PeerIdentity *peer, const char *address, enum GNUNET_NetworkType nt, struct GNUNET_TIME_Absolute expiration)
Function with addresses found in a HELLO.
Addresses useful in the local bluetooth network.
static char * address
GNS address for this phone.
void GNUNET_TRANSPORT_hello_get_cancel(struct GNUNET_TRANSPORT_HelloGetHandle *ghh)
Stop receiving updates about changes to our HELLO message.
Addresses that are global and are sensitive (i.e.