aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_identity_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-15 23:46:00 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-15 23:46:00 +0200
commita99752d30c73cd5040c9da3c05da3bbc2dc1b67e (patch)
tree4319210d4664aa3354404e67911ebe771b1e43f3 /src/include/gnunet_identity_service.h
parentb3ddc93861a6a171eee7c855f83c7a1314f6eaf9 (diff)
downloadgnunet-a99752d30c73cd5040c9da3c05da3bbc2dc1b67e.tar.gz
gnunet-a99752d30c73cd5040c9da3c05da3bbc2dc1b67e.zip
fix gnunet-gns performance issue for many egos
Diffstat (limited to 'src/include/gnunet_identity_service.h')
-rw-r--r--src/include/gnunet_identity_service.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/include/gnunet_identity_service.h b/src/include/gnunet_identity_service.h
index b2472da43..52ed1e908 100644
--- a/src/include/gnunet_identity_service.h
+++ b/src/include/gnunet_identity_service.h
@@ -328,6 +328,24 @@ GNUNET_IDENTITY_ego_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
328void 328void
329GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el); 329GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el);
330 330
331/**
332 * Function called with the result.
333 *
334 * @param cls closure
335 * @param ego NULL on error / ego not found
336 * @param ego_name NULL on error, name of the ego otherwise
337 */
338typedef void (*GNUNET_IDENTITY_EgoSuffixCallback) (
339 void *cls,
340 const struct GNUNET_CRYPTO_EcdsaPrivateKey *priv,
341 const char *ego_name);
342
343
344/**
345 * Handle for suffix lookup.
346 */
347struct GNUNET_IDENTITY_EgoSuffixLookup;
348
331 349
332/** 350/**
333 * Obtain the ego with the maximum suffix match between the 351 * Obtain the ego with the maximum suffix match between the
@@ -335,20 +353,26 @@ GNUNET_IDENTITY_ego_lookup_cancel (struct GNUNET_IDENTITY_EgoLookup *el);
335 * a @a suffix "a.b.c" and egos with names "d.a.b.c", "b.c" and "c", 353 * a @a suffix "a.b.c" and egos with names "d.a.b.c", "b.c" and "c",
336 * we return the ego for "b.c". 354 * we return the ego for "b.c".
337 * 355 *
338 * @param id identity service to query 356 * @param cfg configuration to use
339 * @param suffix for which domain name suffix is an identity wanted 357 * @param suffix for which domain name suffix is an identity wanted
340 * @param cb function to call with the result (will only be called once) 358 * @param cb function to call with the result (will only be called once)
341 * @param cb_cls closure for @a cb 359 * @param cb_cls closure for @a cb
342 * @return handle to abort the operation 360 * @return handle to abort the operation
343 */ 361 */
344struct GNUNET_IDENTITY_EgoLookup * 362struct GNUNET_IDENTITY_EgoSuffixLookup *
345GNUNET_IDENTITY_ego_lookup_by_suffix (struct GNUNET_IDENTITY_Handle *id, 363GNUNET_IDENTITY_ego_lookup_by_suffix (const struct GNUNET_CONFIGURATION_Handle *cfg,
346 const char *suffix, 364 const char *suffix,
347 GNUNET_IDENTITY_EgoCallback cb, 365 GNUNET_IDENTITY_EgoSuffixCallback cb,
348 void *cb_cls); 366 void *cb_cls);
349 367
350 368
351 369/**
370 * Abort ego suffix lookup attempt.
371 *
372 * @param el handle for lookup to abort
373 */
374void
375GNUNET_IDENTITY_ego_lookup_by_suffix_cancel (struct GNUNET_IDENTITY_EgoSuffixLookup *el);
352 376
353#if 0 /* keep Emacsens' auto-indent happy */ 377#if 0 /* keep Emacsens' auto-indent happy */
354{ 378{