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

FreeBSD Manual Pages

  
 
  

home | help
Net::Analysis::TCPSessUser3Contributed Perl DocumeNet::Analysis::TCPSession(3)

NAME
       Net::Analysis::TCPSession - represent a TCP session (with two
       endpoints)

SYNOPSIS
	 use Net::Analysis::TCPSession qw(:const);

	 my $sesh = Net::Analysis::TCPSession->new ();

	 foreach my $pkt (@packets) {
	   my $ret = $sesh->process_packet ($pkt);
	   ($ret) || die "broken session: ".$sesh->errstr();
	   print " >> $sesh <<\n";

	   if	   ($ret == PKT_ESTABLISHED_SESSION) {
	     print "new	session	established\n";

	   } elsif ($ret == PKT_TERMINATED_SESSION) {
	     print "session torn down\n";

	   } elsif ($ret == PKT_FLIPPED_DIR) {
	     print "monologue generated\n----\n".$sesh->previous_monologue();
	   }
	 }

	 if ($sesh->has_current_monologue()) {
	   print "final	monologue\n----\n".$sesh->current_monologue();
	 }

DESCRIPTION
       Processes a packet in the context of an existing	TCP session. This is
       the module that does the	bulk of	the stream management; SYNs, ACKs,
       dropping	duplicates and storing out-of-sequence packets.

       A packet, once placed in	order, is considered to	do just	one of four
       things:

       o   establish a new TCP session

       o   add data to a TCP monologue (data travelling	in one direction)

       o   flip	the direction of conversation (thus terminating	existing
	   monologue)

       o   terminate the TCP session

   EXPORT
       None by default.

SEE ALSO
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.

perl v5.32.1			  2010-04-05	  Net::Analysis::TCPSession(3)

NAME | SYNOPSIS | DESCRIPTION | 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::Analysis::TCPSession&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help