aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-04-09 11:57:20 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-04-09 11:57:20 +0000
commit768146b98805c7cecea058b283c6239ab3283581 (patch)
tree18c60941c379584185eb6bb9a1d78afd71493597 /src/hostlist/gnunet-daemon-hostlist.c
parent5d044d4e01225ff4e0d6ec0f989ca8eb35f1528c (diff)
downloadgnunet-768146b98805c7cecea058b283c6239ab3283581.tar.gz
gnunet-768146b98805c7cecea058b283c6239ab3283581.zip
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index cf4be4798..8eaad00ff 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -42,8 +42,6 @@
42#include "gnunet_time_lib.h" 42#include "gnunet_time_lib.h"
43#include "gnunet_util_lib.h" 43#include "gnunet_util_lib.h"
44 44
45#define DEBUG_HOSTLIST GNUNET_YES
46
47/** 45/**
48 * Set if we are allowed to advertise our hostlist to others. 46 * Set if we are allowed to advertise our hostlist to others.
49 */ 47 */
@@ -120,6 +118,31 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
120 GNUNET_GETOPT_OPTION_END 118 GNUNET_GETOPT_OPTION_END
121}; 119};
122 120
121/**
122 * A HOSTLIST_ADV message is used to exchange information about
123 * hostlist advertisements. This struct is always
124 * followed by the actual url under which the hostlist can be obtained:
125 *
126 * 1) transport-name (0-terminated)
127 * 2) address-length (uint32_t, network byte order; possibly
128 * unaligned!)
129 * 3) address expiration (GNUNET_TIME_AbsoluteNBO); possibly
130 * unaligned!)
131 * 4) address (address-length bytes; possibly unaligned!)
132 */
133struct GNUNET_HOSTLIST_ADV_Message
134{
135 /**
136 * Type will be GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT.
137 */
138 struct GNUNET_MessageHeader header;
139
140 /**
141 * Always zero (for alignment).
142 */
143 uint32_t reserved GNUNET_PACKED;
144};
145
123 146
124static void 147static void
125core_init (void *cls, 148core_init (void *cls,