Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Oh, just for the records, the version 0.09 should work on ActivePerl, and you can install the PPM from Randy Kobes' repositories. See http://cpan.uwinnipeg.ca/dist/Net-Pcap [uwinnipeg.ca]

    (I know, it's ActivePerl, not Cygwin; but Cygwin is a little tough to get right, as it partially relies on Win32 to use WinPcap.)

    --
    Close the world. txEn eht nepO
    • Hi, thanks for commenting, Sébastien. No, I am afraid there is nothing sufficiently different in v0.09 that it can work under Cygwin. It doesn't. Two things stand out in the overview of WinPcap and Net::Pcap that I've gotten over the last couple of days. One is that nowhere that I have seen is anyone claiming that WinPcap is software that has been ported to Cygwin. The clear claim is that WinPcap "can be built using cygwin", and I've established, by looking hard at the build infrastructu

      • Ok, I took some time and used a Windows system with a Cygwin to test Net::Pcap myself. I have to admit that it's far from being obvious, but all this comes from the fact that Cygwin pretends to be a Unix system (it internally defines itself as a Unix, offers the Unix API, and defines the preprocessor macro _unix). But in fact, it is really bound by the limitations of the Win32 system on which it runs. It usually works in an quite acceptable manner, but in some corner cases can lead to strange behaviour beca

        --
        Close the world. txEn eht nepO
        • Hello again, Sébastien. No good news, and no bar of chocolate, I'm afraid.

          The technique you cited above is unacceptable to me exactly as given, because the contents of /usr/include are managed by the Cygwin package management system. I under no circumstances will manually copy files into that directory as a matter of programmer / sysadmin discipline. The evils that can stem from that act are manifold, and include being unable to reproduce user errors reported by anyone who tries to duplicate any work I document or software I release. It's ok if others disagree, and it's even ok if someone wants to think of this as "anal". I'm the only one who experiences the repercussions to my system, so I don't care much about namecalling or offhand opinions.

          The results this run were obtained after doing the following steps. I viewed the contents of include/ in the WinPcap Developers Pack tree and removed anything that did not match the globbing expr "pcap*". I made the INC= argument to perl Makefile.PL point to that location (fully qualified pathname). I re-ran the same command as before and captured the output (see below). Essentially, these are the same errors as before. I am giving up, but before showing the compiler errors yet another time, I'm going to wonder aloud whether (a) you are using the same WinPcap Developer's Pack, and (b) whether you are sure that all header files normally present in the Cygwin system location (under /usr/include) are present on the machine you tested with.

          /usr/include/w32api/winsock2.h:101: error: redefinition of `struct timeval'
          /usr/include/w32api/winsock2.h:112: error: redefinition of `struct hostent'
          /usr/include/w32api/winsock2.h:120: error: redefinition of `struct linger'
          /usr/include/w32api/winsock2.h:147: error: redefinition of `struct netent'
          /usr/include/w32api/winsock2.h:153: error: redefinition of `struct servent'
          /usr/include/w32api/winsock2.h:159: error: redefinition of `struct protoent'
          /usr/include/w32api/winsock2.h:215: error: redefinition of `struct in_addr'
          /usr/include/w32api/winsock2.h:246: error: redefinition of `struct sockaddr_in'
          /usr/include/w32api/winsock2.h:328: error: redefinition of `struct sockaddr'
          /usr/include/w32api/winsock2.h:516: error: conflicting types for 'accept'
          /usr/include/sys/socket.h:29: error: previous declaration of 'accept' was here
          /usr/include/w32api/winsock2.h:516: error: conflicting types for 'accept'
          /usr/include/sys/socket.h:29: error: previous declaration of 'accept' was here
          /usr/include/w32api/winsock2.h:517: error: conflicting types for 'bind'
          /usr/include/sys/socket.h:30: error: previous declaration of 'bind' was here
          /usr/include/w32api/winsock2.h:517: error: conflicting types for 'bind'
          /usr/include/sys/socket.h:30: error: previous declaration of 'bind' was here
          /usr/include/w32api/winsock2.h:519: error: conflicting types for 'connect'
          /usr/include/sys/socket.h:31: error: previous declaration of 'connect' was here
          /usr/include/w32api/winsock2.h:519: error: conflicting types for 'connect'
          /usr/include/sys/socket.h:31: error: previous declaration of 'connect' was here
          /usr/include/w32api/winsock2.h:521: error: conflicting types for 'getpeername'
          /usr/include/sys/socket.h:32: error: previous declaration of 'getpeername' was here
          /usr/include/w32api/winsock2.h:521: error: conflicting types for 'getpeername'
          /usr/include/sys/socket.h:32: error: previous declaration of 'getpeername' was here
          /usr/include/w32api/winsock2.h:522: error: conflicting types for 'getsockname'
          /usr/include/sys/socket.h:33: error: previous declaration of 'getsockname' was here
          /usr/include/w32api/winsock2.h:522: error: conflicting types for 'getsockname'
          /usr/include/sys/socket.h:33: error: previous declaration of 'getsockname' was here
          /usr/include/w32api/winsock2.h:523: error: conflicting types for 'getsockopt'
          /usr/include/sys/socket.h:44: error: previous declaration of 'getsockopt' was here
          /usr/include/w32api/winsock2.h:523: error: conflicting types for 'getsockopt'
          /usr/include/sys/socket.h:44: error: previous declaration of 'getsockopt' was here
          /usr/include/w32api/winsock2.h:524: error: conflicting types for 'inet_addr'
          /usr/include/arpa/inet.h:22: error: previous declaration of 'inet_addr' was here
          /usr/include/w32api/winsock2.h:524: error: conflicting types for 'inet_addr'
          /usr/include/arpa/inet.h:22: error: previous declaration of 'inet_addr' was here
          /usr/include/w32api/winsock2.h:525: error: conflicting types for 'inet_ntoa'
          /usr/include/arpa/inet.h:28: error: previous declaration of 'inet_ntoa' was here
          /usr/include/w32api/winsock2.h:525: error: conflicting types for 'inet_ntoa'
          /usr/include/arpa/inet.h:28: error: previous declaration of 'inet_ntoa' was here
          /usr/include/w32api/winsock2.h:526: error: conflicting types for 'listen'
          /usr/include/sys/socket.h:34: error: previous declaration of 'listen' was here
          /usr/include/w32api/winsock2.h:526: error: conflicting types for 'listen'
          /usr/include/sys/socket.h:34: error: previous declaration of 'listen' was here
          /usr/include/w32api/winsock2.h:527: error: conflicting types for 'recv'
          /usr/include/sys/socket.h:35: error: previous declaration of 'recv' was here
          /usr/include/w32api/winsock2.h:527: error: conflicting types for 'recv'
          /usr/include/sys/socket.h:35: error: previous declaration of 'recv' was here
          /usr/include/w32api/winsock2.h:528: error: conflicting types for 'recvfrom'
          /usr/include/sys/socket.h:37: error: previous declaration of 'recvfrom' was here
          /usr/include/w32api/winsock2.h:528: error: conflicting types for 'recvfrom'
          /usr/include/sys/socket.h:37: error: previous declaration of 'recvfrom' was here
          /usr/include/w32api/winsock2.h:529: error: conflicting types for 'send'
          /usr/include/sys/socket.h:39: error: previous declaration of 'send' was here
          /usr/include/w32api/winsock2.h:529: error: conflicting types for 'send'
          /usr/include/sys/socket.h:39: error: previous declaration of 'send' was here
          /usr/include/w32api/winsock2.h:530: error: conflicting types for 'sendto'
          /usr/include/sys/socket.h:42: error: previous declaration of 'sendto' was here
          /usr/include/w32api/winsock2.h:530: error: conflicting types for 'sendto'
          /usr/include/sys/socket.h:42: error: previous declaration of 'sendto' was here
          /usr/include/w32api/winsock2.h:531: error: conflicting types for 'setsockopt'
          /usr/include/sys/socket.h:43: error: previous declaration of 'setsockopt' was here
          /usr/include/w32api/winsock2.h:531: error: conflicting types for 'setsockopt'
          /usr/include/sys/socket.h:43: error: previous declaration of 'setsockopt' was here
          /usr/include/w32api/winsock2.h:532: error: conflicting types for 'shutdown'
          /usr/include/sys/socket.h:45: error: previous declaration of 'shutdown' was here
          /usr/include/w32api/winsock2.h:532: error: conflicting types for 'shutdown'
          /usr/include/sys/socket.h:45: error: previous declaration of 'shutdown' was here
          /usr/include/w32api/winsock2.h:533: error: conflicting types for 'socket'
          /usr/include/sys/socket.h:46: error: previous declaration of 'socket' was here
          /usr/include/w32api/winsock2.h:533: error: conflicting types for 'socket'
          /usr/include/sys/socket.h:46: error: previous declaration of 'socket' was here
          /usr/include/w32api/winsock2.h:534: error: conflicting types for 'gethostbyaddr'
          /usr/include/netdb.h:139: error: previous declaration of 'gethostbyaddr' was here
          /usr/include/w32api/winsock2.h:534: error: conflicting types for 'gethostbyaddr'
          /usr/include/netdb.h:139: error: previous declaration of 'gethostbyaddr' was here
          /usr/include/w32api/winsock2.h:535: error: conflicting types for 'gethostbyname'
          /usr/include/netdb.h:140: error: previous declaration of 'gethostbyname' was here
          /usr/include/w32api/winsock2.h:535: error: conflicting types for 'gethostbyname'
          /usr/include/netdb.h:140: error: previous declaration of 'gethostbyname' was here
          /usr/include/w32api/winsock2.h:536: error: conflicting types for 'getservbyport'
          /usr/include/netdb.h:149: error: previous declaration of 'getservbyport' was here
          /usr/include/w32api/winsock2.h:536: error: conflicting types for 'getservbyport'
          /usr/include/netdb.h:149: error: previous declaration of 'getservbyport' was here
          /usr/include/w32api/winsock2.h:537: error: conflicting types for 'getservbyname'
          /usr/include/netdb.h:148: error: previous declaration of 'getservbyname' was here
          /usr/include/w32api/winsock2.h:537: error: conflicting types for 'getservbyname'
          /usr/include/netdb.h:148: error: previous declaration of 'getservbyname' was here
          /usr/include/w32api/winsock2.h:538: error: conflicting types for 'getprotobynumber'
          /usr/include/netdb.h:146: error: previous declaration of 'getprotobynumber' was here
          /usr/include/w32api/winsock2.h:538: error: conflicting types for 'getprotobynumber'
          /usr/include/netdb.h:146: error: previous declaration of 'getprotobynumber' was here
          /usr/include/w32api/winsock2.h:539: error: conflicting types for 'getprotobyname'
          /usr/include/netdb.h:145: error: previous declaration of 'getprotobyname' was here
          /usr/include/w32api/winsock2.h:539: error: conflicting types for 'getprotobyname'
          /usr/include/netdb.h:145: error: previous declaration of 'getprotobyname' was here
          /usr/include/w32api/winsock2.h:608: error: parse error before '(' token
          /usr/include/w32api/winsock2.h:608: error: parse error before '?' token
          /usr/include/w32api/winsock2.h:609: error: parse error before '(' token
          /usr/include/w32api/winsock2.h:609: error: parse error before '?' token
          /usr/include/w32api/winsock2.h:610: error: parse error before '(' token
          /usr/include/w32api/winsock2.h:610: error: parse error before '?' token
          /usr/include/w32api/winsock2.h:611: error: parse error before '(' token
          /usr/include/w32api/winsock2.h:611: error: parse error before '?' token
          /usr/include/w32api/winsock2.h:612: error: conflicting types for 'select'
          /usr/include/sys/select.h:31: error: previous declaration of 'select' was here
          /usr/include/w32api/winsock2.h:612: error: conflicting types for 'select'
          /usr/include/sys/select.h:31: error: previous declaration of 'select' was here
          /usr/include/w32api/winsock2.h:615: error: conflicting types for 'gethostname'
          /usr/include/sys/unistd.h:206: error: previous declaration of 'gethostname' was here
          /usr/include/w32api/winsock2.h:615: error: conflicting types for 'gethostname'
          /usr/include/sys/unistd.h:206: error: previous declaration of 'gethostname' was here
          /whpd/SorenSpecial/MYDOCU~1/SRCtrees/WinPcap/include/pcap-stdinc.h:53:22: bittypes.h: No such file or directory
          /whpd/SorenSpecial/MYDOCU~1/SRCtrees/WinPcap/include/pcap-stdinc.h:58:22: IP6_misc.h: No such file or directory

          The versions on my system for the 3 most relevant Cygwin pkgs are as follows:

          Cygwin Package Information
          Package Version Status
          cygwin 1.5.18-1 OK
          gcc 3.4.4-1 OK
          perl 5.8.6-4 OK

          Regards and good luck,
          Soren Andersen (somian)