diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2023-12-10 09:45:27 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2023-12-10 09:45:27 +0000 |
commit | 38b6c8c8ca8294c87bce5325fbba50fba1a40465 (patch) | |
tree | 14f869a6270a904547a6abcb113c5425554d8331 /src/core/object/dns | |
parent | Adding upstream version 1.2.3. (diff) | |
download | dnsjit-38b6c8c8ca8294c87bce5325fbba50fba1a40465.tar.xz dnsjit-38b6c8c8ca8294c87bce5325fbba50fba1a40465.zip |
Adding upstream version 1.3.0.upstream/1.3.0
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | src/core/object/dns.c | 8 | ||||
-rw-r--r-- | src/core/object/dns.h | 2 | ||||
-rw-r--r-- | src/core/object/dns.hh | 4 | ||||
-rw-r--r-- | src/core/object/dns.lua | 7 | ||||
-rw-r--r-- | src/core/object/dns/label.lua | 2 | ||||
-rw-r--r-- | src/core/object/dns/q.lua | 2 | ||||
-rw-r--r-- | src/core/object/dns/rr.lua | 2 |
7 files changed, 19 insertions, 8 deletions
diff --git a/src/core/object/dns.c b/src/core/object/dns.c index 0698286..a4bf309 100644 --- a/src/core/object/dns.c +++ b/src/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/src/core/object/dns.h b/src/core/object/dns.h index a641fe5..143ff89 100644 --- a/src/core/object/dns.h +++ b/src/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/src/core/object/dns.hh b/src/core/object/dns.hh index 5bd091a..b4aefdd 100644 --- a/src/core/object/dns.hh +++ b/src/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/src/core/object/dns.lua b/src/core/object/dns.lua index 308c067..632fe95 100644 --- a/src/core/object/dns.lua +++ b/src/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/src/core/object/dns/label.lua b/src/core/object/dns/label.lua index f3de584..27bf918 100644 --- a/src/core/object/dns/label.lua +++ b/src/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/src/core/object/dns/q.lua b/src/core/object/dns/q.lua index c3d6358..2eaa7fa 100644 --- a/src/core/object/dns/q.lua +++ b/src/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/src/core/object/dns/rr.lua b/src/core/object/dns/rr.lua index 2db2955..967d9f1 100644 --- a/src/core/object/dns/rr.lua +++ b/src/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. |