diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-10 16:00:56 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-10 16:00:56 +0900 |
commit | 52d0d09146c1d13bded8195cb91845acac1b355d (patch) | |
tree | cfd436d6ea9fad3d79eb4ebfa53dbb80f456d3f2 /src/include | |
parent | 7e7ed01ae49037b44b948ee812c7965e23d26594 (diff) | |
download | gnunet-52d0d09146c1d13bded8195cb91845acac1b355d.tar.gz gnunet-52d0d09146c1d13bded8195cb91845acac1b355d.zip |
GNS: Do not autogenerate flags
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/Makefile.am | 1 | ||||
-rw-r--r-- | src/include/gnunet_gnsrecord_json_lib.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_gnsrecord_lib.h | 58 |
3 files changed, 59 insertions, 6 deletions
diff --git a/src/include/Makefile.am b/src/include/Makefile.am index 82a81077e..8519883c9 100644 --- a/src/include/Makefile.am +++ b/src/include/Makefile.am | |||
@@ -59,7 +59,6 @@ gnunetinclude_HEADERS = \ | |||
59 | gnunet_gnsrecord_lib.h \ | 59 | gnunet_gnsrecord_lib.h \ |
60 | gnunet_gnsrecord_json_lib.h \ | 60 | gnunet_gnsrecord_json_lib.h \ |
61 | gnunet_gnsrecord_plugin.h \ | 61 | gnunet_gnsrecord_plugin.h \ |
62 | gnu_name_system_record_flags.h \ | ||
63 | gnu_name_system_record_types.h \ | 62 | gnu_name_system_record_types.h \ |
64 | gnunet_hello_lib.h \ | 63 | gnunet_hello_lib.h \ |
65 | gnunet_hello_uri_lib.h \ | 64 | gnunet_hello_uri_lib.h \ |
diff --git a/src/include/gnunet_gnsrecord_json_lib.h b/src/include/gnunet_gnsrecord_json_lib.h index 1216f1f5e..5bc48034b 100644 --- a/src/include/gnunet_gnsrecord_json_lib.h +++ b/src/include/gnunet_gnsrecord_json_lib.h | |||
@@ -73,6 +73,12 @@ GNUNET_GNSRECORD_JSON_from_gnsrecord (const char*rname, | |||
73 | const struct GNUNET_GNSRECORD_Data *rd, | 73 | const struct GNUNET_GNSRECORD_Data *rd, |
74 | unsigned int rd_count); | 74 | unsigned int rd_count); |
75 | 75 | ||
76 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
77 | { | ||
78 | #endif | ||
79 | #ifdef __cplusplus | ||
80 | } | ||
81 | #endif | ||
76 | 82 | ||
77 | #endif | 83 | #endif |
78 | 84 | ||
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index 6fc2a05c5..3aee30117 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h | |||
@@ -70,11 +70,6 @@ extern "C" { | |||
70 | #include "gnu_name_system_record_types.h" | 70 | #include "gnu_name_system_record_types.h" |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * Include the record flags generated from GANA | ||
74 | */ | ||
75 | #include "gnu_name_system_record_flags.h" | ||
76 | |||
77 | /** | ||
78 | * When comparing flags for record equality for removal, | 73 | * When comparing flags for record equality for removal, |
79 | * which flags should must match (in addition to the type, | 74 | * which flags should must match (in addition to the type, |
80 | * name, expiration value and data of the record)? All flags | 75 | * name, expiration value and data of the record)? All flags |
@@ -87,6 +82,59 @@ extern "C" { | |||
87 | */ | 82 | */ |
88 | #define GNUNET_GNSRECORD_RF_RCMP_FLAGS (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION) | 83 | #define GNUNET_GNSRECORD_RF_RCMP_FLAGS (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION) |
89 | 84 | ||
85 | |||
86 | /** | ||
87 | * Flags that can be set for a record. | ||
88 | * The numbers in the registry correspond to the bit index as specified in | ||
89 | * LSD0001 Chapter "Resource Records". | ||
90 | * Each enum member represents the 16-bit integer value of the flags field if | ||
91 | * only that particular flag was set. | ||
92 | * The value can be used to efficiently compare the bitmask setting for the | ||
93 | * record flag in C. | ||
94 | * WARNING: The values are in host byte order! In order to correctly check | ||
95 | * against the flags field a record, the respective fields must | ||
96 | * also be converted to HBO (or the enum value to NBO). | ||
97 | */ | ||
98 | enum GNUNET_GNSRECORD_Flags | ||
99 | { | ||
100 | /** | ||
101 | * Entry for no flags / cleared flags. | ||
102 | */ | ||
103 | GNUNET_GNSRECORD_RF_NONE = 0, | ||
104 | |||
105 | |||
106 | /** | ||
107 | * This record is critical. If it cannot be processed (for example because the record type is unknown) resolution MUST fail | ||
108 | */ | ||
109 | GNUNET_GNSRECORD_RF_CRITICAL = 1 << (15 - 15), | ||
110 | |||
111 | |||
112 | /** | ||
113 | * This record should not be used unless all (other) records in the set with an absolute expiration time have expired. | ||
114 | */ | ||
115 | GNUNET_GNSRECORD_RF_SHADOW = 1 << (15 - 14), | ||
116 | |||
117 | |||
118 | /** | ||
119 | * This is a supplemental record. | ||
120 | */ | ||
121 | GNUNET_GNSRECORD_RF_SUPPLEMENTAL = 1 << (15 - 13), | ||
122 | |||
123 | |||
124 | /** | ||
125 | * This expiration time of the record is a relative time (not an absolute time). Used in GNUnet implementation. | ||
126 | */ | ||
127 | GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION = 1 << (15 - 1), | ||
128 | |||
129 | |||
130 | /** | ||
131 | * This is a private record of this peer and it should thus not be published. | ||
132 | */ | ||
133 | GNUNET_GNSRECORD_RF_PRIVATE = 1 << (15 - 0), | ||
134 | |||
135 | }; | ||
136 | |||
137 | |||
90 | /** | 138 | /** |
91 | * Filter for GNUNET_GNSRECORD_normalize_record_set(). | 139 | * Filter for GNUNET_GNSRECORD_normalize_record_set(). |
92 | */ | 140 | */ |