OK - I have fixed this error. The actual issue I want to solve is a core
dump. The following occurs....

I have recently written 3 scripts to...
script 1. write raw ICMP packets to an interface
script 2. sniff for them
script 3. act on non-response/response/RTT etc etc (i.e. the boss)

The sniffer script uses the following modules....

Net::Pcap;
NetPacket::Ethernet;
NetPacket::IP;
IPC::Shareable;

The scripts work well on my Gentoo distribution but on Solaris I get a
core dump when I try to use ..

        $src_IP = NetPacket::IP->decode($rawpkt)->{src_ip};     

The error actually comes from tie-ing the shared memory at the beginning
of the script. If I comment out the tie $var declarations,
NetPacket::IP->decode($rawpkt)->{src_ip} works well.

So it seems to be a clash between IPC::Shareable and NetPacket::IP.

Anyone seen this before.

(Apologies for the earlier 'p is not of type pcap_tPtr' confusion. I had
two weeks off and my brain is mush!!)

Thanks

Andy

On Mon, 2003-09-15 at 14:31, Patrick Mulvany wrote:
> On Mon, Sep 15, 2003 at 12:04:21PM +0100, Andy Ford wrote:
> > I have a perl script that works perfectly on my Gentoo Linux distro but
> > fails on my Solaris 2.8 box. I am running v5.8.0 on both platforms and I
> > have absolutely no clue on how to get it working on solaris. 
> > 
> > Its actually a collection of scripts that use the following CPAN
> > modules...
> > 
> > IPC::Shareable
> > Net::Pcap
> > NetPacket::Ethernet
> > NetPacket::IP
> > Net::RawIP
> > 
> > The error I have is the following...
> > 
> > p is not of type pcap_tPtr at ./icmp_sniffer line 67.
> > 
> > Line 67 & 68 of icmp_sniffer is ...
> > die "unable to compile $pktfilter\n"
> > if (Net::Pcap::compile($pcap_t ,\$compprog,$pktfilter,0,$netmask)) ;
> > 
> > This script works perfectly on my Linux box but not Solaris.
> > 
> > Anyone offering some useful/helpful pointers would be much appreciated
> > 
> > Thanks
> > 
> > Andy
> > 
> >
> 
> >From the Net::RawIP Readme :-
> 
> NOTE: Ethernet related methods currently implemented only on Linux and *BSD!
> Help with port eth.c to other platforms is very appreciated.
> 
> This would not be related would it?
> 
> Paddy
>  


Reply via email to