Click here to get back home

ANNOUNCE: Net::Packet 2.00 released

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
ANNOUNCE: Net::Packet 2.00 released GomoR 01-28-2005
Posted by GomoR on January 28, 2005, 12:30 am
Please log in for more thread options
Changes since 1.28:

- major release, backward compatibility broken
- full documentation
- a battery of tests
- new layers:
o Layer2/SLL
o Layer2/RAW
o Layer2/NULL
o Layer3/IPv6
- sending frames at DescL4 now fully works
- huge speed improvements
- some memory usage improvements
- many many bugfixes


README:

Net::Packet version 2.00
====================

This module is a unified framework to craft, send and receive packets
at layers 2, 3, 4 and 7.

Basically, you forge each layer of a frame (Net::Packet::IPv4 for
layer 3, Net::Packet::TCP for layer 4 ; for example), and pack all
of this into a Net::Packet::Frame object. Then, you can send the frame
to the network, and receive it easily, since the response is
automatically searched for and matched against the request.

If you want some layer 2, 3 or 4 protocol encoding/decoding to be added,
just ask, and give a corresponding .pcap file ;)


EXAMPLE:

# Load main module, it also initializes a Net::Packet::Env object
use Net::Packet qw($Env);

# Build IPv4 header
use Net::Packet::IPv4;
my $ip = Net::Packet::IPv4->new(dst => '192.168.0.1');

# Build TCP header
use Net::Packet::TCP;
my $tcp = Net::Packet::TCP->new(dst => 22);

# Assemble frame
# It will also open a Net::Packet::DescL3 descriptor
# and a Net::Packet::Dump object
use Net::Packet::Frame;
my $frame = Net::Packet::Frame->new(l3 => $ip, l4 => $tcp);

$frame->send;

# Print the reply just when it has been received
until ($Env->dump->timeout) {
if ($frame->recv) {
print $frame->reply->l3, "n";
print $frame->reply->l4, "n";
last;
}
}

--
^ ___ ___ FreeBSD Network - http://www.GomoR.org/ <-+
| / __ |__/ Security Engineer, searching for work |
| __/ | ---[ zsh$ alias psed='perl -pe ' ]--- |
+--> Net::Packet <=> http://search.cpan.org/~gomor/ <--+


Similar ThreadsPosted
ANNOUNCE: Archive::Zip 1.13 released August 23, 2004, 4:49 pm
ANNOUNCE: Win32::GUI V1.03 Released November 22, 2005, 10:27 pm
ANNOUNCE: AFS Perl API 2.2.3 released February 17, 2005, 11:20 am
ANNOUNCE: AFS Perl API 2.2.3 released February 17, 2005, 11:19 am
ANNOUNCE: AFS Perl API 2.4.0 released February 20, 2006, 7:18 am
ANNOUNCE: AFS Perl API 2.4.0 released February 20, 2006, 7:20 am
ANNOUNCE: CGI::ContactForm 1.30 released to CPAN March 4, 2005, 2:41 am
[RDBO] ANNOUNCE: Rose::DB::Object 0.71 released April 14, 2006, 3:29 pm
[RDBO] ANNOUNCE: Rose::DB::Object 0.72 released April 19, 2006, 9:03 am
[RDBO] ANNOUNCE: Rose::DB::Object 0.722 released April 27, 2006, 8:25 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap