2 This file is part of GNUnet.
3 Copyright (C) 2010,2011 GNUnet e.V.
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU 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.
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.
16 * @file transport/gnunet-service-transport_hello.h
18 * @author Christian Grothoff
20 #ifndef GNUNET_SERVICE_TRANSPORT_HELLO_H
21 #define GNUNET_SERVICE_TRANSPORT_HELLO_H
23 #include "gnunet_statistics_service.h"
24 #include "gnunet_transport_service.h"
25 #include "gnunet_util_lib.h"
26 #include "gnunet_hello_lib.h"
30 * Signature of a function to call whenever our hello changes.
33 * @param hello updated HELLO
36 (*GST_HelloCallback) (void *cls,
37 const struct GNUNET_MessageHeader *hello);
41 * Initialize the HELLO module.
43 * @param friend_only use a friend only hello
44 * @param cb function to call whenever our HELLO changes
45 * @param cb_cls closure for @a cb
48 GST_hello_start (int friend_only,
54 * Shutdown the HELLO module.
57 GST_hello_stop (void);
61 * Obtain this peers HELLO message.
63 * @return our HELLO message
65 const struct GNUNET_MessageHeader *
70 * Add or remove an address from this peer's HELLO message.
72 * @param addremove #GNUNET_YES to add, #GNUNET_NO to remove
73 * @param address address to add or remove
76 GST_hello_modify_addresses (int addremove,
77 const struct GNUNET_HELLO_Address *address);
81 * Test if a particular address is one of ours.
83 * @param address the address to test
84 * @param sig location where to cache PONG signatures for this address [set]
85 * @param sig_expiration how long until the current 'sig' expires?
86 * (ZERO if sig was never created) [set]
87 * @return #GNUNET_YES if this is one of our addresses,
91 GST_hello_test_address (const struct GNUNET_HELLO_Address *address,
92 struct GNUNET_CRYPTO_EddsaSignature **sig,
93 struct GNUNET_TIME_Absolute **sig_expiration);
97 /* end of file gnunet-service-transport_hello.h */