diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-03-04 11:26:26 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-03-04 11:26:26 +0000 |
commit | 5c779811684d383940d6e3766ace4bdce7bc0ae6 (patch) | |
tree | c8aeeee7e987d8d69f8bd195f02428c49028f9ae /src/include/gnunet_gns_service.h | |
parent | 6927a8b2ec77eb4403dab98ae7df8d9e882ba6ae (diff) | |
download | gnunet-5c779811684d383940d6e3766ace4bdce7bc0ae6.tar.gz gnunet-5c779811684d383940d6e3766ace4bdce7bc0ae6.zip |
-presumably better fix for instantly resolving names in master zone
Diffstat (limited to 'src/include/gnunet_gns_service.h')
-rw-r--r-- | src/include/gnunet_gns_service.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h index bfe9fbc5b..e3f42001c 100644 --- a/src/include/gnunet_gns_service.h +++ b/src/include/gnunet_gns_service.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2012-2013 Christian Grothoff (and other contributing authors) | 3 | (C) 2012-2014 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -88,13 +88,37 @@ typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls, | |||
88 | 88 | ||
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Options for the GNS lookup. | ||
92 | */ | ||
93 | enum GNUNET_GNS_LocalOptions | ||
94 | { | ||
95 | /** | ||
96 | * Defaults, look in cache, then in DHT. | ||
97 | */ | ||
98 | GNUNET_GNS_LO_DEFAULT = 0, | ||
99 | |||
100 | /** | ||
101 | * Never look in the DHT, keep request to local cache. | ||
102 | */ | ||
103 | GNUNET_GNS_LO_NO_DHT = 1, | ||
104 | |||
105 | /** | ||
106 | * For the rightmost label, only look in the cache (it | ||
107 | * is our master zone), for the others, the DHT is OK. | ||
108 | */ | ||
109 | GNUNET_GNS_LO_LOCAL_MASTER = 2 | ||
110 | |||
111 | }; | ||
112 | |||
113 | |||
114 | /** | ||
91 | * Perform an asynchronous lookup operation on the GNS. | 115 | * Perform an asynchronous lookup operation on the GNS. |
92 | * | 116 | * |
93 | * @param handle handle to the GNS service | 117 | * @param handle handle to the GNS service |
94 | * @param name the name to look up | 118 | * @param name the name to look up |
95 | * @param zone zone to look in | 119 | * @param zone zone to look in |
96 | * @param type the GNS record type to look for | 120 | * @param type the GNS record type to look for |
97 | * @param only_cached #GNUNET_YES to only check locally (not in the DHT) | 121 | * @param options local options for the lookup |
98 | * @param shorten_zone_key the private key of the shorten zone (can be NULL); | 122 | * @param shorten_zone_key the private key of the shorten zone (can be NULL); |
99 | * specify to enable automatic shortening (given a PSEU | 123 | * specify to enable automatic shortening (given a PSEU |
100 | * record, if a given pseudonym is not yet used in the | 124 | * record, if a given pseudonym is not yet used in the |
@@ -109,7 +133,7 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
109 | const char *name, | 133 | const char *name, |
110 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, | 134 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, |
111 | uint32_t type, | 135 | uint32_t type, |
112 | int only_cached, | 136 | enum GNUNET_GNS_LocalOptions options, |
113 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_zone_key, | 137 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_zone_key, |
114 | GNUNET_GNS_LookupResultProcessor proc, | 138 | GNUNET_GNS_LookupResultProcessor proc, |
115 | void *proc_cls); | 139 | void *proc_cls); |