aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dnsparser_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_dnsparser_lib.h')
-rw-r--r--src/include/gnunet_dnsparser_lib.h72
1 files changed, 61 insertions, 11 deletions
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h
index 3a2f785d3..0fc6ac19c 100644
--- a/src/include/gnunet_dnsparser_lib.h
+++ b/src/include/gnunet_dnsparser_lib.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2010-2014 GNUnet e.V. 3 Copyright (C) 2010-2014 GNUnet e.V.
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 it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */ 17 */
20 18
21/** 19/**
@@ -33,7 +31,6 @@
33#define GNUNET_DNSPARSER_LIB_H 31#define GNUNET_DNSPARSER_LIB_H
34 32
35#include "gnunet_util_lib.h" 33#include "gnunet_util_lib.h"
36#include "gnunet_tun_lib.h"
37 34
38/** 35/**
39 * Maximum length of a label in DNS. 36 * Maximum length of a label in DNS.
@@ -85,6 +82,7 @@
85#define GNUNET_DNSPARSER_TYPE_OPENPGPKEY 61 82#define GNUNET_DNSPARSER_TYPE_OPENPGPKEY 61
86#define GNUNET_DNSPARSER_TYPE_TKEY 249 83#define GNUNET_DNSPARSER_TYPE_TKEY 249
87#define GNUNET_DNSPARSER_TYPE_TSIG 250 84#define GNUNET_DNSPARSER_TYPE_TSIG 250
85#define GNUNET_DNSPARSER_TYPE_ALL 255
88#define GNUNET_DNSPARSER_TYPE_URI 256 86#define GNUNET_DNSPARSER_TYPE_URI 256
89#define GNUNET_DNSPARSER_TYPE_TA 32768 87#define GNUNET_DNSPARSER_TYPE_TA 32768
90 88
@@ -843,6 +841,58 @@ GNUNET_DNSPARSER_parse_srv (const char *udp_payload,
843 size_t udp_payload_length, 841 size_t udp_payload_length,
844 size_t *off); 842 size_t *off);
845 843
844/* ***************** low-level duplication API ******************** */
845
846/**
847 * Duplicate (deep-copy) the given DNS record
848 *
849 * @param r the record
850 * @return the newly allocated record
851 */
852struct GNUNET_DNSPARSER_Record *
853GNUNET_DNSPARSER_duplicate_record (const struct GNUNET_DNSPARSER_Record *r);
854
855
856/**
857 * Duplicate (deep-copy) the given DNS record
858 *
859 * @param r the record
860 * @return the newly allocated record
861 */
862struct GNUNET_DNSPARSER_SoaRecord *
863GNUNET_DNSPARSER_duplicate_soa_record (const struct GNUNET_DNSPARSER_SoaRecord *r);
864
865
866/**
867 * Duplicate (deep-copy) the given DNS record
868 *
869 * @param r the record
870 * @return the newly allocated record
871 */
872struct GNUNET_DNSPARSER_CertRecord *
873GNUNET_DNSPARSER_duplicate_cert_record (const struct GNUNET_DNSPARSER_CertRecord *r);
874
875
876/**
877 * Duplicate (deep-copy) the given DNS record
878 *
879 * @param r the record
880 * @return the newly allocated record
881 */
882struct GNUNET_DNSPARSER_MxRecord *
883GNUNET_DNSPARSER_duplicate_mx_record (const struct GNUNET_DNSPARSER_MxRecord *r);
884
885
886/**
887 * Duplicate (deep-copy) the given DNS record
888 *
889 * @param r the record
890 * @return the newly allocated record
891 */
892struct GNUNET_DNSPARSER_SrvRecord *
893GNUNET_DNSPARSER_duplicate_srv_record (const struct GNUNET_DNSPARSER_SrvRecord *r);
894
895
846/* ***************** low-level deallocation API ******************** */ 896/* ***************** low-level deallocation API ******************** */
847 897
848/** 898/**