The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Analysis::Packet - wrapper for our own view of a packet.

SYNOPSIS

use Net::Analysis::Packet;

my $p = Net::Analysis::Packet ( {...} ); # See Net::Analysis::EventLoop

print "My packet:-\n$p";
print "Pretty hex dump of payload:-\n".$p->as_string('verbose');

DESCRIPTION

Internal module for abstracting the underlying packet representation.

It is basically a big hash, containing the following fields:

to         - ip:port (e.g. "192.0.0.200:8080")
from       - ip:port (e.g. "10.0.0.1:13211")
flags      - TCP flags (see Net::Analysis::Constants)
data       - packet payload (may be empty)
seqnum     - the SEQ number of the packet
acknum     - the ACK number of the packet
pkt_number - packets are numbered from zero as they're read in

time       - a Net::Analysis::Time object

EXPORT

None by default.

SEE ALSO

Net::Analysis, Net::Analysis::EventLoop, Net::Analysis::Time, Net::Analysis::Constants.

AUTHOR

Adam B. Worrall, <worrall@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by Adam B. Worrall

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.