summaryrefslogtreecommitdiffstats
path: root/include/dnsjit/core/object/dns
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/dnsjit/core/object/dns.c8
-rw-r--r--include/dnsjit/core/object/dns.h2
-rw-r--r--include/dnsjit/core/object/dns.hh4
-rw-r--r--include/dnsjit/core/object/dns.lua7
-rw-r--r--include/dnsjit/core/object/dns/label.lua2
-rw-r--r--include/dnsjit/core/object/dns/q.lua2
-rw-r--r--include/dnsjit/core/object/dns/rr.lua2
7 files changed, 19 insertions, 8 deletions
diff --git a/include/dnsjit/core/object/dns.c b/include/dnsjit/core/object/dns.c
index 0698286..a4bf309 100644
--- a/include/dnsjit/core/object/dns.c
+++ b/include/dnsjit/core/object/dns.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022, OARC, Inc.
+ * Copyright (c) 2018-2023, OARC, Inc.
* All rights reserved.
*
* This file is part of dnsjit.
@@ -95,6 +95,12 @@ void core_object_dns_free(core_object_dns_t* self)
free(self);
}
+void core_object_dns_reset(core_object_dns_t* self)
+{
+ mlassert_self();
+ *self = _defaults;
+}
+
#define need8(v, p, l) \
if (l < 1) { \
break; \
diff --git a/include/dnsjit/core/object/dns.h b/include/dnsjit/core/object/dns.h
index a641fe5..143ff89 100644
--- a/include/dnsjit/core/object/dns.h
+++ b/include/dnsjit/core/object/dns.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022, OARC, Inc.
+ * Copyright (c) 2018-2023, OARC, Inc.
* All rights reserved.
*
* This file is part of dnsjit.
diff --git a/include/dnsjit/core/object/dns.hh b/include/dnsjit/core/object/dns.hh
index 5bd091a..b4aefdd 100644
--- a/include/dnsjit/core/object/dns.hh
+++ b/include/dnsjit/core/object/dns.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2022, OARC, Inc.
+ * Copyright (c) 2018-2023, OARC, Inc.
* All rights reserved.
*
* This file is part of dnsjit.
@@ -112,7 +112,7 @@ core_log_t* core_object_dns_log();
core_object_dns_t* core_object_dns_new();
core_object_dns_t* core_object_dns_copy(const core_object_dns_t* self);
void core_object_dns_free(core_object_dns_t* self);
-void core_object_dns_reset(core_object_dns_t* self, const core_object_t* obj);
+void core_object_dns_reset(core_object_dns_t* self);
int core_object_dns_parse_header(core_object_dns_t* self);
int core_object_dns_parse_q(core_object_dns_t* self, core_object_dns_q_t* q, core_object_dns_label_t* label, size_t labels);
diff --git a/include/dnsjit/core/object/dns.lua b/include/dnsjit/core/object/dns.lua
index 308c067..632fe95 100644
--- a/include/dnsjit/core/object/dns.lua
+++ b/include/dnsjit/core/object/dns.lua
@@ -1,4 +1,4 @@
--- Copyright (c) 2018-2022, OARC, Inc.
+-- Copyright (c) 2018-2023, OARC, Inc.
-- All rights reserved.
--
-- This file is part of dnsjit.
@@ -517,6 +517,11 @@ function Dns:free()
C.core_object_dns_free(self)
end
+-- Reset the object readying it for reuse.
+function Dns:reset()
+ C.core_object_dns_reset(self)
+end
+
-- Return the Log object to control logging of this module.
function Dns:log()
return C.core_object_dns_log()
diff --git a/include/dnsjit/core/object/dns/label.lua b/include/dnsjit/core/object/dns/label.lua
index f3de584..27bf918 100644
--- a/include/dnsjit/core/object/dns/label.lua
+++ b/include/dnsjit/core/object/dns/label.lua
@@ -1,4 +1,4 @@
--- Copyright (c) 2018-2022, OARC, Inc.
+-- Copyright (c) 2018-2023, OARC, Inc.
-- All rights reserved.
--
-- This file is part of dnsjit.
diff --git a/include/dnsjit/core/object/dns/q.lua b/include/dnsjit/core/object/dns/q.lua
index c3d6358..2eaa7fa 100644
--- a/include/dnsjit/core/object/dns/q.lua
+++ b/include/dnsjit/core/object/dns/q.lua
@@ -1,4 +1,4 @@
--- Copyright (c) 2018-2022, OARC, Inc.
+-- Copyright (c) 2018-2023, OARC, Inc.
-- All rights reserved.
--
-- This file is part of dnsjit.
diff --git a/include/dnsjit/core/object/dns/rr.lua b/include/dnsjit/core/object/dns/rr.lua
index 2db2955..967d9f1 100644
--- a/include/dnsjit/core/object/dns/rr.lua
+++ b/include/dnsjit/core/object/dns/rr.lua
@@ -1,4 +1,4 @@
--- Copyright (c) 2018-2022, OARC, Inc.
+-- Copyright (c) 2018-2023, OARC, Inc.
-- All rights reserved.
--
-- This file is part of dnsjit.