---
name: "dnsjit.filter.copy"
section: "3"
platform: "linux"
package: "dnsjit"
version: "1.5.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dnsjit.filter.copy"
---

# dnsjit.filter.copy(3)

Creates a copy of an object chain with selected object types.

## NAME

dnsjit.filter.copy - Creates a copy of an object chain with selected object types.

## SYNOPSIS

  local copy = require("dnsjit.filter.copy").new()\
   local object = require("dnsjit.core.objects")\
   copy:obj\_type(object.PAYLOAD)\
   copy:obj\_type(object.IP6)\
   channel:receiver(copy)

## DESCRIPTION

Filter to create a copy of the object chain with selected object types. The user is responsible for manually freeing the created object chain.

### Functions

- **Copy.new**()

  Create a new Copy filter.

- **Copy:log**()

  Return the Log object to control logging of this instance or module.

- **Copy:obj\_type**(obj\_type)

  Set the object type to be copied. Can be called multiple times to copy multiple object types from the object chain.

- **Copy:receive**()

  Return the C functions and context for receiving objects.

- **Copy:receiver**(o)

  Set the receiver to pass objects to.

## AUTHORS and CONTRIBUTORS

Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC)

Maintained by DNS-OARC

*https://www.dns-oarc.net/*

## BUGS

For issues and feature requests please use:

*https://github.com/DNS-OARC/dnsjit/issues*

For question and help please use:

*admin@dns-oarc.net*
