[30228] in Perl-Users-Digest
Perl-Users Digest, Issue: 1471 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 25 16:11:59 2008
Date: Fri, 25 Apr 2008 13:11:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 25 Apr 2008 Volume: 11 Number: 1471
Today's topics:
A noob playing with: Divert sockets, Linux and Perl. vivek.m1234@yahoo.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 24 Apr 2008 05:56:37 -0700 (PDT)
From: vivek.m1234@yahoo.com
Subject: A noob playing with: Divert sockets, Linux and Perl.
Message-Id: <ef959c90-6b88-4b9a-8887-64bd29b603a7@u12g2000prd.googlegroups.com>
Hi, I use Debian Etch. Since Divert sockets is not available on the
2.6.18-5-686 kernel, i compiled a 2.6.12.3 kernel and iptables 1.3.1,
with the required divert socket patches and installed it.
I then used the C code from here (scroll to the bottom):
http://sourceforge.net/docman/display_doc.php?docid=15319&group_id=63197
with the following iptables rule:
iptables -A INPUT -p ICMP -j DIVERT --div-port xxx
to test and see if divert sockets was working.
It worked great.
My problem is that the Perl Net::Divert module refused to work with
the sample code in perldoc Net::Divert. I'm sure it's not the iptables
rule modified for -p tcp that's causing the problem because I tested
with the C code.
The error i got in perl was:
Can't call method "autoflush" on an undefined value at /usr/local/
share/perl/5.8.8/Net/Divert.pm line 115.
So i checked the Divert.pm module and commented line 115 because
perldoc IO::Socket::INET says:
"As of VERSION 1.18 all IO::Socket objects have autoflush turned on
by default. This was not the case with earlier releases."
After the commenting out, my script runs without any errors but it
does absolutely nothing. It just sits...
Could someone suggest what I could do to resolve this problem? Seems
to me that the 'divert' parameter being passed in IO::Socket::INET is
being ignored??
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 1471
***************************************