aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_hello_lib.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-28 15:14:38 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-28 15:14:38 +0000
commitb3883971cd31d198dbd768fffb15960dff0352a6 (patch)
tree1803032b911774f57158013eedfc26a3c0fb5462 /src/include/gnunet_hello_lib.h
parent1fe395444d868f4fd66d44da83cb61a69acc6b66 (diff)
downloadgnunet-b3883971cd31d198dbd768fffb15960dff0352a6.tar.gz
gnunet-b3883971cd31d198dbd768fffb15960dff0352a6.zip
new friend only HELLO type GNUNET_MESSAGE_TYPE_FRIEND_HELLO
Diffstat (limited to 'src/include/gnunet_hello_lib.h')
-rw-r--r--src/include/gnunet_hello_lib.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index 867ff686d..897b84274 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -44,6 +44,10 @@ extern "C"
44 */ 44 */
45#define GNUNET_HELLO_URI_PREFIX "gnunet://hello/" 45#define GNUNET_HELLO_URI_PREFIX "gnunet://hello/"
46 46
47/**
48 * Prefix that every FRIEND HELLO URI must start with.
49 */
50#define GNUNET_FRIEND_HELLO_URI_PREFIX "gnunet://friend-hello/"
47 51
48/** 52/**
49 * An address for communicating with a peer. We frequently 53 * An address for communicating with a peer. We frequently
@@ -79,6 +83,15 @@ struct GNUNET_HELLO_Address
79 83
80 84
81/** 85/**
86 * Return HELLO type
87 *
88 * @param h HELLO Message to test
89 * @param GNUNET_MESSAGE_TYPE_HELLO or GNUNET_MESSAGE_TYPE_FRIEND_HELLO or 0 on error
90 */
91uint16_t
92GNUNET_HELLO_get_type (const struct GNUNET_MessageHeader *h);
93
94/**
82 * Allocate an address struct. 95 * Allocate an address struct.
83 * 96 *
84 * @param peer the peer 97 * @param peer the peer
@@ -180,13 +193,17 @@ typedef size_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls,
180 * expiration time and an iterator that spews the 193 * expiration time and an iterator that spews the
181 * transport addresses. 194 * transport addresses.
182 * 195 *
196 * If friend only is set to GNUNET_YES we create a FRIEND_HELLO which will
197 * not be gossiped to other peers
198 *
183 * @return the hello message 199 * @return the hello message
184 */ 200 */
185struct GNUNET_HELLO_Message * 201struct GNUNET_HELLO_Message *
186GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded 202GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded
187 *publicKey, 203 *publicKey,
188 GNUNET_HELLO_GenerateAddressListCallback addrgen, 204 GNUNET_HELLO_GenerateAddressListCallback addrgen,
189 void *addrgen_cls); 205 void *addrgen_cls,
206 int friend_only);
190 207
191 208
192/** 209/**