Sponsored Content
Full Discussion: Compiling Pcap.c
Top Forums Programming Compiling Pcap.c Post 13529 by TioTony on Friday 18th of January 2002 11:51:03 AM
Old 01-18-2002
Compiling Pcap.c

I don't know if this is the correct forum to post this but hopefully someone can atleast point me in the right direction if they can't help me.

I am trying to install the Net::Pcap module for perl from Tim Potter version .04. I have installed gcc 2.95.3 on my Solaris 8 box. I am sure it's just a config/option issue with gcc. When I run:

perl Makefile.PL

I get this:

Note (probably harmless): No library found for -lpcap
Writing Makefile for Net::Pcap

If I manually try to compile Pcap.c using this (I know there are more options I should use but I am not hugely familiar with gcc):

gcc Pcap.c

I get this:

Pcap.xs:18: EXTERN.h: No such file or directory
In file included from Pcap.xs:19:
perl.h:27: config.h: No such file or directory
In file included from Pcap.xs:19:
perl.h:441: embed.h: No such file or directory
In file included from Pcap.xs:19:
perl.h:1664: handy.h: No such file or directory
perl.h:1828: unixish.h: No such file or directory
perl.h:2135: iperlsys.h: No such file or directory
In file included from Pcap.xs:19:
perl.h:2138: sv.h: No such file or directory
perl.h:2139: util.h: No such file or directory
In file included from /usr/include/curses.h:23,
from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/curses.h:5,
from /usr/include/form.h:13,
from perl.h:2140,
from Pcap.xs:19:
/usr/include/widec.h:38: warning: `getwc' redefined
/usr/include/iso/wchar_iso.h:337: warning: this is the location of the previous definition
/usr/include/widec.h:39: warning: `putwc' redefined
/usr/include/iso/wchar_iso.h:340: warning: this is the location of the previous definition
/usr/include/widec.h:40: warning: `getwchar' redefined
/usr/include/iso/wchar_iso.h:338: warning: this is the location of the previous definition
/usr/include/widec.h:41: warning: `putwchar' redefined
/usr/include/iso/wchar_iso.h:341: warning: this is the location of the previous definition
In file included from Pcap.xs:19:
perl.h:2141: gv.h: No such file or directory
perl.h:2142: cv.h: No such file or directory
perl.h:2143: opnames.h: No such file or directory
perl.h:2144: op.h: No such file or directory
perl.h:2145: cop.h: No such file or directory
perl.h:2146: av.h: No such file or directory
perl.h:2147: hv.h: No such file or directory
perl.h:2148: mg.h: No such file or directory
perl.h:2149: scope.h: No such file or directory
perl.h:2150: warnings.h: No such file or directory
perl.h:2151: utf8.h: No such file or directory
perl.h:2152: sharedsv.h: No such file or directory
perl.h:3058: perly.h: No such file or directory
In file included from Pcap.xs:19:
perl.h:3256: pp.h: No such file or directory
In file included from Pcap.xs:19:
perl.h:3279: opcode.h: No such file or directory
perl.h:3284: embedvar.h: No such file or directory
perl.h:3299: intrpvar.h: No such file or directory
perl.h:3301: thrdvar.h: No such file or directory
perl.h:3314: perlvars.h: No such file or directory
perl.h:4077: patchlevel.h: No such file or directory
In file included from Pcap.xs:20:
XSUB.h:255: perlapi.h: No such file or directory


All the .h files are in my /usr/perl5/5.00503/sun4-solaris/CORE directory.

The README for Pcap mentions they successfully tested on Solaris 2.6 with gcc 2.8.1.

Any help is appreciated.
TioTonySmilie
 

10 More Discussions You Might Find Interesting

1. Programming

pcap.h

I cant use pcap.h include file. How can I do so? :confused: (8 Replies)
Discussion started by: Pervez Sajjad
8 Replies

2. Programming

Filtering paquets with pcap.h

Hello everybody!! I am currently doing my intership and I need some tips for Pcap.h. I search some tips tp filter my paquets in a C program with the Pcap.h librairy. The onlys thing I have found is thaht I can filter low level protocol with their name like (tcp/udp..). But for the higher... (3 Replies)
Discussion started by: danathane
3 Replies

3. Programming

Pcap.h Sniffing

Can someone please help me figure out how to use pcap.h to sniff packets between only 2 computers whose mac addresses are know? Thanks (0 Replies)
Discussion started by: papabearcares
0 Replies

4. Shell Programming and Scripting

Pcap.h Sniffing

Can someone please help me figure out how to use pcap.h to sniff packets between only 2 computers whose mac addresses are know? Thanks (0 Replies)
Discussion started by: papabearcares
0 Replies

5. UNIX for Dummies Questions & Answers

Filtering pcap files

Hi, I am new at UNIX and programing in general and only have a basic knowledge of C++. I am helping out with some research at a college and was given the task to sort through captured packets via IP addresses. I was wondering if anyone could help me with writing a code which filters through pcap... (1 Reply)
Discussion started by: hershey101
1 Replies

6. Programming

searching through pcap files

Hi, I am new at UNIX and programing in general and only have a basic knowledge of C++. I am helping out with some research at a college and was given the task to sort through captured packets via IP addresses. I was wondering if anyone could help me with writing a code which filters through pcap... (4 Replies)
Discussion started by: hershey101
4 Replies

7. Programming

Packet capturing using pcap

Hi, i am using a linux CentOS machine. I have 2 real network interfaces eth0, eth1 and 2 virtual interfaces tap0 and tap1. I am using PCAP library to capture the packets on theses interfaces. If i specify the interface as "any", i cannot find a way to know from which interface the packet... (1 Reply)
Discussion started by: rahulnitk2004
1 Replies

8. Shell Programming and Scripting

Sampling pcap file

Hi, I have a standard pcap file created using tcpdump. The file looks like 06:49:36.487629 IP 202.1.175.252 > 71.126.222.64: ICMP echo request, id 52765, seq 1280, length 40 06:49:36.489552 IP 192.120.148.227 > 71.126.222.64: ICMP echo request, id 512, seq 1280, length 40 06:49:36.491812 IP... (8 Replies)
Discussion started by: sajal.bhatia
8 Replies

9. Programming

Ascii vs Pcap tracing

Dear All, Which is better to use ? Ascii or Pcap tracing ? Or are they complementary ? (1 Reply)
Discussion started by: knowledgeSeeker
1 Replies

10. Programming

PCAP -> PFRING

Hi I have a program that captures packets with the libpcap library by calling the pcap-functions, e.g. pcap_next(...). I would like to use PF_RING for the program and therefore I would have to adjust the calling functions to pfring_open(...) pfring_recv(...) I'm pretty knew in network... (0 Replies)
Discussion started by: Freaky123
0 Replies
FindBin(3pm)						 Perl Programmers Reference Guide					      FindBin(3pm)

NAME
FindBin - Locate directory of original perl script SYNOPSIS
use FindBin; use lib "$FindBin::Bin/../lib"; or use FindBin qw($Bin); use lib "$Bin/../lib"; DESCRIPTION
Locates the full path to the script bin directory to allow the use of paths relative to the bin directory. This allows a user to setup a directory tree for some software with directories "<root>/bin" and "<root>/lib", and then the above example will allow the use of modules in the lib directory without knowing where the software tree is installed. If perl is invoked using the -e option or the perl script is read from "STDIN" then FindBin sets both $Bin and $RealBin to the current directory. EXPORTABLE VARIABLES
$Bin - path to bin directory from where script was invoked $Script - basename of script from which perl was invoked $RealBin - $Bin with all links resolved $RealScript - $Script with all links resolved KNOWN ISSUES
If there are two modules using "FindBin" from different directories under the same interpreter, this won't work. Since "FindBin" uses a "BEGIN" block, it'll be executed only once, and only the first caller will get it right. This is a problem under mod_perl and other persistent Perl environments, where you shouldn't use this module. Which also means that you should avoid using "FindBin" in modules that you plan to put on CPAN. To make sure that "FindBin" will work is to call the "again" function: use FindBin; FindBin::again(); # or FindBin->again; In former versions of FindBin there was no "again" function. The workaround was to force the "BEGIN" block to be executed again: delete $INC{'FindBin.pm'}; require FindBin; AUTHORS
FindBin is supported as part of the core perl distribution. Please send bug reports to <perlbug@perl.org> using the perlbug program included with perl. Graham Barr <gbarr@pobox.com> Nick Ing-Simmons <nik@tiuk.ti.com> COPYRIGHT
Copyright (c) 1995 Graham Barr & Nick Ing-Simmons. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 FindBin(3pm)
All times are GMT -4. The time now is 01:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy