libnids port - network monitoring lib with TCP/IP reassembly. ok turans@

This commit is contained in:
dugsong 1999-11-13 20:22:17 +00:00
parent 65a9230802
commit aadedd149b
9 changed files with 106 additions and 0 deletions

28
net/libnids/Makefile Normal file
View File

@ -0,0 +1,28 @@
# Makefile for: libnids
# Version required: 1.12
# Date created: Halloween 1999
# Whom: dugsong@monkey.org
#
# $OpenBSD: Makefile,v 1.1.1.1 1999/11/13 20:22:17 dugsong Exp $
DISTNAME= libnids-1.12
CATEGORIES= net
MASTER_SITES= http://www.packetfactory.net/libnids/dist/
MAINTAINER= dugsong@monkey.org
BUILD_DEPENDS= ${PREFIX}/lib/libnet.a:${PORTSDIR}/net/libnet
NO_CONFIGURE= yes
do-install:
${INSTALL_DATA} ${WRKSRC}/src/libnids.a ${PREFIX}/lib
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/libnids
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/libnids
${INSTALL_DATA} ${WRKSRC}/MISC ${PREFIX}/share/doc/libnids
${INSTALL_DATA} ${WRKSRC}/doc/API ${PREFIX}/share/doc/libnids
${INSTALL_DATA} ${WRKSRC}/doc/TESTS ${PREFIX}/share/doc/libnids
.include <bsd.port.mk>

3
net/libnids/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (libnids-1.12.tar.gz) = 1d5eb8ef14c2729ab1871599ac05734f
RMD160 (libnids-1.12.tar.gz) = dd20d7b8965997dd4a0d4a942704911d826d149f
SHA1 (libnids-1.12.tar.gz) = 109bde08035af32d495560944d50d4fc7a823a53

View File

@ -0,0 +1,8 @@
--- Makefile.orig Thu Nov 4 12:04:33 1999
+++ Makefile Thu Nov 4 12:04:45 1999
@@ -1,4 +1,4 @@
-all: libpcap libnet libnids
+all: libnids
libpcap:
(cd libpcap-0.4; ./configure; make)

View File

@ -0,0 +1,32 @@
--- src/Makefile.orig Thu Nov 4 12:06:14 1999
+++ src/Makefile Thu Nov 4 12:18:24 1999
@@ -1,23 +1,14 @@
-PCAP_INCLUDE_DIR=../libpcap-0.4
-LIBNET_INCLUDE_DIR=../Libnet-0.99/include
-PCAP_LIB_DIR=../libpcap-0.4
-LIBNET_LIB_DIR=../Libnet-0.99/lib
-LIBNET_DIR=../Libnet-0.99
+PREFIX?=/usr/local
CC=gcc
-CFLAGS= -I$(PCAP_INCLUDE_DIR) -I$(LIBNET_INCLUDE_DIR) -g -D_BSD_SOURCE -O2 -Wall -DCOMPILING_LIBNIDS
+CFLAGS+= -I$(PREFIX)/include -D_BSD_SOURCE -DCOMPILING_LIBNIDS `libnet-config --defines`
SRCS= util.c libnids.c tcp.c killtcp.c ip_fragment.c ip_options.c checksum.c scan.c
OBJS = util.o libnids.o tcp.o killtcp.o ip_fragment.o ip_options.o checksum.o scan.o
-all: libnids.so libnids.a
-libnids.so: $(OBJS)
- gcc -shared -g -L$(PCAP_LIB_DIR) -L$(LIBNET_LIB_DIR) -o libnids.so $(OBJS) -lpcap -lnet
-# strip -x libnids.so
+all: libnids.a
+
libnids.a: $(OBJS)
ar -cr $@ $(OBJS)
ranlib $@
-#*bsd's make lacks $(shell ...)
-killtcp.o: killtcp.c
- sh -c '$(CC) `$(LIBNET_DIR)/libnet-config --cflags --defines|tr -d "\n"` \
-$(CFLAGS) -c killtcp.c'
+
clean:
- rm -f *.o libnids.a libnids.so *~
+ rm -f *.o libnids.a libnids.so *~

View File

@ -0,0 +1,11 @@
--- src/checksum.c.orig Fri Sep 10 09:43:37 1999
+++ src/checksum.c Thu Nov 4 12:19:30 1999
@@ -222,7 +222,7 @@
unsigned short ip_compute_csum(unsigned short * addr,int len)
{
-return ip_check_ext(adr,len,0);
+return ip_check_ext(addr,len,0);
}
struct psuedo_hdr

1
net/libnids/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
network monitoring library with TCP/IP reassembly

12
net/libnids/pkg/DESCR Normal file
View File

@ -0,0 +1,12 @@
from Nergal's README:
Libnids is a library that provides a functionality of one of NIDS
(Network Intrusion Detection System) components, namely E-component. It means
that libnids code watches all local network traffic, cooks received datagrams
a bit (quite a bit ;)), and provides convinient information on them to
analyzing modules of NIDS. Libnids performs:
a) assembly of TCP segments into TCP streams
b) IP defragmentation
c) TCP port scan detection
-d.

6
net/libnids/pkg/PLIST Normal file
View File

@ -0,0 +1,6 @@
lib/libnids.a
share/doc/libnids/API
share/doc/libnids/MISC
share/doc/libnids/README
share/doc/libnids/TESTS
@dirrm share/doc/libnids

5
net/libnids/pkg/SECURITY Normal file
View File

@ -0,0 +1,5 @@
this code has not been audited for buffer overflows, etc.
any more than the Linux kernel has. caveat user.
-d.