aboutsummaryrefslogtreecommitdiff
path: root/src/include/block_dns.h
diff options
context:
space:
mode:
authorPhilipp Tölke <toelke@in.tum.de>2010-10-26 13:55:55 +0000
committerPhilipp Tölke <toelke@in.tum.de>2010-10-26 13:55:55 +0000
commit3900beb1ed0370041bccbe84643d84a6f5204475 (patch)
tree18c28432dfeaac345892b4f435d3674c3aadc829 /src/include/block_dns.h
parent8d058446a4a288d87f58a021622ecad6371519cb (diff)
downloadgnunet-3900beb1ed0370041bccbe84643d84a6f5204475.tar.gz
gnunet-3900beb1ed0370041bccbe84643d84a6f5204475.zip
modified the DNS_Record-block
Diffstat (limited to 'src/include/block_dns.h')
-rw-r--r--src/include/block_dns.h40
1 files changed, 26 insertions, 14 deletions
diff --git a/src/include/block_dns.h b/src/include/block_dns.h
index d8f3fa50e..6be82b126 100644
--- a/src/include/block_dns.h
+++ b/src/include/block_dns.h
@@ -2,26 +2,38 @@
2#define _GNVPN_BLOCKDNS_H_ 2#define _GNVPN_BLOCKDNS_H_
3 3
4#include "gnunet_common.h" 4#include "gnunet_common.h"
5#include "gnunet_crypto_lib.h"
5 6
6/** 7/**
7 * Bitmask describing what ip-services are supported by services 8 * Bitmask describing what IP-protocols are supported by the service
8 * It is 2 bytes long
9 */ 9 */
10struct GNUNET_ipservices { 10enum GNUNET_DNS_ServiceTypes
11 unsigned UDP:1 GNUNET_PACKED; 11{
12 unsigned TCP:1 GNUNET_PACKED; 12 GNUNET_DNS_SERVICE_TYPE_UDP = 1,
13 unsigned RESERVED:14 GNUNET_PACKED; 13 GNUNET_DNS_SERVICE_TYPE_TCP = 2
14}; 14};
15 15
16
16/** 17/**
17 * This is the structure describing an dns-record such as www.gnunet. 18 * This is the structure describing an dns-record such as www.gnunet.
18 */ 19 */
19struct GNUNET_DNS_Record 20struct GNUNET_DNS_Record
20{ 21{
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 /**
22 * The peer providing this service 34 * The peer providing this service
23 */ 35 */
24 struct GNUNET_PeerIdentity peer; 36 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded peer;
25 37
26 /** 38 /**
27 * The descriptor for the service 39 * The descriptor for the service
@@ -30,20 +42,20 @@ struct GNUNET_DNS_Record
30 GNUNET_HashCode service_descriptor; 42 GNUNET_HashCode service_descriptor;
31 43
32 /** 44 /**
33 * What connection-types (UDP, TCP, ...) are supported by the service 45 * When does this record expire?
34 */ 46 */
35 struct GNUNET_ipservices connectiontypes; 47 struct GNUNET_TIME_Absolute expiration_time;
36 48
37 /** 49 /**
38 * The length of the name of the service 50 * Four TCP and UDP-Ports that are used by this service, big endian format
39 */ 51 */
40 unsigned char namelen; 52 uint64_t ports;
41 53
42 /** 54 /**
43 * The name of the service 55 * What connection-types (UDP, TCP, ...) are supported by the service.
44 * This is namelen bytes 56 * Contains an 'enum GNUNET_DNS_ServiceTypes' in big endian format.
45 */ 57 */
46 char name[1]; 58 uint32_t service_type;
47}; 59};
48 60
49#endif 61#endif