include plugin in gnunet-transport output
[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 GNUNET_NETWORK_STRUCT_BEGIN
17
18 /**
19  * This is the structure describing an dns-record such as www.gnunet.
20  */
21 struct GNUNET_DNS_Record
22 {
23   /**
24    * Signature of the peer affirming that he is offering the service.
25    */
26   struct GNUNET_CRYPTO_RsaSignature signature;
27
28   /**
29    * Beginning of signed portion of the record, signs everything until
30    * the end of the struct.
31    */
32   struct GNUNET_CRYPTO_RsaSignaturePurpose purpose;
33
34   /**
35    * The peer providing this service
36    */
37   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded peer;
38
39   /**
40    * The descriptor for the service
41    * (a peer may provide more than one service)
42    */
43   GNUNET_HashCode service_descriptor GNUNET_PACKED;
44
45   /**
46    * When does this record expire?
47    */
48   struct GNUNET_TIME_AbsoluteNBO expiration_time;
49
50   /**
51    * Four TCP and UDP-Ports that are used by this service, big endian format
52    */
53   uint64_t ports GNUNET_PACKED;
54
55   /**
56    * What connection-types (UDP, TCP, ...) are supported by the service.
57    * Contains an 'enum GNUNET_DNS_ServiceTypes' in big endian format.
58    */
59   uint32_t service_type GNUNET_PACKED;
60 };
61 GNUNET_NETWORK_STRUCT_END
62
63 #endif