SHUTDOWN
[oweals/gnunet.git] / src / include / block_dns.h
1 #ifndef _GNVPN_BLOCKDNS_H_
2 #define _GNVPN_BLOCKDNS_H_
3
4 #include "gnunet_common.h"
5 #include "gnunet_crypto_lib.h"
6
7 /**
8  * Bitmask describing what IP-protocols are supported by the service
9  */
10 enum GNUNET_DNS_ServiceTypes
11 {
12   GNUNET_DNS_SERVICE_TYPE_UDP = 1,
13   GNUNET_DNS_SERVICE_TYPE_TCP = 2
14 };
15
16
17 /**
18  * This is the structure describing an dns-record such as www.gnunet.
19  */
20 struct GNUNET_DNS_Record
21 {
22   /**
23    * Signature of the peer affirming that he is offering the service.
24    */
25   struct GNUNET_CRYPTO_RsaSignature signature;
26
27   /**
28    * Beginning of signed portion of the record, signs everything until
29    * the end of the struct.
30    */
31   struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
32
33   /**
34    * The peer providing this service
35    */
36   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded peer;
37
38   /**
39    * The descriptor for the service
40    * (a peer may provide more than one service)
41    */
42   GNUNET_HashCode service_descriptor;
43
44   /**
45    * When does this record expire?
46    */
47   struct GNUNET_TIME_Absolute expiration_time;
48
49   /**
50    * Four TCP and UDP-Ports that are used by this service, big endian format
51    */
52   uint64_t ports;
53
54   /**
55    * What connection-types (UDP, TCP, ...) are supported by the service.
56    * Contains an 'enum GNUNET_DNS_ServiceTypes' in big endian format.
57    */
58   uint32_t service_type;
59 };
60
61 #endif