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
Net::Analysis::Packet(3) User Contributed Perl Documentation Net::Analysis::Packet(3)

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

  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);

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

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

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

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

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

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.

2010-03-24 perl v5.32.1

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

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