diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-04-09 11:57:20 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-04-09 11:57:20 +0000 |
commit | 768146b98805c7cecea058b283c6239ab3283581 (patch) | |
tree | 18c60941c379584185eb6bb9a1d78afd71493597 /src/hostlist/gnunet-daemon-hostlist.h | |
parent | 5d044d4e01225ff4e0d6ec0f989ca8eb35f1528c (diff) | |
download | gnunet-768146b98805c7cecea058b283c6239ab3283581.tar.gz gnunet-768146b98805c7cecea058b283c6239ab3283581.zip |
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.h')
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.h b/src/hostlist/gnunet-daemon-hostlist.h new file mode 100644 index 000000000..7c30344b2 --- /dev/null +++ b/src/hostlist/gnunet-daemon-hostlist.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2009 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 2, or (at your | ||
8 | 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 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file hostlist/gnunet-daemon-hostlist.h | ||
23 | * @brief common internal definitions for hostlist daemon | ||
24 | * @author Matthias Wachs | ||
25 | */ | ||
26 | #include <stdlib.h> | ||
27 | #include "platform.h" | ||
28 | #include "hostlist-client.h" | ||
29 | #include "hostlist-server.h" | ||
30 | #include "gnunet_core_service.h" | ||
31 | #include "gnunet_getopt_lib.h" | ||
32 | #include "gnunet_protocols.h" | ||
33 | #include "gnunet_program_lib.h" | ||
34 | #include "gnunet_statistics_service.h" | ||
35 | #include "gnunet_strings_lib.h" | ||
36 | #include "gnunet_time_lib.h" | ||
37 | #include "gnunet_util_lib.h" | ||
38 | |||
39 | /** | ||
40 | * General hostlist daemon debugging. | ||
41 | */ | ||
42 | #define DEBUG_HOSTLIST GNUNET_NO | ||
43 | |||
44 | /** | ||
45 | * A HOSTLIST_ADV message is used to exchange information about | ||
46 | * hostlist advertisements. This struct is always | ||
47 | * followed by the actual url under which the hostlist can be obtained: | ||
48 | * | ||
49 | * 1) transport-name (0-terminated) | ||
50 | * 2) address-length (uint32_t, network byte order; possibly | ||
51 | * unaligned!) | ||
52 | * 3) address expiration (GNUNET_TIME_AbsoluteNBO); possibly | ||
53 | * unaligned!) | ||
54 | * 4) address (address-length bytes; possibly unaligned!) | ||
55 | */ | ||
56 | struct GNUNET_HOSTLIST_ADV_Message | ||
57 | { | ||
58 | /** | ||
59 | * Type will be GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT. | ||
60 | */ | ||
61 | struct GNUNET_MessageHeader header; | ||
62 | |||
63 | /** | ||
64 | * Always zero (for alignment). | ||
65 | */ | ||
66 | uint32_t reserved GNUNET_PACKED; | ||
67 | }; | ||
68 | |||
69 | |||
70 | /* end of gnunet-daemon-hostlist.h */ | ||