1 #ifndef NSS_GNS_QUERY_H
2 #define NSS_GNS_QUERY_H
5 * Parts taken from nss-mdns. Original license statement follows
11 This file is part of nss-mdns.
13 nss-mdns is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 nss-mdns is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU Lesser General Public
24 License along with nss-mdns; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
31 /* Maximum number of entries to return */
32 #define MAX_ENTRIES 16
45 int data_len; /* only valid when doing reverse lookup */
47 ipv4_address_t ipv4[MAX_ENTRIES];
48 ipv6_address_t ipv6[MAX_ENTRIES];
49 char *name[MAX_ENTRIES];
54 * Wrapper function that uses gnunet-gns cli tool to resolve
57 * @param af address family
58 * @param name the name to resolve
59 * @param u the userdata (result struct)
60 * @return -1 on error else 0
62 int gns_resolve_name(int af,
64 struct userdata *userdata);