]> git.mxchange.org Git - simgear.git/blob - 3rdparty/udns/udns_dntosp.c
Initial commit for a DNS service resolver
[simgear.git] / 3rdparty / udns / udns_dntosp.c
1 /* udns_dntosp.c
2    dns_dntosp() = convert DN to asciiz string using static buffer
3
4    Copyright (C) 2005  Michael Tokarev <mjt@corpit.ru>
5    This file is part of UDNS library, an async DNS stub resolver.
6
7    This library is free software; you can redistribute it and/or
8    modify it under the terms of the GNU Lesser General Public
9    License as published by the Free Software Foundation; either
10    version 2.1 of the License, or (at your option) any later version.
11
12    This library is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    Lesser General Public License for more details.
16
17    You should have received a copy of the GNU Lesser General Public
18    License along with this library, in file named COPYING.LGPL; if not,
19    write to the Free Software Foundation, Inc., 59 Temple Place,
20    Suite 330, Boston, MA  02111-1307  USA
21
22  */
23
24 #include "udns.h"
25
26 static char name[DNS_MAXNAME];
27
28 const char *dns_dntosp(dnscc_t *dn) {
29   return dns_dntop(dn, name, sizeof(name)) > 0 ? name : 0;
30 }