GNUnet  0.20.0
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 
50 #include "gnunet_util_lib.h"
51 #include "gnunet_ats_service.h"
52 
56 #define GNUNET_TRANSPORT_HELLO_VERSION 0x00000000
57 
58 
66 {
71 
77 
83 
89 
96 
103 
109 
114 };
115 
116 
125  void *cls,
126  const struct GNUNET_MessageHeader *hello);
127 
128 
133 
134 
149  void *rec_cls);
150 
151 
157 void
159 
160 
171  void *cls,
172  const struct GNUNET_PeerIdentity *peer,
173  const char *address,
174  enum GNUNET_NetworkType nt,
176 
177 
187 int
190  void *cb_cls);
191 
192 
193 #if 0 /* keep Emacsens' auto-indent happy */
194 {
195 #endif
196 #ifdef __cplusplus
197 }
198 #endif
199 
200 /* ifndef GNUNET_TRANSPORT_HELLO_SERVICE_H */
201 #endif
202  /* end of group */
204  /* end of group addition */
206 
207 /* 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:39
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.