summaryrefslogtreecommitdiff
path: root/gnu-name-system-record-types
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-06 00:23:52 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-06 00:23:52 +0200
commit56eafb8f94157eecca4410ff6924715fe8328386 (patch)
tree2f765f60096c89b1ce8e85da82a73ba19854f28d /gnu-name-system-record-types
parent0bc192b0935ffc1bbc4e03013a569493f80bcc8a (diff)
C header generation logic
Diffstat (limited to 'gnu-name-system-record-types')
-rw-r--r--gnu-name-system-record-types/.gitignore1
-rw-r--r--gnu-name-system-record-types/Makefile17
-rw-r--r--gnu-name-system-record-types/h.footer11
-rw-r--r--gnu-name-system-record-types/h.header28
-rw-r--r--gnu-name-system-record-types/h.template6
-rw-r--r--gnu-name-system-record-types/registry.rec19
6 files changed, 82 insertions, 0 deletions
diff --git a/gnu-name-system-record-types/.gitignore b/gnu-name-system-record-types/.gitignore
new file mode 100644
index 0000000..0a437d0
--- /dev/null
+++ b/gnu-name-system-record-types/.gitignore
@@ -0,0 +1 @@
+gnu-name-system-record-types.h
diff --git a/gnu-name-system-record-types/Makefile b/gnu-name-system-record-types/Makefile
index 8364f52..2d0eb95 100644
--- a/gnu-name-system-record-types/Makefile
+++ b/gnu-name-system-record-types/Makefile
@@ -1,2 +1,19 @@
+FILES=gnu-name-system-record-types.h
+all: check $(FILES)
+
check:
recfix --check registry.rec
+
+distclean:
+
+ rm -f *.tmp
+clean:
+ rm -f $(FILES) *.tmp
+
+gnu-name-system-record-types.h.tmp: registry.rec h.template
+ ../format.sh h.template < registry.rec > $@
+
+gnu-name-system-record-types.h: h.header gnu-name-system-record-types.h.tmp h.footer
+ cat $^ > $@
+
+.PHONY: check clean distclean
diff --git a/gnu-name-system-record-types/h.footer b/gnu-name-system-record-types/h.footer
new file mode 100644
index 0000000..adccc7a
--- /dev/null
+++ b/gnu-name-system-record-types/h.footer
@@ -0,0 +1,11 @@
+
+
+
+#if 0 /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/gnu-name-system-record-types/h.header b/gnu-name-system-record-types/h.header
new file mode 100644
index 0000000..fb52945
--- /dev/null
+++ b/gnu-name-system-record-types/h.header
@@ -0,0 +1,28 @@
+/*
+ This file is part of GNUnet
+ Copyright (C) 2012-2020 GNUnet e.V.
+
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
+ */
+#ifndef GNU_NAME_SYSTEM_RECORD_TYPES_H
+#define GNU_NAME_SYSTEM_RECORD_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#if 0 /* keep Emacsens' auto-indent happy */
+}
+#endif
+#endif
diff --git a/gnu-name-system-record-types/h.template b/gnu-name-system-record-types/h.template
new file mode 100644
index 0000000..dbb1f61
--- /dev/null
+++ b/gnu-name-system-record-types/h.template
@@ -0,0 +1,6 @@
+
+
+/**
+ * {{Comment}}
+ */
+#define GNUNET_GNSRECORD_TYPE_{{Name}} {{Number}}
diff --git a/gnu-name-system-record-types/registry.rec b/gnu-name-system-record-types/registry.rec
index 4d1f72f..74cf1b6 100644
--- a/gnu-name-system-record-types/registry.rec
+++ b/gnu-name-system-record-types/registry.rec
@@ -11,79 +11,98 @@
%type: Name Name_t
%unique: Name
%mandatory: Name
+%mandatory: Comment
%allowed: Contact
%allowed: References
%sort: Number Name Contact References
Number: 65536
Name: PKEY
+Comment: GNS zone transfer
References: LSD0001
Number: 65537
Name: NICK
+Comment: GNS nick names
References: LSD0001
Number: 65538
Name: LEHO
+Comment: legacy hostnames
References: LSD0001
Number: 65539
Name: VPN
+Comment: VPN resolution
References: LSD0001
Number: 65540
Name: GNS2DNS
+Comment: Delegation to DNS
References: LSD0001
Number: 65541
Name: BOX
+Comment: Boxed records (see TLSA/SRV handling in GNS)
References: LSD0001
Number: 65542
Name: PLACE
+Comment: social place for SecuShare
Contact: lynx@gnunet.org
Number: 65543
Name: PHONE
+Comment: Endpoint for conversation
Contact: grothoff@gnunet.org
Number: 65544
Name: RECLAIM_ATTRIBUTE
+Comment: identity attribute
Contact: schanzen@gnunet.org
Number: 65545
Name: RECLAIM_TICKET
+Comment: local ticket reference
Contact: schanzen@gnunet.org
Number: 65548
Name: DELEGATE
+Comment: for policies
Contact: schanzen@gnunet.org
Number: 65549
Name: ATTRIBUTE
+Comment: for reverse lookups
Contact: schanzen@gnunet.org
Number: 65550
Name: RECLAIM_ATTRIBUTE_REF
+Comment: for reclaim records
Contact: schanzen@gnunet.org
Number: 65551
Name: RECLAIM_MASTER
+Comment: for RECLAIM master
Contact: schanzen@gnunet.org
Number: 65552
Name: RECLAIM_TICKET
+Comment: for reclaimOIDC clients
Contact: schanzen@gnunet.org
Number: 65553
Name: RECLAIM_OIDC_CLIENT
+Comment: for reclaim OIDC redirect URIs
Contact: schanzen@gnunet.org
Number: 65554
Name: RECLAIM_ATTESTATION
+Comment: for reclaim attestation
Contact: schanzen@gnunet.org
Number: 65555
Name: RECLAIM_ATTESTATION_REF
+Comment: for attestation reference in a ticket
Contact: schanzen@gnunet.org