Yep, I did exactly that, I got the 1.5 Socket version from CPAN, and installed *that*.

Yes, I know that I downgraded Socket because of that, but I was ready to take that chance.

I added

if (strEQ(name, "SO_ORIGINAL_DST")) #ifdef SO_ORIGINAL_DST return SO_ORIGINAL_DST; #else goto not_there; #endif
in Socket.xs ,and also put the SO_ORIGINAL_DST tag in Socket.pm

I compiled it and installed it. It installed it in /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Socket/Socket.so

Now, when I run:

my $destination_address = $server_socket->sockopt(SO_ORIGINAL_DST); print STDERR "Error: $!\n"; print STDERR "Requested destination address: $destination_address\n";
I get "Your vendor has not defined Socket macro SO_ORIGINAL_DST, used at ./proxy.pl line 14".

So the error appears as soon as $server_socket->sockopt() gets called, because it doesn't even reach the "Error: " output.


In reply to RE: (tye)Re: How do I *add* a socket option ? by Q-Bert
in thread How do I *add* a socket option ? by Q-Bert

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.