Snort mailing list archives

RE: Compiling snort on Win32


From: "Michael Steele" <michaels () silicondefense com>
Date: Fri, 31 May 2002 14:50:46 -0700

Chris,

I'm assuming that the warnings mean nothing and fixing it for a clean
executable is going to produce the same snort.exe?

Will the code below work with 1.8.7?

The log file inclusion has been a must for a multitude of updates.

Michael Steele | System Engineer / Support Technician     
mailto:michaels () silicondefense com
Silicon Defense: IDS solutions - http://www.silicondefense.com
Snort: Open Source Network IDS - http://www.snort.org

-----Original Message-----
From: snort-users-admin () lists sourceforge net
[mailto:snort-users-admin () lists sourceforge net] On Behalf Of Chris Reid
Sent: May 31, 2002 2:18 PM
To: Ian Macdonald; snort-users () lists sourceforge net
Subject: Re: [Snort-users] Compiling snort on Win32

Ian,

I talked with Chris Green about this yesterday.  I had already planned
on
providing him with a new Visual Studio project for Snort 1.8.6 tonight
(Friday).

Currently, there should be hundreds of warnings, but only one link
error.
The link error should indicate that one of the "log" source files is
missing.  As part of my Visual Studio project update tonight, I was also
going to give Chris some diff's to snort.h (already found in the 1.9
source)
which reduce the warnings down to about 24.

If you just can't wait  ;)  here is how you can compile a clean 1.8.6
executable:

*  Open snort.h

*  Locate the include of <math.h>, and change it to:

    #ifdef WIN32
        #pragma warning( disable : 4028 )
    #endif /* WIN32 */
    #include <math.h>
    #ifdef WIN32
        #pragma warning( default : 4028 )
    #endif /* WIN32 */

*  Further down in snort.h, locate:

    /* This is basically everything needed to make snort work under
WIN32. -- Mike Davis */
    #ifdef WIN32
        #include <winsock.h>
        #include <windows.h>
        #include <io.h>
        #include <sys/timeb.h>
        #include <process.h>
        #include <direct.h>
        #include <getopt.h>
        typedef unsigned char  u_int8_t;
        typedef unsigned short u_int16_t;
        typedef unsigned int   u_int32_t;
        typedef int            pid_t;

    and change it to:

    /* This is basically everything needed to make snort work under
WIN32. -- Mike Davis */
    #ifdef WIN32
        #include <winsock.h>
        #include <windows.h>
        #pragma warning( disable : 4028 )
        #include <io.h>
        #include <process.h>
        #pragma warning( default : 4028 )
        #include <sys/timeb.h>
        #include <direct.h>
        #include <getopt.h>
        typedef unsigned char  u_int8_t;
        typedef unsigned short u_int16_t;
        typedef unsigned int   u_int32_t;
        typedef int            pid_t;

*  Compile.  This should still generate the link error.  Look at the
error
to figure out which "log" source file is missing.  Add this file to your
Visual Studio project, and compile again.

Chris Reid


----- Original Message -----
From: "Ian Macdonald" <secsnort () dirk demon co uk>
To: <snort-users () lists sourceforge net>
Sent: Friday, May 31, 2002 3:56 PM
Subject: [Snort-users] Compiling snort on Win32



I have a couple changes I would like to make to the snort.exe binary,
so I
thought I would download the 1.8.6 and see if I can compile it myself.

Can anyone point me to a document describing how to compile on
windows? I
found the snort.dsp and snort.dsw files in win32/win32-prj an started
up
Visual Studio 6, but I get alot of errors when I try to do a build

What are the prerequisites I need before being able to compile snort
on
w32?

Thanks


Ian


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users




_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users




_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: