The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Linux::Netfilter::Log::Group - Recieve packets for a particular NFLOG group

DESCRIPTION

This object represents an NFLOG group to which we are bound and receiving packets from.

INSTANCE METHODS

callback_register($callback)

Sets the callback subroutine used to process packets logged in this group.

  $group->callback_register(sub
  {
          my ($packet) = @_;
          
          ...
  });

The $packet is a Linux::Netfilter::Log::Packet reference.

set_mode($mode, $range)

Sets the amount of data to be copied to userspace for each packet logged to the given group.

NFULNL_COPY_NONE

Do not copy any data.

NFULNL_COPY_META

Copy only packet metadata.

NFULNL_COPY_PACKET

Copy entire packet. Packets larger than $range will be truncated.

set_nlbufsiz($size)

This method sets the size (in bytes) of the buffer that is used to stack log messages in nflog.

set_qthresh($qthresh)

This method determines the maximum number of log entries to queue in the kernel until it is pushed to userspace. This can be overridden by the NFLOG iptables target.

set_timeout($timeout)

This method determines the maximum time (in centiseconds) that a logged packet will be queued in the kernel before being pushed to userspace.

set_flags($flags)

Set the nflog flags for this group. Takes a bitwise OR'd set of the following:

NFULNL_CFG_F_SEQ

This enables local nflog sequence numbering (see Packet->seq()).

NFULNL_CFG_F_SEQ_GLOBAL

This enables global nflog sequence numbering (see Packet->seq_global()).

SEE ALSO

Linux::Netfilter::Log, Linux::Netfilter::Log::Packet