fix bad free
[oweals/gnunet.git] / src / include / gnunet_dnsparser_lib.h
index fa7aef429f82b8b304250cbab85c16260f56734e..ba1392510ede2b8f478c2a101b72dfaefe46a025 100644 (file)
@@ -1,21 +1,19 @@
 /*
       This file is part of GNUnet
-      Copyright (C) 2010-2014 Christian Grothoff (and other contributing authors)
+      Copyright (C) 2010-2014 GNUnet e.V.
 
-      GNUnet is free software; you can redistribute it and/or modify
-      it under the terms of the GNU General Public License as published
-      by the Free Software Foundation; either version 3, or (at your
-      option) any later version.
+      GNUnet is free software: you can redistribute it and/or modify it
+      under the terms of the GNU Affero General Public License as published
+      by the Free Software Foundation, either version 3 of the License,
+      or (at your option) any later version.
 
       GNUnet is distributed in the hope that it will be useful, but
       WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-      General Public License for more details.
-
-      You should have received a copy of the GNU General Public License
-      along with GNUnet; see the file COPYING.  If not, write to the
-      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-      Boston, MA 02110-1301, USA.
+      Affero General Public License for more details.
+     
+      You should have received a copy of the GNU Affero General Public License
+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 /**
@@ -33,7 +31,6 @@
 #define GNUNET_DNSPARSER_LIB_H
 
 #include "gnunet_util_lib.h"
-#include "gnunet_tun_lib.h"
 
 /**
  * Maximum length of a label in DNS.
@@ -49,6 +46,7 @@
 /**
  * A few common DNS types.
  */
+#define GNUNET_DNSPARSER_TYPE_ANY 0
 #define GNUNET_DNSPARSER_TYPE_A 1
 #define GNUNET_DNSPARSER_TYPE_NS 2
 #define GNUNET_DNSPARSER_TYPE_CNAME 5
 #define GNUNET_DNSPARSER_TYPE_PTR 12
 #define GNUNET_DNSPARSER_TYPE_MX 15
 #define GNUNET_DNSPARSER_TYPE_TXT 16
+#define GNUNET_DNSPARSER_TYPE_RP 17
+#define GNUNET_DNSPARSER_TYPE_AFSDB 18
+#define GNUNET_DNSPARSER_TYPE_SIG 24
+#define GNUNET_DNSPARSER_TYPE_KEY 25
 #define GNUNET_DNSPARSER_TYPE_AAAA 28
+#define GNUNET_DNSPARSER_TYPE_LOC 29
 #define GNUNET_DNSPARSER_TYPE_SRV 33
+#define GNUNET_DNSPARSER_TYPE_NAPTR 35
+#define GNUNET_DNSPARSER_TYPE_KX 36
 #define GNUNET_DNSPARSER_TYPE_CERT 37
+#define GNUNET_DNSPARSER_TYPE_DNAME 39
+#define GNUNET_DNSPARSER_TYPE_APL 42
+#define GNUNET_DNSPARSER_TYPE_DS 43
+#define GNUNET_DNSPARSER_TYPE_SSHFP 44
+#define GNUNET_DNSPARSER_TYPE_IPSECKEY 45
+#define GNUNET_DNSPARSER_TYPE_RRSIG 46
+#define GNUNET_DNSPARSER_TYPE_NSEC 47
+#define GNUNET_DNSPARSER_TYPE_DNSKEY 48
+#define GNUNET_DNSPARSER_TYPE_DHCID 49
+#define GNUNET_DNSPARSER_TYPE_NSEC3 50
+#define GNUNET_DNSPARSER_TYPE_NSEC3PARAM 51
 #define GNUNET_DNSPARSER_TYPE_TLSA 52
-
+#define GNUNET_DNSPARSER_TYPE_HIP 55
+#define GNUNET_DNSPARSER_TYPE_CDS 59
+#define GNUNET_DNSPARSER_TYPE_CDNSKEY 60
+#define GNUNET_DNSPARSER_TYPE_OPENPGPKEY 61
+#define GNUNET_DNSPARSER_TYPE_TKEY 249
+#define GNUNET_DNSPARSER_TYPE_TSIG 250
+#define GNUNET_DNSPARSER_TYPE_URI 256
+#define GNUNET_DNSPARSER_TYPE_TA 32768
 
 /**
  * A DNS query.
@@ -413,10 +436,10 @@ struct GNUNET_DNSPARSER_Record
 
     /**
      * For NS, CNAME and PTR records, this is the uncompressed 0-terminated hostname.
-   * In UTF-8 format.  The library will convert from and to DNS-IDNA
-   * as necessary.  Use #GNUNET_DNSPARSER_check_label() to test if an
-   * individual label is well-formed.  If a given name is not well-formed,
-   * creating the DNS packet will fail.
+     * In UTF-8 format.  The library will convert from and to DNS-IDNA
+     * as necessary.  Use #GNUNET_DNSPARSER_check_label() to test if an
+     * individual label is well-formed.  If a given name is not well-formed,
+     * creating the DNS packet will fail.
      */
     char *hostname;