aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord
diff options
context:
space:
mode:
authorWillow Liquorice <willow@howhill.com>2022-08-31 22:19:44 +0100
committerWillow Liquorice <willow@howhill.com>2022-10-03 00:44:21 +0100
commit1e13d39e7c191b1bc6733b6505880ec34516b444 (patch)
tree3d9ce9d0af03cf71d22cf7b908d72e93e47bb281 /src/gnsrecord
parent26a2f25692410bffd00e4a783b93ae822f58b221 (diff)
downloadgnunet-1e13d39e7c191b1bc6733b6505880ec34516b444.tar.gz
gnunet-1e13d39e7c191b1bc6733b6505880ec34516b444.zip
-DOC: Pass through GNSRECORD library
Diffstat (limited to 'src/gnsrecord')
-rw-r--r--src/gnsrecord/gnsrecord.c16
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c19
-rw-r--r--src/gnsrecord/gnsrecord_misc.c8
-rw-r--r--src/gnsrecord/gnsrecord_serialization.c17
4 files changed, 0 insertions, 60 deletions
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c
index 52c480ef6..ae4223021 100644
--- a/src/gnsrecord/gnsrecord.c
+++ b/src/gnsrecord/gnsrecord.c
@@ -174,16 +174,6 @@ GNUNET_GNSRECORD_value_to_string (uint32_t type,
174} 174}
175 175
176 176
177/**
178 * Convert human-readable version of a 'value' of a record to the binary
179 * representation.
180 *
181 * @param type type of the record
182 * @param s human-readable string
183 * @param data set to value in binary encoding (will be allocated)
184 * @param data_size set to number of bytes in @a data
185 * @return #GNUNET_OK on success
186 */
187int 177int
188GNUNET_GNSRECORD_string_to_value (uint32_t type, 178GNUNET_GNSRECORD_string_to_value (uint32_t type,
189 const char *s, 179 const char *s,
@@ -207,12 +197,6 @@ GNUNET_GNSRECORD_string_to_value (uint32_t type,
207} 197}
208 198
209 199
210/**
211 * Convert a type name (e.g "AAAA") to the corresponding number.
212 *
213 * @param dns_typename name to convert
214 * @return corresponding number, UINT32_MAX on error
215 */
216uint32_t 200uint32_t
217GNUNET_GNSRECORD_typename_to_number (const char *dns_typename) 201GNUNET_GNSRECORD_typename_to_number (const char *dns_typename)
218{ 202{
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index b5e8be82b..6c1bc6045 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -868,17 +868,6 @@ block_decrypt_eddsa (const struct GNUNET_GNSRECORD_Block *block,
868} 868}
869 869
870 870
871/**
872 * Decrypt block.
873 *
874 * @param block block to decrypt
875 * @param zone_key public key of the zone
876 * @param label the name for the records
877 * @param proc function to call with the result
878 * @param proc_cls closure for proc
879 * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block was
880 * not well-formed
881 */
882enum GNUNET_GenericReturnValue 871enum GNUNET_GenericReturnValue
883GNUNET_GNSRECORD_block_decrypt (const struct GNUNET_GNSRECORD_Block *block, 872GNUNET_GNSRECORD_block_decrypt (const struct GNUNET_GNSRECORD_Block *block,
884 const struct 873 const struct
@@ -946,14 +935,6 @@ GNUNET_GNSRECORD_query_from_private_key (const struct
946} 935}
947 936
948 937
949/**
950 * Calculate the DHT query for a given @a label in a given @a zone.
951 * FIXME: We may want to plugin-ize this at some point.
952 *
953 * @param pub public key of the zone
954 * @param label label of the record
955 * @param query hash to use for the query
956 */
957void 938void
958GNUNET_GNSRECORD_query_from_public_key (const struct 939GNUNET_GNSRECORD_query_from_public_key (const struct
959 GNUNET_IDENTITY_PublicKey *pub, 940 GNUNET_IDENTITY_PublicKey *pub,
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 880fc68c6..5a24a83d3 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -62,14 +62,6 @@ GNUNET_GNSRECORD_label_check (const char*label, char **emsg)
62} 62}
63 63
64 64
65/**
66 * Convert a zone key to a string (for printing debug messages).
67 * This is one of the very few calls in the entire API that is
68 * NOT reentrant!
69 *
70 * @param z the zone key
71 * @return string form; will be overwritten by next call to #GNUNET_GNSRECORD_z2s
72 */
73const char * 65const char *
74GNUNET_GNSRECORD_z2s (const struct GNUNET_IDENTITY_PublicKey *z) 66GNUNET_GNSRECORD_z2s (const struct GNUNET_IDENTITY_PublicKey *z)
75{ 67{
diff --git a/src/gnsrecord/gnsrecord_serialization.c b/src/gnsrecord/gnsrecord_serialization.c
index 97c488c2b..ef7684892 100644
--- a/src/gnsrecord/gnsrecord_serialization.c
+++ b/src/gnsrecord/gnsrecord_serialization.c
@@ -77,14 +77,6 @@ struct NetworkRecord
77GNUNET_NETWORK_STRUCT_END 77GNUNET_NETWORK_STRUCT_END
78 78
79 79
80/**
81 * Calculate how many bytes we will need to serialize the given
82 * records.
83 *
84 * @param rd_count number of records in the rd array
85 * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements
86 * @return the required size to serialize, -1 on error
87 */
88ssize_t 80ssize_t
89GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, 81GNUNET_GNSRECORD_records_get_size (unsigned int rd_count,
90 const struct GNUNET_GNSRECORD_Data *rd) 82 const struct GNUNET_GNSRECORD_Data *rd)
@@ -143,15 +135,6 @@ GNUNET_GNSRECORD_records_get_size (unsigned int rd_count,
143} 135}
144 136
145 137
146/**
147 * Serialize the given records to the given destination buffer.
148 *
149 * @param rd_count number of records in the rd array
150 * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements
151 * @param dest_size size of the destination array
152 * @param dest where to write the result
153 * @return the size of serialized records, -1 if records do not fit
154 */
155ssize_t 138ssize_t
156GNUNET_GNSRECORD_records_serialize (unsigned int rd_count, 139GNUNET_GNSRECORD_records_serialize (unsigned int rd_count,
157 const struct GNUNET_GNSRECORD_Data *rd, 140 const struct GNUNET_GNSRECORD_Data *rd,