GNUnet  0.17.6
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 
39 #ifndef GNUNET_TRANSPORT_HELLO_SERVICE_H
40 #define GNUNET_TRANSPORT_HELLO_SERVICE_H
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #if 0 /* keep Emacsens' auto-indent happy */
45 }
46 #endif
47 #endif
48 
49 #include "gnunet_util_lib.h"
50 #include "gnunet_ats_service.h"
51 
55 #define GNUNET_TRANSPORT_HELLO_VERSION 0x00000000
56 
57 
65 {
70 
76 
82 
88 
95 
102 
108 
113 };
114 
115 
124  void *cls,
125  const struct GNUNET_MessageHeader *hello);
126 
127 
132 
133 
148  void *rec_cls);
149 
150 
156 void
158 
159 
170  void *cls,
171  const struct GNUNET_PeerIdentity *peer,
172  const char *address,
173  enum GNUNET_NetworkType nt,
175 
176 
186 int
189  void *cb_cls);
190 
191 
192 #if 0 /* keep Emacsens' auto-indent happy */
193 {
194 #endif
195 #ifdef __cplusplus
196 }
197 #endif
198 
199 /* ifndef GNUNET_TRANSPORT_HELLO_SERVICE_H */
200 #endif
201  /* end of group */
203  /* end of group addition */
205 
206 /* end of gnunet_transport_hello_service.h */
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
static char * address
GNS address for this phone.
static struct GNUNET_NAT_AUTO_Test * nt
Handle to a NAT test operation.
static struct GNUNET_MQ_Envelope * ac
Handle to current GNUNET_PEERINFO_add_peer() operation.
Automatic transport selection and outbound bandwidth determination.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
Definition: gnunet_nt_lib.h:36
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.
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.
void(* GNUNET_TRANSPORT_HelloUpdateCallback)(void *cls, const struct GNUNET_MessageHeader *hello)
Function called whenever there is an update to the HELLO of this peer.
void GNUNET_TRANSPORT_hello_get_cancel(struct GNUNET_TRANSPORT_HelloGetHandle *ghh)
Stop receiving updates about changes to our HELLO message.
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_AddressClass
Some addresses contain sensitive information or are not suitable for global distribution.
@ GNUNET_TRANSPORT_AC_BT
Addresses useful in the local bluetooth network.
@ GNUNET_TRANSPORT_AC_OTHER
Addresses that fall into no other category (i.e.
@ GNUNET_TRANSPORT_AC_LAN
Addresses useful in the local wired network, i.e.
@ GNUNET_TRANSPORT_AC_GLOBAL
Addresses that are global and are insensitive (i.e.
@ GNUNET_TRANSPORT_AC_NONE
No address.
@ GNUNET_TRANSPORT_AC_GLOBAL_PRIVATE
Addresses that are global and are sensitive (i.e.
@ GNUNET_TRANSPORT_AC_ANY
Bitmask for "any" address.
@ GNUNET_TRANSPORT_AC_WLAN
Addresses useful in the local wireless network, i.e.
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.
Functions to call with this peer's HELLO.
GNUNET_TRANSPORT_HelloUpdateCallback rec
Callback to call once we got our HELLO.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.