2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors)
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 3, or (at your
8 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 General Public License for more details.
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.
22 * @file include/block_dns.h
23 * @author Philipp Toelke
25 #ifndef _GNVPN_BLOCKDNS_H_
26 #define _GNVPN_BLOCKDNS_H_
28 #include "gnunet_common.h"
29 #include "gnunet_crypto_lib.h"
32 * Bitmask describing what IP-protocols are supported by the service
34 enum GNUNET_DNS_ServiceTypes
36 GNUNET_DNS_SERVICE_TYPE_UDP = 1,
37 GNUNET_DNS_SERVICE_TYPE_TCP = 2
40 GNUNET_NETWORK_STRUCT_BEGIN
43 * This is the structure describing an dns-record such as www.gnunet.
45 struct GNUNET_DNS_Record
48 * Signature of the peer affirming that he is offering the service.
50 struct GNUNET_CRYPTO_RsaSignature signature;
53 * Beginning of signed portion of the record, signs everything until
54 * the end of the struct.
56 struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
59 * The peer providing this service
61 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded peer;
64 * The descriptor for the service
65 * (a peer may provide more than one service)
67 GNUNET_HashCode service_descriptor GNUNET_PACKED;
70 * When does this record expire?
72 struct GNUNET_TIME_AbsoluteNBO expiration_time;
75 * Four TCP and UDP-Ports that are used by this service, big endian format
77 uint64_t ports GNUNET_PACKED;
80 * What connection-types (UDP, TCP, ...) are supported by the service.
81 * Contains an 'enum GNUNET_DNS_ServiceTypes' in big endian format.
83 uint32_t service_type GNUNET_PACKED;
85 GNUNET_NETWORK_STRUCT_END