aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_gns_service.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2016-10-06 15:54:30 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2016-10-06 15:54:30 +0000
commit810bc9ef12ddcc67cfc7cd762759ee13ecd14a8d (patch)
treee6950609e302c8cee5dd49cd75a890e660dde02a /src/include/gnunet_gns_service.h
parent16f524720ce08aadb35912731217eaeafc690dba (diff)
downloadgnunet-810bc9ef12ddcc67cfc7cd762759ee13ecd14a8d.tar.gz
gnunet-810bc9ef12ddcc67cfc7cd762759ee13ecd14a8d.zip
- Add reverse resolution with limited functionality
Diffstat (limited to 'src/include/gnunet_gns_service.h')
-rw-r--r--src/include/gnunet_gns_service.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h
index 1d74408fc..8a1099444 100644
--- a/src/include/gnunet_gns_service.h
+++ b/src/include/gnunet_gns_service.h
@@ -94,6 +94,16 @@ typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls,
94 uint32_t rd_count, 94 uint32_t rd_count,
95 const struct GNUNET_GNSRECORD_Data *rd); 95 const struct GNUNET_GNSRECORD_Data *rd);
96 96
97/**
98 * Iterator called on obtained result for a GNS lookup.
99 *
100 * @param cls closure
101 * @param rd_count number of records in @a rd
102 * @param rd the records in reply
103 */
104typedef void (*GNUNET_GNS_ReverseLookupResultProcessor) (void *cls,
105 const char* name);
106
97 107
98/** 108/**
99 * Options for the GNS lookup. 109 * Options for the GNS lookup.
@@ -146,6 +156,23 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
146 GNUNET_GNS_LookupResultProcessor proc, 156 GNUNET_GNS_LookupResultProcessor proc,
147 void *proc_cls); 157 void *proc_cls);
148 158
159/**
160 * Perform an asynchronous reverse lookup operation on the GNS.
161 *
162 * @param handle handle to the GNS service
163 * @param zone_key zone to find a name for
164 * @param root_key our zone
165 * @param proc processor to call on result
166 * @param proc_cls closure for @a proc
167 * @return handle to the request
168 */
169struct GNUNET_GNS_ReverseLookupRequest*
170GNUNET_GNS_reverse_lookup (struct GNUNET_GNS_Handle *handle,
171 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key,
172 const struct GNUNET_CRYPTO_EcdsaPublicKey *root_key,
173 GNUNET_GNS_ReverseLookupResultProcessor proc,
174 void *proc_cls);
175
149 176
150/** 177/**
151 * Cancel pending lookup request 178 * Cancel pending lookup request