in reply to Problem Sending an IPv6 Packet with Net::Packet Module
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem Sending an IPv6 Packet with Net::Packet Module
by bpa (Novice) on Aug 16, 2008 at 23:59 UTC | |
I do thank you for your suggestion because when I looked into the ip6-syn-send.pl sample script to see why it was not getting any error message, I saw that it was creating a layer 2 eth object explicitly and giving it a destination mac address. Once I created this object in my code, and included it when creating the frame object, that got rid of my error. However, like I said I still cannot see any IPv6 frames traversing the wire despite the lack of error messages. Here is my updated code:
To send an IPv4 tcp packet:
To send an IPv6 tcp packet:
Obviously change the source and destination addresses to something relevant to your setup and only have to use sudo on Ubuntu. Thanks for any help. | [reply] [d/l] [select] |
by Anonymous Monk on Aug 17, 2008 at 03:34 UTC | |
A Guide to Installing Modules To install this module type the following: perl Makefile.PL make make test make installhttp://search.cpan.org/src/GOMOR/Net-Packet-3.26/test-env.sh [TXT]09-d2-eth-ipv6-tcp.t 19-Apr-2008 11:37 1.0K [TXT]10-d2-eth-ipv6-tcp-opt.t 19-Apr-2008 11:37 1.0K [TXT]11-d2-eth-ipv6-tcp-opt-l7.t 19-Apr-2008 11:37 1.1K [TXT]12-d2-eth-ipv6-udp.t 19-Apr-2008 11:37 1.0K [TXT]13-d2-eth-ipv6-udp-l7.t 19-Apr-2008 11:37 1.1K | [reply] |
by bpa (Novice) on Aug 23, 2008 at 02:52 UTC | |
Basically, I had to explicitly set the global $Env object's device property to the interface I wanted to use (eth0, wlan0, etc). What I had been doing was creating a separate "New" $env object that I thought would be automaticall used when created, as per the documentation. As I stated before, IPv4 packets had no problem understanding this, and would send just fine. But for IPv6 to work I had to actually start using that global $Env object. From my experience with IPv6 so far, everything is heavily reliant on the user specifying the interface to use. For instance, the ping6 command will not work unless an interface is explicitly specified. Thanks for all the help. | [reply] [d/l] |