GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::ANALYSIS::PACKET (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



  use Net::Analysis::Packet qw(:pktslots :func);

  my $p = [...]; # See code in Net::Analysis::EventLoop
  pkt_init($p);

  my $packet_data = $p->[PKT_SLOT_DATA];

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

  my $net_analysis_time = pkt_time($pkt);



DESCRIPTION

Internal module for abstracting the underlying packet representation.

It is just an array, not an object; there is no OO magic at all. You can use the following constants to exctract these fields from the array:



 PKT_SLOT_TO         - ip:port (e.g. "192.0.0.200:8080")
 PKT_SLOT_FROM       - ip:port (e.g. "10.0.0.1:13211")
 PKT_SLOT_FLAGS      - byte of TCP flags (see Net::Analysis::Constants)
 PKT_SLOT_DATA       - packet payload (may be empty)
 PKT_SLOT_SEQNUM     - the SEQ number of the packet
 PKT_SLOT_ACKNUM     - the ACK number of the packet
 PKT_SLOT_PKT_NUMBER - packets are numbered from zero as we read them in
 PKT_SLOT_SOCKETPAIR_KEY -  the unique key for the TCP session



FUNCTIONS

    pkt_init ($p)

Does some setup on the bare data passed in; mostly creating a time object.

    pkt_time ($p)

Returns the Net::Analysis::Time object associated with the packet.

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::ANALYSIS::PACKET (3) 2010-03-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.