2 This file is part of GNUnet.
3 Copyright (C) 2009-2013 GNUnet e.V.
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
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 * @file gns/gnunet-service-gns_reverser.h
22 * @brief GNUnet GNS service
23 * @author Martin Schanzenbach
25 #ifndef GNS_REVERSER_H
26 #define GNS_REVERSER_H
28 #include "gnunet_gns_service.h"
31 * Handle for an active request.
33 struct GNS_ReverserHandle;
37 * Function called with results for a GNS resolution.
40 * @param rd_count number of records in @a rd
41 * @param rd records returned for the lookup
43 typedef void (*GNS_ReverseResultProcessor)(void *cls,
48 * Reverse lookup of a specific zone
49 * calls RecordLookupProcessor on result or timeout
51 * @param target the zone to perform the lookup in
52 * @param authority the authority
53 * @param proc the processor to call
54 * @param proc_cls the closure to pass to @a proc
55 * @return handle to cancel operation
57 struct GNS_ReverserHandle *
58 GNS_reverse_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *target,
59 const struct GNUNET_CRYPTO_EcdsaPublicKey *authority,
60 GNS_ReverseResultProcessor proc,
65 * Cancel active resolution (i.e. client disconnected).
67 * @param rh resolution to abort
70 GNS_reverse_lookup_cancel (struct GNS_ReverserHandle *rh);
75 * @param nh handle to a namestore
76 * @param key the private key of the gns-reverse zone
77 * @param name the name of the gns-reverse zone
81 GNS_reverse_init (struct GNUNET_NAMESTORE_Handle *nh,
82 const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,