NAME
Net::NfDump - Perl extension for blah blah blah
SYNOPSIS
use Net::NfDump;
blah blah blah
DESCRIPTION
Stub documentation for Net::NfDump, created by h2xs. It looks like the author of the extension was negligent enough to leave the stub unedited.
Blah blah blah.
EXPORT
METHODS
new The constructor. As the parameter options can be specified. This options will be used as a default option set in the particular methods.
file_info Reads information from nfdump file header. It provides various atributes like number of blocks, version, flags, statistics, etc. related to the file. Return has hreference with items
info Returns the information the current state of processing input files. It returns information about already processed files, blocks, records. Those information can be usefull for guessing time of processing whole dataset.
query Query method can be used in two ways. If the string argument is the flow query is handled. See section FLOW QUERY how to create flow queries.
read Have to be used after query method. If the query wasn't called before the method is called as $obj->query() before the first record is returned.
Method returns hash reference with the record and skips to the next record. Returns true if there are more records to read or false if all record from all files have been read.
create_file Creates a new nfdump file.
storerow_hashref Insert data defined in hashref to the file opened by create.
finish Closes all openes file handles. It is nescessary to call that method specilly when a new file is created. The method flushes to file records that remains in the memory buffer and updates file statistics in the header. Withat calling this method the output file might be corupted.
FLOW QUERY - NOT IMPLEMENTED YET The flow query is language vyry simmilar to SQL to query data on nfdump files. However flow query have nothing to do with SQL. It uses only simmilar command syntax. Example of flow query
SELECT * FROM data/nfdump1.nfcap, data2/nfdump2.nfcap WHERE src host 147.229.3.10 TIME WINDOW BETWEEN '2012-06-03' AND '202-06-04' ORDER BY bytes LIMIT 100
NOTE ABOUT 32BIT PLATFORMS Nfdump primary uses 64 bit counters and other items to store single integer value. However the native 64 bit support is not compiled in every perl. For thoose cases where only 32 integer values are supported the Net::NfDump uses Math::Int64 module.
The build scripts automatically detect the platform and Math::Int64 module is required only on platforms where perl do not supports 64bit integer values.
EXTRA CONVERTION FUNCTIONS The module also provides extra convertion functions that allow convert binnary format of IP address, MAC address and MPLS labels tag into text format and back.
Those functions are not exported by default
ip2txt Converts both IPv4 and IPv6 address into text form. The standart inet_ntop function can be used instead to provide same results.
txt2ip Inversion fuction to ip2txt. Returns binnary format of IP addres or undef if the conversion is impossible.
mac2txt Converts MAC addres to xx:yy:xx:yy:xx:yy format.
txt2mac Inversion fuction to mac2txt. Accept address in any of following format aabbccddeeff aa:bb:cc:dd:ee:ff aa-bb-cc-dd-ee-ff aabb-ccdd-eeff
Return the binnary format of the address or undef if confersion is impossible.
mpls2txt Converts label information to format Lbl-Exp-S
Whwre Lbl - Value given to the MPLS label by the router. Exp - Value of experimental bit. S - Value of the end-of-stack bit: Set to 1 for the oldest entry in the stack and to zero for all other entries.
txt2mpls Inversion function to mpls2txt. As the argiment expects the text representaion of the MPLS labels as was described in the previous function (Lbl-Exp-S)
row2txt Gets hash reference to items returned by fetchrow_hashref and converts all items into human readable text format. Applies finction ip2txt, mac2txt, mpl2txt to the items where it make sense.
txt2row Inversion function to row2txt. It is usefull before calling storerow_hashref
Flow received time in ms
=item srcport Source port
Destination port
TCP flags
Source IP address
Destination IP address
IP next hop
Source mask
Destination mask
Source type of service
Destination type of Service
Source AS number
Destination AS number
BGP Next AS
BGP Previous AS
BGP next hop
IP protocol
Source vlan label
Destination vlan label
In source MAC address
Out destination MAC address
In destintation MAC address
Out source MAC address
MPLS label
SNMP input interface number
SNMP output interface number
Flow directions ingress/egress
Forwarding status
Exporting router IP
Type of exporter
Internal SysID of exporter
nprobe latency client_nw_delay_usec
nprobe latency server_nw_delay_usec
nprobe latency appl_latency_usec
=head1 SEE ALSO
http://nfdump.sourceforge.net/
AUTHOR
Tomas Podermanski, <tpoder@cis.vutbr.cz>, Brno University of Technology
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Brno University of Technology
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 601:
=pod directives shouldn't be over one line long! Ignoring all 2 lines of content