Top Fields Constructors Methods
io.netty.handler.pcap

pack-priv final Class PcapHeaders

extends Object
Class Inheritance
Imports
io.netty.buffer.ByteBuf, java.io.IOException, .OutputStream

Field Summary

Modifier and TypeField and Description
private static final byte[]
GLOBAL_HEADER

Pcap Global Header built from:

  1. magic_number
  2. version_major
  3. version_minor
  4. thiszone
  5. sigfigs
  6. snaplen
  7. network

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
writeGlobalHeader(OutputStream
OutputStream where Pcap data will be written.
outputStream
)

Writes the Pcap Global Header to the provided OutputStream

pack-priv static void
writePacketHeader(ByteBuf
ByteBuf where we'll write header data
byteBuf
,
int
timestamp seconds
ts_sec
,
int
timestamp microseconds
ts_usec
,
int
number of octets of packet saved in file
incl_len
,
int
actual length of packet
orig_len
)

Write Pcap Packet Header

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

Constructor Detail

PcapHeadersback to summary
private PcapHeaders()

Method Detail

writeGlobalHeaderback to summary
pack-priv static void writeGlobalHeader(OutputStream outputStream) throws IOException

Writes the Pcap Global Header to the provided OutputStream

Parameters
outputStream:OutputStream

OutputStream where Pcap data will be written.

Exceptions
IOException:
if there is an error writing to the OutputStream
writePacketHeaderback to summary
pack-priv static void writePacketHeader(ByteBuf byteBuf, int ts_sec, int ts_usec, int incl_len, int orig_len)

Write Pcap Packet Header

Parameters
byteBuf:ByteBuf

ByteBuf where we'll write header data

ts_sec:int

timestamp seconds

ts_usec:int

timestamp microseconds

incl_len:int

number of octets of packet saved in file

orig_len:int

actual length of packet