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

# dnsjit.core.object.pcap(3)

Container of a packet found in a PCAP

## NAME

dnsjit.core.object.pcap - Container of a packet found in a PCAP

## DESCRIPTION

Container of a PCAP packet which contains information both from the PCAP itself and the *pcap\_pkthdr* object receied for each packet in the PCAP.

### Attributes

- snaplen

  Max length saved portion of each packet.

- linktype

  Data link type for the PCAP.

- ts

  Time stamp of this packet.

- caplen

  Length of portion present.

- len

  Length of this packet (off wire).

- bytes

  A pointer to the packet.

- is\_swapped

  Indicate if the byte order of the PCAP is different then the host. This is used in, for example, the Layer filter to correctly parse null objects since they are stored in the capturers host byte order.

### Functions

- **Pcap:type**()

  Return the textual type of the object.

- **Pcap:prev**()

  Return the previous object.

- **Pcap:cast**()

  Cast the object to the underlining object module and return it.

- **Pcap:uncast**()

  Cast the object to the generic object module and return it.

- **Pcap:copy**()

  Make a copy of the object and return it.

- **Pcap:free**()

  Free the object, should only be used on copies or otherwise allocated.

## SEE ALSO

[**dnsjit.core.object**(3)](/dnsjit.core.object/3.md), [**dnsjit.input.pcap**(3)](/dnsjit.input.pcap/3.md), [**dnsjit.input.fpcap**(3)](/dnsjit.input.fpcap/3.md), [**dnsjit.input.mmpcap**(3)](/dnsjit.input.mmpcap/3.md), [**dnsjit.filter.layer**(3)](/dnsjit.filter.layer/3.md), [**dnsjit.output.pcap**(3)](/dnsjit.output.pcap/3.md)

## 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*
