aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-11-10 17:31:55 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-11-10 17:31:55 +0900
commita4a6b9ba4b2634c56194d53e36344686d7052cef (patch)
tree396c80e23f0e11b7f7559c2d0cc3a8033bc588b3
parent0f6e020ef22854dc4ac9d18eef934190b7a3c17c (diff)
downloadgana-a4a6b9ba4b2634c56194d53e36344686d7052cef.tar.gz
gana-a4a6b9ba4b2634c56194d53e36344686d7052cef.zip
add gnunet protocol registry
-rw-r--r--gnunet-protocols/.gitignore1
-rw-r--r--gnunet-protocols/Makefile25
-rw-r--r--gnunet-protocols/POLICY16
-rw-r--r--gnunet-protocols/README9
-rw-r--r--gnunet-protocols/h.footer11
-rw-r--r--gnunet-protocols/h.header30
-rw-r--r--gnunet-protocols/h.template6
-rw-r--r--gnunet-protocols/registry.rec23
-rw-r--r--gnunet-protocols/rst.footer0
-rw-r--r--gnunet-protocols/rst.header4
-rw-r--r--gnunet-protocols/rst.template10
11 files changed, 135 insertions, 0 deletions
diff --git a/gnunet-protocols/.gitignore b/gnunet-protocols/.gitignore
new file mode 100644
index 0000000..0a437d0
--- /dev/null
+++ b/gnunet-protocols/.gitignore
@@ -0,0 +1 @@
gnu-name-system-record-types.h
diff --git a/gnunet-protocols/Makefile b/gnunet-protocols/Makefile
new file mode 100644
index 0000000..c146c30
--- /dev/null
+++ b/gnunet-protocols/Makefile
@@ -0,0 +1,25 @@
1FILES=gnunet_overlay_protocols.h gnunet_overlay_protocols.rst
2all: check $(FILES)
3
4check:
5 recfix --check registry.rec
6
7distclean:
8 rm -f *.tmp
9clean:
10 rm -f $(FILES) *.tmp
11
12gnunet_overlay_protocols.h.tmp: registry.rec h.template
13 ../format.sh h.template < registry.rec > $@
14
15gnunet_overlay_protocols.h: h.header gnunet_overlay_protocols.h.tmp h.footer
16 cat h.header gnunet_overlay_protocols.h.tmp h.footer > $@
17
18gnunet_overlay_protocols.rst.tmp: registry.rec rst.template
19 ../format.sh rst.template < registry.rec > $@
20
21gnunet_overlay_protocols.rst: rst.header gnunet_overlay_protocols.rst.tmp rst.footer
22 cat rst.header gnunet_overlay_protocols.rst.tmp rst.footer > $@
23
24
25.PHONY: check clean distclean
diff --git a/gnunet-protocols/POLICY b/gnunet-protocols/POLICY
new file mode 100644
index 0000000..e7d06f9
--- /dev/null
+++ b/gnunet-protocols/POLICY
@@ -0,0 +1,16 @@
1Each registry entry should contain three values: the "Number" of the
2protocol, which must be above 255 (to avoid conflicts with legacy
3Internet protocols), the "Name" of the protocol, and a "Reference" with links
4to further information about the record type.
5
6The "Name" must be unique in the entire registry. The value must be a
7case insensitive ASCII string and is restricted to alphanumeric
8characters.
9
10Adding protocols is possible after expert review, using a
11first-come-first-served policy for unique "Name" allocation.
12Experts are responsible to ensure that the chosen "Name" is
13appropriate for the record type.
14
15The current contact(s) for expert review are reachable at
16gns-registry@gnunet.org.
diff --git a/gnunet-protocols/README b/gnunet-protocols/README
new file mode 100644
index 0000000..df23711
--- /dev/null
+++ b/gnunet-protocols/README
@@ -0,0 +1,9 @@
1This registry is for overlay protocols.
2
3Overlay protocol numbers uniquely identify the different kinds
4of protocols implemented to realize overlay service communication.
5
6This registry is used to ensure that the names and numeric values
7used to identify the protocols are uniquely defined and to
8allow implementors to find out details about the respective semantics and
9specifications.
diff --git a/gnunet-protocols/h.footer b/gnunet-protocols/h.footer
new file mode 100644
index 0000000..adccc7a
--- /dev/null
+++ b/gnunet-protocols/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/gnunet-protocols/h.header b/gnunet-protocols/h.header
new file mode 100644
index 0000000..8bbba29
--- /dev/null
+++ b/gnunet-protocols/h.header
@@ -0,0 +1,30 @@
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 GNUNET_OVERLAY_PROTOCOLS_H
21#define GNUNET_OVERLAY_PROTOCOLS_H
22
23/**
24 * WARNING:
25 * This header is generated!
26 * In order to add overlay protocols, 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 */
diff --git a/gnunet-protocols/h.template b/gnunet-protocols/h.template
new file mode 100644
index 0000000..2d7e828
--- /dev/null
+++ b/gnunet-protocols/h.template
@@ -0,0 +1,6 @@
1
2
3/**
4 * {{Comment}}
5 */
6#define GNUNET_OVERLAY_PROTOCOL_{{Name}} {{Number}}
diff --git a/gnunet-protocols/registry.rec b/gnunet-protocols/registry.rec
new file mode 100644
index 0000000..96c8dcb
--- /dev/null
+++ b/gnunet-protocols/registry.rec
@@ -0,0 +1,23 @@
1# -*- mode: rec -*-
2#
3# Registry for overlay protocols
4#
5
6%rec: OverlayProtocol
7%key: Number
8%typedef: NumberRange_t range 256 65535
9%type: Number NumberRange_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: 256
21Name: CADET
22Comment: CADET protocol.
23References: https://git.gnunet.org/bibliography.git/plain/docs/cadet.pdf
diff --git a/gnunet-protocols/rst.footer b/gnunet-protocols/rst.footer
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gnunet-protocols/rst.footer
diff --git a/gnunet-protocols/rst.header b/gnunet-protocols/rst.header
new file mode 100644
index 0000000..c28a576
--- /dev/null
+++ b/gnunet-protocols/rst.header
@@ -0,0 +1,4 @@
1Registry for Overlay Protocols
2------------------------------
3
4
diff --git a/gnunet-protocols/rst.template b/gnunet-protocols/rst.template
new file mode 100644
index 0000000..e032a7f
--- /dev/null
+++ b/gnunet-protocols/rst.template
@@ -0,0 +1,10 @@
1
2
3=================== ===========================================================
4Name GNUNET_OVERLAY_PROTOCOL_{{Name}}
5------------------- -----------------------------------------------------------
6Number {{Number}}
7Comment {{Comment}}
8References {{References}}
9=================== ===========================================================
10