diff --git a/net-mgmt/docsis/Makefile b/net-mgmt/docsis/Makefile new file mode 100644 index 000000000000..346afa65ffa5 --- /dev/null +++ b/net-mgmt/docsis/Makefile @@ -0,0 +1,28 @@ +# New ports collection makefile for: docsis +# Date created: Jul 5, 2002 +# Whom: James Flemer +# +# $FreeBSD$ +# + +PORTNAME= docsis +PORTVERSION= 0.7.5 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTNAME= ${PORTNAME}-${PORTVERSION}-RELEASE +EXTRACT_SUFX= .tgz + +MAINTAINER= jflemer@acm.jhu.edu + +LIB_DEPENDS= snmp.4:${PORTSDIR}/net/net-snmp4 + +USE_OPENSSL= yes +USE_BISON= yes + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/docsis ${PREFIX}/bin + @${MKDIR} ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} + +.include diff --git a/net-mgmt/docsis/distinfo b/net-mgmt/docsis/distinfo new file mode 100644 index 000000000000..19d2a9fd1a38 --- /dev/null +++ b/net-mgmt/docsis/distinfo @@ -0,0 +1 @@ +MD5 (docsis-0.7.5-RELEASE.tgz) = 9cd8250b2c7e9f764db534e5f7aaca7d diff --git a/net-mgmt/docsis/files/patch-Makefile b/net-mgmt/docsis/files/patch-Makefile new file mode 100644 index 000000000000..b57482e32afc --- /dev/null +++ b/net-mgmt/docsis/files/patch-Makefile @@ -0,0 +1,20 @@ +--- Makefile.orig Wed Feb 13 14:09:52 2002 ++++ Makefile Thu Jul 18 00:11:49 2002 +@@ -1,4 +1,3 @@ +-CC = gcc + DEFS = -DYY_NO_UNPUT -DDEBUG + # + # We assume ucd-snmp is installed in /opt/ucd-snmp-4.2. If not, replace with +@@ -7,8 +6,10 @@ + # -lcrypto is OpenSSL. + # + # CFLAGS = -g -Wall -I/usr/local/include +-CFLAGS = -g -Wall -I/opt/ucd-snmp-4.2/include +-LIBS = -L/opt/ucd-snmp-4.2/lib -lsnmp -lcrypto -lnsl -lfl -lm ++CFLAGS += -g -Wall -I${LOCALBASE}/include ++LIBS += -L${LOCALBASE}/lib -lsnmp -lcrypto -lfl -lm ++ ++all: docsis + + docsis: Makefile docsis_decode.o docsis_yy.o docsis_main.o md5.o hmac_md5.o docsis_snmp.o ethermac.h ethermac.o version.h docsis_encode.o + $(CC) $(CFLAGS) $(DEFS) -g -o docsis docsis_main.o docsis_encode.o docsis_decode.o docsis_yy.o md5.o hmac_md5.o docsis_snmp.o ethermac.o $(LIBS) diff --git a/net-mgmt/docsis/files/patch-docsis_decode.c b/net-mgmt/docsis/files/patch-docsis_decode.c new file mode 100644 index 000000000000..ea2184c0fa84 --- /dev/null +++ b/net-mgmt/docsis/files/patch-docsis_decode.c @@ -0,0 +1,11 @@ +--- docsis_decode.c.orig Fri Jul 5 14:54:11 2002 ++++ docsis_decode.c Fri Jul 5 14:55:31 2002 +@@ -47,7 +47,7 @@ + memset( &helper, 0,sizeof(unsigned int)); + memcpy( &helper, tlvbuf+2, sizeof(unsigned int)); + +- printf ( "%s %u;\n", sym->sym_ident, ntohl(helper)); ++ printf ( "%s %u;\n", sym->sym_ident, (unsigned int)ntohl(helper)); + } + + void decode_ushort (unsigned char *tlvbuf, symbol_type *sym) diff --git a/net-mgmt/docsis/files/patch-docsis_snmp.c b/net-mgmt/docsis/files/patch-docsis_snmp.c new file mode 100644 index 000000000000..d7c6b08942fc --- /dev/null +++ b/net-mgmt/docsis/files/patch-docsis_snmp.c @@ -0,0 +1,10 @@ +--- docsis_snmp.c.orig Fri Jul 5 14:56:11 2002 ++++ docsis_snmp.c Fri Jul 5 14:56:53 2002 +@@ -165,6 +165,7 @@ + if (snmp_set_var_objid(vp, objid, vp->name_length)) + return -1; + ++ badtype = 0; + len = PACKET_LENGTH; + switch((short)vp->type){ + case ASN_INTEGER: diff --git a/net-mgmt/docsis/pkg-comment b/net-mgmt/docsis/pkg-comment new file mode 100644 index 000000000000..2d6a07a67f98 --- /dev/null +++ b/net-mgmt/docsis/pkg-comment @@ -0,0 +1 @@ +DOCSIS(tm) binary configuration file encoder/decoder diff --git a/net-mgmt/docsis/pkg-descr b/net-mgmt/docsis/pkg-descr new file mode 100644 index 000000000000..3493a2c9a21d --- /dev/null +++ b/net-mgmt/docsis/pkg-descr @@ -0,0 +1,6 @@ +Docsis is a small program that can be used to generate binary +configuration files for DOCSIS-compliant cable modems. DOCSIS stands +for Data over Cable Service Interface Specification and is a standard +developed by Cablelabs. + +WWW: http://docsis.sourceforge.net/ diff --git a/net-mgmt/docsis/pkg-plist b/net-mgmt/docsis/pkg-plist new file mode 100644 index 000000000000..2010eefbe3a8 --- /dev/null +++ b/net-mgmt/docsis/pkg-plist @@ -0,0 +1,18 @@ +bin/docsis +share/examples/docsis/docsis20.cfg +share/examples/docsis/docsis20_no_snmp.cfg +share/examples/docsis/example-non-rfc2669.cfg +share/examples/docsis/example.cfg +share/examples/docsis/hoof-lab.cfg +share/examples/docsis/hoof-lab1.cfg +share/examples/docsis/keyfile +share/examples/docsis/modem-b.cfg +share/examples/docsis/modem-oid.cfg +share/examples/docsis/modem-text.cfg +share/examples/docsis/modem.cfg +share/examples/docsis/modem1.cfg +share/examples/docsis/rolab-oid.cfg +share/examples/docsis/rolab-text.cfg +share/examples/docsis/snmp20.cfg +share/examples/docsis/testkey.key +@dirrm share/examples/docsis diff --git a/net/Makefile b/net/Makefile index 90d72ca554e2..bdf80d746fcb 100644 --- a/net/Makefile +++ b/net/Makefile @@ -101,6 +101,7 @@ SUBDIR += dnsutl SUBDIR += dnswalk SUBDIR += doc + SUBDIR += docsis SUBDIR += domtools SUBDIR += driftnet SUBDIR += easysoap diff --git a/net/docsis/Makefile b/net/docsis/Makefile new file mode 100644 index 000000000000..346afa65ffa5 --- /dev/null +++ b/net/docsis/Makefile @@ -0,0 +1,28 @@ +# New ports collection makefile for: docsis +# Date created: Jul 5, 2002 +# Whom: James Flemer +# +# $FreeBSD$ +# + +PORTNAME= docsis +PORTVERSION= 0.7.5 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTNAME= ${PORTNAME}-${PORTVERSION}-RELEASE +EXTRACT_SUFX= .tgz + +MAINTAINER= jflemer@acm.jhu.edu + +LIB_DEPENDS= snmp.4:${PORTSDIR}/net/net-snmp4 + +USE_OPENSSL= yes +USE_BISON= yes + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/docsis ${PREFIX}/bin + @${MKDIR} ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} + +.include diff --git a/net/docsis/distinfo b/net/docsis/distinfo new file mode 100644 index 000000000000..19d2a9fd1a38 --- /dev/null +++ b/net/docsis/distinfo @@ -0,0 +1 @@ +MD5 (docsis-0.7.5-RELEASE.tgz) = 9cd8250b2c7e9f764db534e5f7aaca7d diff --git a/net/docsis/files/patch-Makefile b/net/docsis/files/patch-Makefile new file mode 100644 index 000000000000..b57482e32afc --- /dev/null +++ b/net/docsis/files/patch-Makefile @@ -0,0 +1,20 @@ +--- Makefile.orig Wed Feb 13 14:09:52 2002 ++++ Makefile Thu Jul 18 00:11:49 2002 +@@ -1,4 +1,3 @@ +-CC = gcc + DEFS = -DYY_NO_UNPUT -DDEBUG + # + # We assume ucd-snmp is installed in /opt/ucd-snmp-4.2. If not, replace with +@@ -7,8 +6,10 @@ + # -lcrypto is OpenSSL. + # + # CFLAGS = -g -Wall -I/usr/local/include +-CFLAGS = -g -Wall -I/opt/ucd-snmp-4.2/include +-LIBS = -L/opt/ucd-snmp-4.2/lib -lsnmp -lcrypto -lnsl -lfl -lm ++CFLAGS += -g -Wall -I${LOCALBASE}/include ++LIBS += -L${LOCALBASE}/lib -lsnmp -lcrypto -lfl -lm ++ ++all: docsis + + docsis: Makefile docsis_decode.o docsis_yy.o docsis_main.o md5.o hmac_md5.o docsis_snmp.o ethermac.h ethermac.o version.h docsis_encode.o + $(CC) $(CFLAGS) $(DEFS) -g -o docsis docsis_main.o docsis_encode.o docsis_decode.o docsis_yy.o md5.o hmac_md5.o docsis_snmp.o ethermac.o $(LIBS) diff --git a/net/docsis/files/patch-docsis_decode.c b/net/docsis/files/patch-docsis_decode.c new file mode 100644 index 000000000000..ea2184c0fa84 --- /dev/null +++ b/net/docsis/files/patch-docsis_decode.c @@ -0,0 +1,11 @@ +--- docsis_decode.c.orig Fri Jul 5 14:54:11 2002 ++++ docsis_decode.c Fri Jul 5 14:55:31 2002 +@@ -47,7 +47,7 @@ + memset( &helper, 0,sizeof(unsigned int)); + memcpy( &helper, tlvbuf+2, sizeof(unsigned int)); + +- printf ( "%s %u;\n", sym->sym_ident, ntohl(helper)); ++ printf ( "%s %u;\n", sym->sym_ident, (unsigned int)ntohl(helper)); + } + + void decode_ushort (unsigned char *tlvbuf, symbol_type *sym) diff --git a/net/docsis/files/patch-docsis_snmp.c b/net/docsis/files/patch-docsis_snmp.c new file mode 100644 index 000000000000..d7c6b08942fc --- /dev/null +++ b/net/docsis/files/patch-docsis_snmp.c @@ -0,0 +1,10 @@ +--- docsis_snmp.c.orig Fri Jul 5 14:56:11 2002 ++++ docsis_snmp.c Fri Jul 5 14:56:53 2002 +@@ -165,6 +165,7 @@ + if (snmp_set_var_objid(vp, objid, vp->name_length)) + return -1; + ++ badtype = 0; + len = PACKET_LENGTH; + switch((short)vp->type){ + case ASN_INTEGER: diff --git a/net/docsis/pkg-comment b/net/docsis/pkg-comment new file mode 100644 index 000000000000..2d6a07a67f98 --- /dev/null +++ b/net/docsis/pkg-comment @@ -0,0 +1 @@ +DOCSIS(tm) binary configuration file encoder/decoder diff --git a/net/docsis/pkg-descr b/net/docsis/pkg-descr new file mode 100644 index 000000000000..3493a2c9a21d --- /dev/null +++ b/net/docsis/pkg-descr @@ -0,0 +1,6 @@ +Docsis is a small program that can be used to generate binary +configuration files for DOCSIS-compliant cable modems. DOCSIS stands +for Data over Cable Service Interface Specification and is a standard +developed by Cablelabs. + +WWW: http://docsis.sourceforge.net/ diff --git a/net/docsis/pkg-plist b/net/docsis/pkg-plist new file mode 100644 index 000000000000..2010eefbe3a8 --- /dev/null +++ b/net/docsis/pkg-plist @@ -0,0 +1,18 @@ +bin/docsis +share/examples/docsis/docsis20.cfg +share/examples/docsis/docsis20_no_snmp.cfg +share/examples/docsis/example-non-rfc2669.cfg +share/examples/docsis/example.cfg +share/examples/docsis/hoof-lab.cfg +share/examples/docsis/hoof-lab1.cfg +share/examples/docsis/keyfile +share/examples/docsis/modem-b.cfg +share/examples/docsis/modem-oid.cfg +share/examples/docsis/modem-text.cfg +share/examples/docsis/modem.cfg +share/examples/docsis/modem1.cfg +share/examples/docsis/rolab-oid.cfg +share/examples/docsis/rolab-text.cfg +share/examples/docsis/snmp20.cfg +share/examples/docsis/testkey.key +@dirrm share/examples/docsis