aboutsummaryrefslogtreecommitdiff
path: root/gnu-name-system-record-flags
diff options
context:
space:
mode:
Diffstat (limited to 'gnu-name-system-record-flags')
-rw-r--r--gnu-name-system-record-flags/.gitignore1
-rw-r--r--gnu-name-system-record-flags/Makefile28
-rw-r--r--gnu-name-system-record-flags/POLICY20
-rw-r--r--gnu-name-system-record-flags/README13
-rw-r--r--gnu-name-system-record-flags/h.footer11
-rw-r--r--gnu-name-system-record-flags/h.header49
-rw-r--r--gnu-name-system-record-flags/h.template6
-rw-r--r--gnu-name-system-record-flags/registry.rec43
-rw-r--r--gnu-name-system-record-flags/rst.footer0
-rw-r--r--gnu-name-system-record-flags/rst.header.template11
-rw-r--r--gnu-name-system-record-flags/rst.template4
11 files changed, 186 insertions, 0 deletions
diff --git a/gnu-name-system-record-flags/.gitignore b/gnu-name-system-record-flags/.gitignore
new file mode 100644
index 0000000..0a437d0
--- /dev/null
+++ b/gnu-name-system-record-flags/.gitignore
@@ -0,0 +1 @@
gnu-name-system-record-types.h
diff --git a/gnu-name-system-record-flags/Makefile b/gnu-name-system-record-flags/Makefile
new file mode 100644
index 0000000..9166ba5
--- /dev/null
+++ b/gnu-name-system-record-flags/Makefile
@@ -0,0 +1,28 @@
1FILES=gnu_name_system_record_flags.h gnu_name_system_record_flags.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnu_name_system_record_flags.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnu_name_system_record_flags.h: h.header gnu_name_system_record_flags.h.tmp h.footer
16 cat h.header gnu_name_system_record_flags.h.tmp h.footer > $@
17
18gnu_name_system_record_flags.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21rst.header.tmp:
22 cat README POLICY rst.header.template > $@
23
24gnu_name_system_record_flags.rst: rst.header.tmp gnu_name_system_record_flags.rst.tmp rst.footer
25 cat rst.header.tmp gnu_name_system_record_flags.rst.tmp rst.footer > $@
26
27
28.PHONY: check clean distclean
diff --git a/gnu-name-system-record-flags/POLICY b/gnu-name-system-record-flags/POLICY
new file mode 100644
index 0000000..f9607ee
--- /dev/null
+++ b/gnu-name-system-record-flags/POLICY
@@ -0,0 +1,20 @@
1Policy
2^^^^^^
3
4Each registry entry should contain three values: the "Number" of the
5record flags, which must be between 0 and 15,
6the "Name" of the record flag, and a "Reference" with links
7to further information about the record flag.
8
9The "Name" must be unique in the entire registry. The value must be a
10case insensitive ASCII string and is restricted to alphanumeric
11characters.
12
13Adding flags is possible after expert review, using a
14first-come-first-served policy for unique "Name" allocation.
15Experts are responsible to ensure that the chosen "Name" is
16appropriate for the record flag.
17
18The current contact(s) for expert review are reachable at
19gns-registry@gnunet.org.
20
diff --git a/gnu-name-system-record-flags/README b/gnu-name-system-record-flags/README
new file mode 100644
index 0000000..6cb5f1b
--- /dev/null
+++ b/gnu-name-system-record-flags/README
@@ -0,0 +1,13 @@
1GNS Record Flags
2----------------
3
4This registry is for GNU Name System Record Flags.
5
6GNU Name System Record flags uniquely identify the different kinds
7of key-value pairs that can be used as flags of a GNU Name System record.
8
9This registry is used to ensure that the names and numeric values
10used to identify record flags are uniquely defined and to
11allow GNS resolvers implementors to find out details about the
12respective semantics and human-readable syntax.
13
diff --git a/gnu-name-system-record-flags/h.footer b/gnu-name-system-record-flags/h.footer
new file mode 100644
index 0000000..7b5140e
--- /dev/null
+++ b/gnu-name-system-record-flags/h.footer
@@ -0,0 +1,11 @@
1
2};
3
4#if 0 /* keep Emacsens' auto-indent happy */
5{
6#endif
7#ifdef __cplusplus
8}
9#endif
10
11#endif
diff --git a/gnu-name-system-record-flags/h.header b/gnu-name-system-record-flags/h.header
new file mode 100644
index 0000000..c641893
--- /dev/null
+++ b/gnu-name-system-record-flags/h.header
@@ -0,0 +1,49 @@
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012-2022 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your 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 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20#ifndef GNU_NAME_SYSTEM_RECORD_FLAGS_H
21#define GNU_NAME_SYSTEM_RECORD_FLAGS_H
22
23/**
24 * WARNING:
25 * This header is generated!
26 * In order to add GNS record flags, you must register
27 * them in GANA, and then use the header generation script
28 * to create an update of this file. You may then replace this
29 * file with the update.
30 */
31
32/**
33 * Flags that can be set for a record.
34 * The numbers in the registry correspond to the bit index as specified in
35 * LSD0001 Chapter "Resource Records".
36 * Each enum member represents the 16-bit integer value of the flags field if
37 * only that particular flag was set.
38 * The value can be used to efficiently compare the bitmask setting for the
39 * record flag in C.
40 * WARNING: The values are in host byte order! In order to correctly check
41 * against the flags field a record, the respective fields must
42 * also be converted to HBO (or the enum value to NBO).
43 */
44enum GNUNET_GNSRECORD_Flags
45{
46 /**
47 * Entry for no flags / cleared flags.
48 */
49 GNUNET_GNSRECORD_RF_NONE = 0,
diff --git a/gnu-name-system-record-flags/h.template b/gnu-name-system-record-flags/h.template
new file mode 100644
index 0000000..d90329b
--- /dev/null
+++ b/gnu-name-system-record-flags/h.template
@@ -0,0 +1,6 @@
1
2
3 /**
4 * {{Comment}}
5 */
6 GNUNET_GNSRECORD_RF_{{Name}} = 1 << (15 - {{Number}}),
diff --git a/gnu-name-system-record-flags/registry.rec b/gnu-name-system-record-flags/registry.rec
new file mode 100644
index 0000000..22aa750
--- /dev/null
+++ b/gnu-name-system-record-flags/registry.rec
@@ -0,0 +1,43 @@
1# -*- mode: rec -*-
2#
3# Registry for GNU Name System record flags
4#
5
6%rec: RecordType
7%key: Number
8%typedef: FlagRange_t range 0 15
9%type: Number FlagRange_t
10%mandatory: Number
11%typedef: Name_t regexp /^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]*$/
12%type: Name Name_t
13%unique: Name
14%mandatory: Name
15%mandatory: Comment
16%allowed: Contact
17%allowed: References
18%sort: Number Name Contact References
19
20Number: 15
21Name: CRITICAL
22Comment: This record is critical. If it cannot be processed (for example because the record type is unknown) resolution MUST fail
23References: https://lsd.gnunet.org/lsd0001
24
25Number: 14
26Name: SHADOW
27Comment: This record should not be used unless all (other) records in the set with an absolute expiration time have expired.
28References: https://lsd.gnunet.org/lsd0001
29
30Number: 13
31Name: SUPPLEMENTAL
32Comment: This is a supplemental record.
33References: https://lsd.gnunet.org/lsd0001
34
35Number: 1
36Name: RELATIVE_EXPIRATION
37Comment: This expiration time of the record is a relative time (not an absolute time). Used in GNUnet implementation.
38References: https://git.gnunet.org/gnunet.git
39
40Number: 0
41Name: PRIVATE
42Comment: This is a private record of this peer and it should thus not be published.
43References: https://git.gnunet.org/gnunet.git
diff --git a/gnu-name-system-record-flags/rst.footer b/gnu-name-system-record-flags/rst.footer
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gnu-name-system-record-flags/rst.footer
diff --git a/gnu-name-system-record-flags/rst.header.template b/gnu-name-system-record-flags/rst.header.template
new file mode 100644
index 0000000..76d353f
--- /dev/null
+++ b/gnu-name-system-record-flags/rst.header.template
@@ -0,0 +1,11 @@
1Entries
2^^^^^^^
3
4.. list-table:: GNS Record Flags
5 :widths: auto
6 :header-rows: 1
7
8 * - Name
9 - Number
10 - References
11 - Comment
diff --git a/gnu-name-system-record-flags/rst.template b/gnu-name-system-record-flags/rst.template
new file mode 100644
index 0000000..11468c9
--- /dev/null
+++ b/gnu-name-system-record-flags/rst.template
@@ -0,0 +1,4 @@
1 * - {{Name}}
2 - {{Number}}
3 - {{References}}
4 - {{Comment}}