IPTables::Log::Set::Record - Holds a single IPTables/Netfilter log entry.
Note that this class isn't designed to be created directly. You can create these objects via a IPTables::Log::Set object.
IPTables::Log::Set
use IPTables::Log; my $l = IPTables::Log->new; my $s = $l->create_set; my $r = $s->create_record({text => '...IN=eth0 OUT=eth1 MAC=00:...'}); $r->parse;
Class::Accessor - for accessor methods
Data::GUID - for GUID generation
NetAddr::IP - for the src and dst methods
src
dst
Creates a new IPTables::Log::Set::Record object. You shouldn't call this directly - see the synopsis for an example.
IPTables::Log::Set::Record
Parses the log message text passed either to the constructor, or via set_text.
set_text
Sets the log message text. Either this must be set, or the text must have been passed to create, otherwise parse will error.
create
parse
Returns the value of field. Field can be one of guid, date, time, hostname, prefix, in, out, mac, src, dst, proto, spt, dpt, id, len, ttl, df, window, syn.
Returns the GUID for the packet.
Returns the date portion of the log message.
Returns the time portion of the log message.
rETURns the hostname portion of the log message.
Returns the iptables/netfilter log prefix for the log message, i.e. the part specified by -j LOG --log-prefix='LOG PREFIX '.
-j LOG --log-prefix='LOG PREFIX '
Returns the ingress interface, if specified.
Returns the egress interface, if specified.
Returns the MAC address, if specified.
Returns the source IP address.
Returns the destination IP address.
Returns the protocol.
Returns the source port, if applicable.
Returns the destination port, if applicable
Returns the packet ID.
Returns the packet length.
Returns the packet's TTL (Time To Live).
Returns the packet's DF (Don't Fragment) value.
Returns the packet's window size.
Returns 1 if the packet is a SYN, otherwise returns 0.
Returns 1 if the packet has been successfully parsed, otherwise returns 0.
It parses log entries. It doesn't do much else, yet.
None that I'm aware of ;-)
This module was written by Andy Smith <andy.smith@netprojects.org.uk>.
$Id: Record.pm 21 2010-12-17 21:07:37Z andys $
(c)2009 Andy Smith (http://andys.org.uk/)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install IPTables::Log, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPTables::Log
CPAN shell
perl -MCPAN -e shell install IPTables::Log
For more information on module installation, please visit the detailed CPAN module installation guide.