summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-03-23 15:59:56 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-03-23 15:59:56 +0000
commitc83780d7be3f1a744f72437220b351ce2ce0d68e (patch)
tree6b7ead4481e941526f6996bc222b848714fc36b8 /src
parent8c5d25dad5b1b6f36c35d7d8956fa323a1c99951 (diff)
downloadgnunet-c83780d7be3f1a744f72437220b351ce2ce0d68e.tar.gz
gnunet-c83780d7be3f1a744f72437220b351ce2ce0d68e.zip
-doxygen
Diffstat (limited to 'src')
-rw-r--r--src/gns/gns_api.c21
-rw-r--r--src/gns/gnunet-service-gns_interceptor.c2
-rw-r--r--src/gns/gnunet-service-gns_resolver.c19
-rw-r--r--src/gns/gnunet-service-gns_resolver.h12
4 files changed, 28 insertions, 26 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index b0d2f3eac..09e5426f9 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -605,18 +605,18 @@ GNUNET_GNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
605/** 605/**
606 * Shutdown connection with the GNS service. 606 * Shutdown connection with the GNS service.
607 * 607 *
608 * @param h handle of the GNS connection to stop 608 * @param handle handle of the GNS connection to stop
609 */ 609 */
610void 610void
611GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *h) 611GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle)
612{ 612{
613 GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); 613 GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
614 if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task) 614 if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task)
615 { 615 {
616 GNUNET_SCHEDULER_cancel (h->reconnect_task); 616 GNUNET_SCHEDULER_cancel (handle->reconnect_task);
617 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 617 handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
618 } 618 }
619 GNUNET_free(h); 619 GNUNET_free(handle);
620 /* disco from GNS */ 620 /* disco from GNS */
621} 621}
622 622
@@ -639,9 +639,10 @@ get_request_id (struct GNUNET_GNS_Handle *h)
639 * 639 *
640 * @param handle handle to the GNS service 640 * @param handle handle to the GNS service
641 * @param name the name to look up 641 * @param name the name to look up
642 * @param iter function to call on each result 642 * @param type the record type to look up
643 * @param iter_cls closure for iter 643 * @param proc processor to call on result
644 * @return handle to stop the async get 644 * @param proc_cls closure for processor
645 * @return handle to the get
645 */ 646 */
646struct GNUNET_GNS_QueueEntry * 647struct GNUNET_GNS_QueueEntry *
647GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, 648GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c
index f6d56d048..5ddffdd4b 100644
--- a/src/gns/gnunet-service-gns_interceptor.c
+++ b/src/gns/gnunet-service-gns_interceptor.c
@@ -331,7 +331,7 @@ handle_dns_request(void *cls,
331 * Initialized the interceptor 331 * Initialized the interceptor
332 * 332 *
333 * @param zone the zone to work in 333 * @param zone the zone to work in
334 * @param the prov key of the zone (can be null, needed for caching) 334 * @param key the prov key of the zone (can be null, needed for caching)
335 * @param c the configuration 335 * @param c the configuration
336 * @return GNUNET_OK on success 336 * @return GNUNET_OK on success
337 */ 337 */
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index aef9df4d7..b905c73ae 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -358,7 +358,7 @@ process_zone_to_name_discover(void *cls,
358 * @param name the name given by delegation 358 * @param name the name given by delegation
359 * @param zone the authority 359 * @param zone the authority
360 * @param our_zone our local zone 360 * @param our_zone our local zone
361 * @param the private key of our authority 361 * @param key the private key of our authority
362 */ 362 */
363static void process_discovered_authority(char* name, 363static void process_discovered_authority(char* name,
364 struct GNUNET_CRYPTO_ShortHashCode zone, 364 struct GNUNET_CRYPTO_ShortHashCode zone,
@@ -394,6 +394,7 @@ static void process_discovered_authority(char* name,
394 * @param nh the namestore handle 394 * @param nh the namestore handle
395 * @param dh the dht handle 395 * @param dh the dht handle
396 * @param lz the local zone's hash 396 * @param lz the local zone's hash
397 * @param max_bg_queries maximum number of parallel background queries in dht
397 * @return GNUNET_OK on success 398 * @return GNUNET_OK on success
398 */ 399 */
399int 400int
@@ -2196,13 +2197,13 @@ handle_delegation_ns_shorten(void* cls,
2196 * @param zone the zone to use 2197 * @param zone the zone to use
2197 * @param name the name to shorten 2198 * @param name the name to shorten
2198 * @param proc the processor to call with result 2199 * @param proc the processor to call with result
2199 * @param cls closure to pass to proc 2200 * @param proc_cls closure to pass to proc
2200 */ 2201 */
2201void 2202void
2202gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone, 2203gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone,
2203 const char* name, 2204 const char* name,
2204 ShortenResultProcessor proc, 2205 ShortenResultProcessor proc,
2205 void* cls) 2206 void* proc_cls)
2206{ 2207{
2207 struct ResolverHandle *rh; 2208 struct ResolverHandle *rh;
2208 struct NameShortenHandle *nsh; 2209 struct NameShortenHandle *nsh;
@@ -2215,7 +2216,7 @@ gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone,
2215 { 2216 {
2216 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2217 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2217 "%s is canonical. Returning verbatim\n", name); 2218 "%s is canonical. Returning verbatim\n", name);
2218 proc(cls, name); 2219 proc(proc_cls, name);
2219 return; 2220 return;
2220 } 2221 }
2221 2222
@@ -2223,7 +2224,7 @@ gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone,
2223 2224
2224 2225
2225 nsh->proc = proc; 2226 nsh->proc = proc;
2226 nsh->proc_cls = cls; 2227 nsh->proc_cls = proc_cls;
2227 2228
2228 rh = GNUNET_malloc(sizeof (struct ResolverHandle)); 2229 rh = GNUNET_malloc(sizeof (struct ResolverHandle));
2229 rh->authority = zone; 2230 rh->authority = zone;
@@ -2254,7 +2255,7 @@ gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone,
2254 "Cannot convert ZKEY %s to hash!\n", string_hash); 2255 "Cannot convert ZKEY %s to hash!\n", string_hash);
2255 GNUNET_free(rh); 2256 GNUNET_free(rh);
2256 GNUNET_free(nsh); 2257 GNUNET_free(nsh);
2257 proc(cls, name); 2258 proc(proc_cls, name);
2258 return; 2259 return;
2259 } 2260 }
2260 2261
@@ -2365,13 +2366,13 @@ handle_delegation_result_ns_get_auth(void* cls,
2365 * @param zone the root zone to look up for 2366 * @param zone the root zone to look up for
2366 * @param name the name to lookup up 2367 * @param name the name to lookup up
2367 * @param proc the processor to call when finished 2368 * @param proc the processor to call when finished
2368 * @param cls the closure to pass to the processor 2369 * @param proc_cls the closure to pass to the processor
2369 */ 2370 */
2370void 2371void
2371gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone, 2372gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone,
2372 const char* name, 2373 const char* name,
2373 GetAuthorityResultProcessor proc, 2374 GetAuthorityResultProcessor proc,
2374 void* cls) 2375 void* proc_cls)
2375{ 2376{
2376 struct ResolverHandle *rh; 2377 struct ResolverHandle *rh;
2377 struct GetNameAuthorityHandle *nah; 2378 struct GetNameAuthorityHandle *nah;
@@ -2406,7 +2407,7 @@ gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone,
2406 rh->proc_cls = (void*)nah; 2407 rh->proc_cls = (void*)nah;
2407 2408
2408 nah->proc = proc; 2409 nah->proc = proc;
2409 nah->proc_cls = cls; 2410 nah->proc_cls = proc_cls;
2410 2411
2411 /* Start delegation resolution in our namestore */ 2412 /* Start delegation resolution in our namestore */
2412 resolve_delegation_ns(rh); 2413 resolve_delegation_ns(rh);
diff --git a/src/gns/gnunet-service-gns_resolver.h b/src/gns/gnunet-service-gns_resolver.h
index 7290e927c..fd5d2a5d3 100644
--- a/src/gns/gnunet-service-gns_resolver.h
+++ b/src/gns/gnunet-service-gns_resolver.h
@@ -248,14 +248,14 @@ struct GetPseuAuthorityHandle
248 * 248 *
249 * @param nh handle to the namestore 249 * @param nh handle to the namestore
250 * @param dh handle to the dht 250 * @param dh handle to the dht
251 * @param local_zone the local zone 251 * @param lz the local zone
252 * @param max_bg_queries maximum amount of background queries 252 * @param max_bg_queries maximum amount of background queries
253 * @returns GNUNET_OK on success 253 * @returns GNUNET_OK on success
254 */ 254 */
255int 255int
256gns_resolver_init(struct GNUNET_NAMESTORE_Handle *nh, 256gns_resolver_init(struct GNUNET_NAMESTORE_Handle *nh,
257 struct GNUNET_DHT_Handle *dh, 257 struct GNUNET_DHT_Handle *dh,
258 struct GNUNET_CRYPTO_ShortHashCode local_zone, 258 struct GNUNET_CRYPTO_ShortHashCode lz,
259 unsigned long long max_bg_queries); 259 unsigned long long max_bg_queries);
260 260
261/** 261/**
@@ -297,13 +297,13 @@ gns_resolver_lookup_record(struct GNUNET_CRYPTO_ShortHashCode zone,
297 * @param zone the zone to perform the operation in 297 * @param zone the zone to perform the operation in
298 * @param name name to shorten 298 * @param name name to shorten
299 * @param proc the processor to call on shorten result 299 * @param proc the processor to call on shorten result
300 * @param proc_cls teh closure to pass to proc 300 * @param proc_cls the closure to pass to proc
301 */ 301 */
302void 302void
303gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone, 303gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone,
304 const char* name, 304 const char* name,
305 ShortenResultProcessor proc, 305 ShortenResultProcessor proc,
306 void* cls); 306 void* proc_cls);
307 307
308/** 308/**
309 * Tries to resolve the authority for name 309 * Tries to resolve the authority for name
@@ -312,13 +312,13 @@ gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone,
312 * @param zone the root zone to look up for 312 * @param zone the root zone to look up for
313 * @param name the name to lookup up 313 * @param name the name to lookup up
314 * @param proc the processor to call when finished 314 * @param proc the processor to call when finished
315 * @param cls the closure to pass to the processor 315 * @param proc_cls the closure to pass to the processor
316 */ 316 */
317void 317void
318gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone, 318gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone,
319 const char* name, 319 const char* name,
320 GetAuthorityResultProcessor proc, 320 GetAuthorityResultProcessor proc,
321 void* cls); 321 void* proc_cls);
322 322
323/** 323/**
324 * Generic function to check for TLDs 324 * Generic function to check for TLDs