summaryrefslogtreecommitdiffstats
path: root/include/dnsjit/core/object/gre.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/dnsjit/core/object/gre.c (renamed from src/output/null.hh)36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/output/null.hh b/include/dnsjit/core/object/gre.c
index 3f5cd33..9a467c3 100644
--- a/src/output/null.hh
+++ b/include/dnsjit/core/object/gre.c
@@ -18,20 +18,28 @@
* along with dnsjit. If not, see <http://www.gnu.org/licenses/>.
*/
-//lua:require("dnsjit.core.log")
-//lua:require("dnsjit.core.receiver_h")
-//lua:require("dnsjit.core.producer_h")
+#include "config.h"
-typedef struct output_null {
- core_log_t _log;
- core_producer_t prod;
- void* ctx;
- size_t pkts;
-} output_null_t;
+#include "core/object/gre.h"
+#include "core/assert.h"
-core_log_t* output_null_log();
-void output_null_init(output_null_t* self);
-void output_null_destroy(output_null_t* self);
-void output_null_run(output_null_t* self, int64_t num);
+#include <stdlib.h>
+#include <string.h>
-core_receiver_t output_null_receiver();
+core_object_gre_t* core_object_gre_copy(const core_object_gre_t* self)
+{
+ core_object_gre_t* copy;
+ glassert_self();
+
+ glfatal_oom(copy = malloc(sizeof(core_object_gre_t)));
+ memcpy(copy, self, sizeof(core_object_gre_t));
+ copy->obj_prev = 0;
+
+ return copy;
+}
+
+void core_object_gre_free(core_object_gre_t* self)
+{
+ glassert_self();
+ free(self);
+}