Ernesto81 has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I would like to set IPOPT_LSRR with one hop (code sample with one hop) :
my $_hop = inet_aton $hop; my $_end = inet_aton $end; my $_header = pack "C4", &NOP, &LSRR, $length, $ptr; my $ipOpt = $_header . $_hop . $_end; setsockopt S, IPPROTO_IP, IP_OPTIONS, $ipOpt;
This is not working properly. The connection is successfully established, but cannot see the IP options with wireshark (and it is not performing LSRR).
Do you have any suggestion, please?
Since inet_aton return a "32 bits" in_addr C like opaque string (or at least, this is what I am supposing), pack is not being used, instead hops are just appended, so, how could I invoke getsockopt and, using unpack, print out the different hops back?
Thanks in advance and kind regards,
Ernesto
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: loose source and route record
by Ernesto81 (Novice) on Feb 01, 2011 at 02:52 UTC | |
|
Re: loose source and route record
by Anonymous Monk on Jan 31, 2011 at 13:02 UTC | |
by Ernesto81 (Novice) on Jan 31, 2011 at 16:11 UTC | |
by Anonymous Monk on Jan 31, 2011 at 16:54 UTC | |
by Ernesto81 (Novice) on Jan 31, 2011 at 19:41 UTC |