aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-07-31 07:37:22 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-07-31 07:37:22 +0000
commit0bcdd97c38f467001fa3723d9de22f8f135a2d5a (patch)
tree9eb8f4584e52742b0a3109a209eff7658731e769 /src/gns
parent6429ccfb2ffb8c44a1d10a28a545b72f64c0b6da (diff)
downloadgnunet-0bcdd97c38f467001fa3723d9de22f8f135a2d5a.tar.gz
gnunet-0bcdd97c38f467001fa3723d9de22f8f135a2d5a.zip
-tlsa rr added to namestore
Diffstat (limited to 'src/gns')
-rw-r--r--src/gns/gns_records.h161
-rw-r--r--src/gns/gnunet-service-gns_resolver.c2
-rw-r--r--src/gns/test_gns_simple_srv_lookup.c2
3 files changed, 2 insertions, 163 deletions
diff --git a/src/gns/gns_records.h b/src/gns/gns_records.h
deleted file mode 100644
index b5e6f33e1..000000000
--- a/src/gns/gns_records.h
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2 This file is part of GNUnet
3 (C) 2012 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 gns/gns_records.h
23 * @brief Resource Record definitions
24 * @author Martin Schanzenbach
25 */
26#ifndef GNS_RECORDS_H
27#define GNS_RECORDS_H
28
29GNUNET_NETWORK_STRUCT_BEGIN
30
31/**
32 * Payload of DNS SOA record (header).
33 */
34struct soa_data
35{
36 /**
37 * The version number of the original copy of the zone. (NBO)
38 */
39 uint32_t serial GNUNET_PACKED;
40
41 /**
42 * Time interval before the zone should be refreshed. (NBO)
43 */
44 uint32_t refresh GNUNET_PACKED;
45
46 /**
47 * Time interval that should elapse before a failed refresh should
48 * be retried. (NBO)
49 */
50 uint32_t retry GNUNET_PACKED;
51
52 /**
53 * Time value that specifies the upper limit on the time interval
54 * that can elapse before the zone is no longer authoritative. (NBO)
55 */
56 uint32_t expire GNUNET_PACKED;
57
58 /**
59 * The bit minimum TTL field that should be exported with any RR
60 * from this zone. (NBO)
61 */
62 uint32_t minimum GNUNET_PACKED;
63};
64
65
66/**
67 * Payload of DNS SRV record (header).
68 */
69struct srv_data
70{
71
72 /**
73 * Preference for this entry (lower value is higher preference). Clients
74 * will contact hosts from the lowest-priority group first and fall back
75 * to higher priorities if the low-priority entries are unavailable. (NBO)
76 */
77 uint16_t prio GNUNET_PACKED;
78
79 /**
80 * Relative weight for records with the same priority. Clients will use
81 * the hosts of the same (lowest) priority with a probability proportional
82 * to the weight given. (NBO)
83 */
84 uint16_t weight GNUNET_PACKED;
85
86 /**
87 * TCP or UDP port of the service. (NBO)
88 */
89 uint16_t port GNUNET_PACKED;
90
91 /* followed by 'target' name */
92};
93
94
95/**
96 * Payload of DNSSEC TLSA record.
97 * http://datatracker.ietf.org/doc/draft-ietf-dane-protocol/
98 */
99struct tlsa_data
100{
101
102 /**
103 * Certificate usage
104 * 0: CA cert
105 * 1: Entity cert
106 * 2: Trust anchor
107 * 3: domain-issued cert
108 */
109 uint8_t usage;
110
111 /**
112 * Selector
113 * What part will be matched against the cert
114 * presented by server
115 * 0: Full cert (in binary)
116 * 1: Full cert (in DER)
117 */
118 uint8_t selector;
119
120 /**
121 * Matching type (of selected content)
122 * 0: exact match
123 * 1: SHA-256 hash
124 * 2: SHA-512 hash
125 */
126 uint8_t matching_type;
127
128 /**
129 * followed by certificate association data
130 * The "certificate association data" to be matched.
131 * These bytes are either raw data (that is, the full certificate or
132 * its SubjectPublicKeyInfo, depending on the selector) for matching
133 * type 0, or the hash of the raw data for matching types 1 and 2.
134 * The data refers to the certificate in the association, not to the
135 * TLS ASN.1 Certificate object.
136 *
137 * The data is represented as a string of hex chars
138 */
139};
140
141/**
142 * Payload of GNS VPN record
143 */
144struct vpn_data
145{
146 /**
147 * The protocol to use
148 */
149 uint16_t proto;
150
151 /**
152 * The peer to contact
153 */
154 struct GNUNET_HashCode peer;
155
156 /* followed by the servicename */
157};
158
159GNUNET_NETWORK_STRUCT_END
160
161#endif
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 89aa4a06e..6a07f6d94 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -33,7 +33,7 @@
33#include "gnunet_dns_service.h" 33#include "gnunet_dns_service.h"
34#include "gnunet_resolver_service.h" 34#include "gnunet_resolver_service.h"
35#include "gnunet_dnsparser_lib.h" 35#include "gnunet_dnsparser_lib.h"
36#include "gns_records.h" 36#include "gns_protocol.h"
37#include "gnunet_gns_service.h" 37#include "gnunet_gns_service.h"
38#include "block_gns.h" 38#include "block_gns.h"
39#include "gns.h" 39#include "gns.h"
diff --git a/src/gns/test_gns_simple_srv_lookup.c b/src/gns/test_gns_simple_srv_lookup.c
index 259d32e53..c9676e874 100644
--- a/src/gns/test_gns_simple_srv_lookup.c
+++ b/src/gns/test_gns_simple_srv_lookup.c
@@ -30,7 +30,7 @@
30#include "gnunet_namestore_service.h" 30#include "gnunet_namestore_service.h"
31#include "../namestore/namestore.h" 31#include "../namestore/namestore.h"
32#include "gnunet_dnsparser_lib.h" 32#include "gnunet_dnsparser_lib.h"
33#include "gns_records.h" 33#include "gns_protocol.h"
34#include "gnunet_gns_service.h" 34#include "gnunet_gns_service.h"
35 35
36/* DEFINES */ 36/* DEFINES */