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

Net::Analysis::TCPMonologue - simple class to contain a TCP monologue

  use Net::Analysis::Packet;
  use Net::Analysis::Monologue;

  my $mono = Net::Analysis::Monologue->new();
  $mono->add_packet($pkt);

  if ($mono->data() =~ /foo/) {
    print "Mono contained 'foo'\n";
  }

  print "Monologue was " .$mono->length().
        "b long, over "  .$mono->t_elapsed ()." seconds\n";

A TCP monologue is a series of packets that travel in one direction, e.g. a HTTP response. A monologue ends when a data packet travels in the other direction. Pairs of monologues will often be linked as transactions.

As packets are added, this object updates some info. It assumes that the packet you've added belongs in the monologue, and that you're adding them in the correct order.

The payload of the monologue lives in "$mono-"{data}>.

Takes no arguments.

Adds any data, increments the packet counter, and keeps note of the time.

Walks through the packets in $other_mono, and adds each one to $self.

The actual data of the monologue; the bytes sent.

Returns an object representing the time the monologue started. Can be treated like a float, giving fractional epoch seconds. Only accurate to the microsecond.

Same as "t_start()", but giving the time the monologue ended (or the last packet so far, if you call it before the monologue has ended.)

Returns an object representing "t_end - t_start" for this monologue. Can be treated like a float, giving duration in fractional seconds.

How many data packets were in the monologue.

How long the monologue data was, in bytes. Excludes all the various packet headers.

Returns the first Net::Analysis::Packet in the monologue. You can use it to extract any TCP or IP information about the monologue.

Given a byte offset from within the monologue, and optionally an offset later in the monologue, return the packets which contributed bytes between the offsets (or an empty arrayref if none found). Bytes are counted from zero (i.e. offset '0' would be the first byte).

This can be useful to retrieve timestamps of areas inside long-lived monologues.

Returns the socketpair key of the TCP session containing the monologue.

Returns an array-ref, containing all the packets which contributed data to the monologue.

NOTE: this method may go away sometime.

None by default.

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-04-04 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.