1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
diff -urN snort-2.3.0.orig/configure.in snort-2.3.0/configure.in
--- snort-2.3.0.orig/configure.in 2005-01-27 10:11:34.000000000 -0500
+++ snort-2.3.0/configure.in 2005-01-27 10:36:24.727932095 -0500
@@ -686,20 +686,20 @@
fi
LIBNET_INC_DIR=""
- AC_MSG_CHECKING("for libnet.h version 1.0.x")
+ AC_MSG_CHECKING("for libnet-1.0.h version 1.0.x")
libnet_dir="/usr/include /usr/local/include"
for i in $libnet_dir; do
- if test -r $i/libnet.h; then
+ if test -r $i/libnet-1.0.h; then
LIBNET_INC_DIR=$i
fi
done
if test "$LIBNET_INC_DIR" != ""; then
- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0 >/dev/null"; then
- FAIL_MESSAGE("libnet 1.0.x (libnet.h)", $tmp)
+ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0 >/dev/null"; then
+ FAIL_MESSAGE("libnet 1.0.x (libnet-1.0.h)", $tmp)
fi
- CFLAGS="${CFLAGS} `libnet-config --defines` `libnet-config --cflags`"
- LIBS="${LIBS} `libnet-config --libs`"
+ CFLAGS="${CFLAGS} `libnet-1.0-config --defines` `libnet-1.0-config --cflags`"
+ LIBS="${LIBS} `libnet-1.0-config --libs`"
CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}"
AC_MSG_RESULT($i)
else
@@ -711,26 +711,26 @@
AC_ARG_ENABLE(flexresp,
[ --enable-flexresp Flexible Responses on hostile connection attempts],
-[ CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-config --defines --cflags`" LDFLAGS="${LDFLAGS} `libnet-config --libs`"],)
+[ CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-1.0-config --defines --cflags`" LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`"],)
if test "$enable_flexresp" != "no" -a "$enable_flexresp" = "yes"; then
- if test `libnet-config --cflags | wc -c` = "1"; then
+ if test `libnet-1.0-config --cflags | wc -c` = "1"; then
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include"
LIBNET_CONFIG_BROKEN_CFLAGS=yes
fi
- if test `libnet-config --libs | wc -c` = "1"; then
- AC_MSG_WARN(libnet-config --libs is broken on your system. If you)
+ if test `libnet-1.0-config --libs | wc -c` = "1"; then
+ AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you)
AC_MSG_WARN(are using a precompiled package please notify the)
AC_MSG_WARN(maintainer.)
LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib"
- LIBS="${LIBS} -lnet"
+ LIBS="${LIBS} -lnet-1.0"
fi
LNET=""
- AC_CHECK_HEADERS(libnet.h,, LNET="no")
+ AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no")
if test "$LNET" = "no"; then
echo
echo " ERROR! Libnet header not found, go get it from"
@@ -748,33 +748,33 @@
libnet_dir="/usr/include /usr/local/include /sw/include"
fi
else
- libnet_dir=`libnet-config --cflags | cut -dI -f2`
+ libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
fi
LIBNET_INC_DIR=""
for i in $libnet_dir; do
- if test -r $i/libnet.h; then
+ if test -r $i/libnet-1.0.h; then
LIBNET_INC_DIR=$i
fi
done
if test "$LIBNET_INC_DIR" != ""; then
- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
+ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
AC_MSG_RESULT(no)
echo
echo " ERROR! Snort with --enable-flexresp will *only* work with"
echo " libnet version 1.0.2a, go get it from"
echo " http://www.packetfactory.net/projects/libnet/"
- FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR)
+ FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR)
fi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
- FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir)
+ FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir)
fi
LNET=""
- AC_CHECK_LIB(net, libnet_build_ip,, LNET="no")
+ AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no")
if test "$LNET" = "no"; then
echo
echo " ERROR! Libnet library not found, go get it from"
diff -urN snort-2.3.0.orig/src/detection-plugins/sp_react.c snort-2.3.0/src/detection-plugins/sp_react.c
--- snort-2.3.0.orig/src/detection-plugins/sp_react.c 2005-01-27 10:11:34.000000000 -0500
+++ snort-2.3.0/src/detection-plugins/sp_react.c 2005-01-27 10:36:24.733931106 -0500
@@ -57,7 +57,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include <libnet.h>
+#include <libnet-1.0.h>
#include "rules.h"
#include "decode.h"
diff -urN snort-2.3.0.orig/src/detection-plugins/sp_respond.c snort-2.3.0/src/detection-plugins/sp_respond.c
--- snort-2.3.0.orig/src/detection-plugins/sp_respond.c 2005-01-27 10:11:34.000000000 -0500
+++ snort-2.3.0/src/detection-plugins/sp_respond.c 2005-01-27 10:36:24.734930941 -0500
@@ -34,7 +34,7 @@
#ifdef ENABLE_RESPONSE
-#include <libnet.h>
+#include <libnet-1.0.h>
#include "decode.h"
#include "rules.h"
diff -urN snort-2.3.0.orig/src/inline.c snort-2.3.0/src/inline.c
--- snort-2.3.0.orig/src/inline.c 2005-01-27 10:11:34.000000000 -0500
+++ snort-2.3.0/src/inline.c 2005-01-27 10:37:00.735994060 -0500
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <string.h>
#include <pcap.h>
-#include <libnet.h>
+#include <libnet-1.0.h>
#include "decode.h"
#include "inline.h"
|