Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Apr 2002

    Compiling under Cygwin a Libpcap based program

    No. It's not directly related to a security issue, but as it is a subject between Windows and Linux and as it is a real newbie question, I post it here.

    I am familiar with Cygwin and I use it regularly in order to replace my standard shell under Windows. But I have never tried to compile a Linux program with it (even if it is normally its major purpose).
    It's what I'm trying to do currently: Compiling and installing Hping2 on Windows throught it. Yeah, I know, such a program will probably not work, but I want to try. And as some of you have more than probably already guessed, it needs lipcap to be compiled (fist error with pcap.h). I have WinPcap on my windows system but I don't know how I could use it to replace libpcap during the compilation.

    Do you know a way to adapt the compilation to WinPcap, or do I need to (try hopelessly to) install the Libpcap under Cygwin?

    Thanks to answer.

    Life is boring. Play NetHack... --more--

  2. #2
    Senior Member
    Join Date
    Jan 2003
    I've been working on porting hping2 for a while now. However... I am not a programmer so I have been having issues.

    I did manage to get it completely compiled. I grabbed the WinPCAP DK. I dumped the include directory in /usr/include and the library's in /pcap/. I modified the Makefile to include -L/pcap/ and changed -l from pcap to wpcap. There were a few lines in main.c that also had to be modified and one function that had to be removed (get_if_name). The problem however comes that interfaces operate differently on the different operating systems, so all I ended up doing what getting a stack dump. However it would display the help screen and everything...

    If anyone knows how to reference a interface in Windows from the prompt I will attempt to recompile and see if it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts