Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Net::Frame::Dump::WritUser)Contributed Perl DocumenNet::Frame::Dump::Writer(3)

NAME
       Net::Frame::Dump::Writer	- tcpdump like implementation, writer mode

SYNOPSIS
	  use Net::Frame::Dump::Writer;

	  my $oDump = Net::Frame::Dump::Writer->new(
	     file	=> 'new-file.pcap',
	     firstLayer	=> 'ETH',
	  );

	  $oDump->start;

	  $oDump->write({ timestamp => '10.10',	raw => ('A' x 14) });

	  $oDump->stop;

DESCRIPTION
       This module implements a	pcap file builder. You will be able to create
       frames, then write them in the pcap file	format to a file.

ATTRIBUTES
       The following are inherited attributes:

       file
	   Name	of the .pcap file to generate.

       overwrite
	   Overwrites a	.pcap file that	already	exists.	Default	to not.

       append
	   Append new frames to	an existing pcap file. Create it if does not
	   exists yet.

       firstLayer
	   Stores information about the	first layer type. It is	used to	write
	   .pcap file header information.

       isRunning
	   Returns true	if a call to start has been done, false	otherwise or
	   if a	call to	stop has been done.

METHODS
       new
       new (hash)
	   Object constructor. You can pass attributes that will overwrite
	   default ones. See SYNOPSIS for default values.

       start
	   When	you want to start writing frames to the	file, call this
	   method.

       stop
	   When	you want to stop writing frames	to the file, call this method.

       write ({	timestamp => $value, raw => $rawFrame })
	   Takes a hashref as a	parameter. This	hashref	MUST have timestamp
	   and raw keys, with values. The raw data will	be stored to the .pcap
	   file.

SEE ALSO
       Net::Frame::Dump

AUTHOR
       Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE
       Copyright (c) 2006-2020,	Patrice	<GomoR>	Auffret

       You may distribute this module under the	terms of the Artistic license.
       See LICENSE.Artistic file in the	source distribution archive.

perl v5.32.1			  2020-05-01	   Net::Frame::Dump::Writer(3)

NAME | SYNOPSIS | DESCRIPTION | ATTRIBUTES | METHODS | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Net::Frame::Dump::Writer&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help