debian/0000755000000000000000000000000012146256617007200 5ustar debian/watch0000644000000000000000000000020311750234032010207 0ustar # Compulsory line, this is a version 3 file version=3 opts=dversionmangle=s/\+dfsg// \ http://sf.net/docsis/docsis-(.*)\.tar\.gz debian/docsis.10000644000000000000000000000352211750234032010533 0ustar .TH DOCSIS "1" "February 2012" "DOCSIS Configuration File creator. .SH NAME DOCSIS \- Docsis configuration file creator. .SH DESCRIPTION DOCSIS Configuration File creator. This program encodes text configuration files which contain Configuration File Settings into binary configuration files, as specified by the DOCSIS RFI 1.1 Specification, Appendix C. .SS "To encode a cable modem configuration file:" .IP \&./docsis \fB\-e\fR .SS "To encode multiple cable modem configuration files:" .TP \&./docsis \fB\-m\fR ... .SS "To encode a MTA configuration file:" .IP \&./docsis \fB\-p\fR .SS "To encode multiple MTA configuration files:" .TP \&./docsis \fB\-m\fR \fB\-p\fR ... .SS "To decode a CM or MTA config file:" .IP \&./docsis \fB\-d\fR .PP Where: = name of text (human readable) cable modem or MTA .IP configuration file .PP = text file containing the authentication key .IP (shared secret) to be used for the CMTS MIC .PP = name of output file where the binary data will .IP be written to (if it does not exist it is created). .PP = name of binary file to be decoded = new extension to be used when encoding multiple files .PP See examples/*.cfg for configuration file format. .SH BUGS/QUESTIONS Please send bugs or questions to docsis\-users@lists.sourceforge.net .SH COPYRIGHT Copyright \(co 1999,2000,2001 Cornel Ciocirlan, ctrl@users.sourceforge.net .br Copyright \(co 2002,2003,2004,2005 Evvolve Media SRL, docsis@evvolve.com This manual page was written by Lisandro Damián Nicanor Pérez Meyer based on the output of help2man for the Debian project, but may be used by others. debian/README.source0000644000000000000000000000045711750234032011350 0ustar docsis for Debian ----------------- This package does not ships the MIBs originally included in the source package due to license problems. In other words, the directory "mibs" is removed from the original tarball. -- Lisandro Damián Nicanor Pérez Meyer Fri, 27 February 2012 debian/rules0000755000000000000000000000032611750234032010244 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # Do not run tests. export DEB_BUILD_OPTIONS += nocheck %: dh $@ --parallel --with autoreconf --list-missing debian/README.Debian0000644000000000000000000000106711750234032011230 0ustar As this package does not ships MIBs, it is necessary to get the required ones for your setup. Docsis uses libsnmp to get and process the MIBs. As the time of this writing, libsnmp searches for MIBs in - $HOME/.snmp/mibs - /usr/share/mibs/site - /usr/share/snmp/mibs - /usr/share/mibs/netsnmp - /usr/share/mibs/iana - /usr/share/mibs/ietf libsnmp itself does not downloads MIBs files anymore, but suggest to install snmp-mibs-downloader, which is currently in non-free. You may also consider to get and install any propietary MIBs you may need for your equipment. debian/copyright0000644000000000000000000000251711750234032011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: docsis Source: http://docsis.sourceforge.net/ Files: * Copyright: 1999,2000,2001,2002 Cornel Ciocirlan 2002,2003,2004,2005 Evvolve Media SRL License: GPL-2.0+ Files: src/md5.* Copyright: 1993 Colin Plumb License: public-domain No copyright is claimed. This code is in the public domain; do with it what you wish. Files: debian/* Copyright: 2011 Lisandro Damián Nicanor Pérez Meyer License: GPL-2.0+ License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/docs0000644000000000000000000000003711750234032010036 0ustar NEWS TODO debian/README.source debian/source/0000755000000000000000000000000011750234032010463 5ustar debian/source/format0000644000000000000000000000001411750234032011671 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012003016172010605 5ustar debian/patches/do_not_build_mibs.patch0000644000000000000000000000160611750234032015311 0ustar Description: disble MIBs installation. This patch disbles MIBs installtion, as they are not provided by the Debian source package due to licensing problems. Author: Lisandro Damián Nicanor Pérez Meyer Forwarded: not-needed --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ README: doc/index.html (echo This file is generated from doc/index.html, which is easier to read if you have ; echo a web browser available. ; echo ; w3m doc/index.html) > README -SUBDIRS = src doc examples mibs +SUBDIRS = src doc examples EXTRA_DIST = build_setup.nsi.in README MAINTAINERCLEANFILES = README --- a/configure.in +++ b/configure.in @@ -190,4 +190,4 @@ CFLAGS="-Wall $DEBUG_CFLAGS -g $CFLAGS" fi -AC_OUTPUT(build_setup.nsi Makefile src/Makefile doc/Makefile examples/Makefile mibs/Makefile) +AC_OUTPUT(build_setup.nsi Makefile src/Makefile doc/Makefile examples/Makefile) debian/patches/fix-double-use-of-stderr.patch0000644000000000000000000000170512003016172016364 0ustar Description: fix double use of stderr. Author: Lisandro Damián Nicanor Pérez Meyer --- src/docsis_encode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docsis_encode.c b/src/docsis_encode.c index 87075f8..d0ee167 100644 --- a/src/docsis_encode.c +++ b/src/docsis_encode.c @@ -47,12 +47,12 @@ int encode_uint ( unsigned char *buf, void *tval, struct symbol_entry *sym_ptr ) unsigned int int_value; union t_val *helper; /* We only use this to cast the void* we receive to what we think it should be */ if ( buf == NULL ) { - fprintf(stderr, stderr, "encode_uint called w/NULL buffer!\n"); + fprintf(stderr, "encode_uint called w/NULL buffer!\n"); exit (-1); } if ( tval == NULL ) { - fprintf(stderr, stderr, "encode_uint called w/NULL value struct !\n"); + fprintf(stderr, "encode_uint called w/NULL value struct !\n"); exit (-1); } helper = (union t_val *) tval; -- 1.7.10.4 debian/patches/send-decode-output-to-stdout.patch0000644000000000000000000002453612002604634017315 0ustar Description: Send decode output to stdout The stderr changes in 4f5fb8c907e01896aaa73c724bbf9ee79f44b326 were too aggressive. . This is SF patch #3545001. I went back to printf(...) instead of using fprintf(stdout, ...) from the patch. Author: Benedikt Schirrmeister Origin: upstream Bug: http://sourceforge.net/tracker/?func=detail&atid=375629&aid=3545001&group_id=22615 Forwarded: not-needed Reviewed-By: Richard Laager Last-Update: 2012-07-20 --- docsis-0.9.6+git16-g61ee500+dfsg.orig/src/docsis_decode.c +++ docsis-0.9.6+git16-g61ee500+dfsg/src/docsis_decode.c @@ -60,7 +60,7 @@ void decode_uint (unsigned char *tlvbuf, memset( &helper, 0, sizeof(unsigned int)); memcpy( &helper, tlvbuf, length); - fprintf(stderr, "%s %u;\n", sym->sym_ident, ntohl(helper)); + printf("%s %u;\n", sym->sym_ident, ntohl(helper)); } void decode_ushort (unsigned char *tlvbuf, symbol_type *sym, size_t length) @@ -74,12 +74,12 @@ void decode_ushort (unsigned char *tlvbu memset( &helper, 0, length); memcpy( &helper, tlvbuf, length ); - fprintf(stderr, "%s %hu;\n", sym->sym_ident, ntohs(helper)); + printf("%s %hu;\n", sym->sym_ident, ntohs(helper)); } void decode_uchar (unsigned char *tlvbuf, symbol_type *sym, size_t length ) { - fprintf(stderr, "%s %hhu;\n", sym->sym_ident, (unsigned char) *tlvbuf ); + printf("%s %hhu;\n", sym->sym_ident, (unsigned char) *tlvbuf ); } void decode_ip (unsigned char *tlvbuf, symbol_type *sym, size_t length ) @@ -91,7 +91,7 @@ void decode_ip (unsigned char *tlvbuf, s } memcpy (&helper, tlvbuf, length ); - fprintf(stderr, "%s %s;\n", + printf("%s %s;\n", sym->sym_ident, inet_ntoa(helper) ); } @@ -105,7 +105,7 @@ void decode_ip6 (unsigned char *tlvbuf, } memcpy (&helper, tlvbuf, length ); - fprintf (stderr, "%s %s;\n", + fprintf (stdout, "%s %s;\n", sym->sym_ident, inet_ntop(AF_INET6,tlvbuf,ipstr,sizeof ipstr) ); } @@ -116,7 +116,7 @@ void decode_ether (unsigned char *tlvbuf fprintf(stderr, "ethermac length mismatch!\n"); exit(-45); } - fprintf(stderr, "%s %s;\n", + printf("%s %s;\n", sym->sym_ident, ether_ntoa(tlvbuf) ); } @@ -130,9 +130,9 @@ void decode_ethermask (unsigned char *tl fprintf(stderr, "ethermac_and_mask length mismatch!\n"); exit(-45); } - fprintf(stderr, "%s %s/", sym->sym_ident, ether_ntoa(tlvbuf)); + printf("%s %s/", sym->sym_ident, ether_ntoa(tlvbuf)); - fprintf(stderr, "%s;\n", ether_ntoa(tlvbuf+6)); + printf("%s;\n", ether_ntoa(tlvbuf+6)); } void decode_md5 (unsigned char *tlvbuf, symbol_type *sym, size_t length) @@ -143,10 +143,10 @@ void decode_md5 (unsigned char *tlvbuf, exit(-45); } - fprintf(stderr, "/* %s ", sym->sym_ident); - for (j=0;jsym_ident); + for (j=0;jsym_ident); + printf("%s ", sym->sym_ident); decode_snmp_oid (tlvbuf,(unsigned int) length ); - fprintf(stderr, ";\n"); + printf(";\n"); } void decode_snmp_object (unsigned char *tlvbuf, symbol_type *sym, size_t length ) { - fprintf(stderr, "%s ", sym->sym_ident); + printf("%s ", sym->sym_ident); decode_vbind (tlvbuf, length ); /* 22-06-03 decode_vbind prints the trailing ';' as well */ - fprintf(stderr, "\n"); + printf("\n"); } void decode_string (unsigned char *tlvbuf, symbol_type *sym, size_t length ) @@ -181,7 +181,7 @@ void decode_string (unsigned char *tlvbu /* helper = (char *) malloc ( ((unsigned int) tlvbuf[1])+1 ); */ memset ( helper, 0, length+1); strncpy ( helper, (char *) tlvbuf, length ); - fprintf(stderr, "%s \"%s\";\n", sym->sym_ident, helper ); + printf("%s \"%s\";\n", sym->sym_ident, helper ); } void decode_strzero (unsigned char *tlvbuf, symbol_type *sym, size_t length ) @@ -191,7 +191,7 @@ void decode_strzero (unsigned char *tlvb helper = (char *) malloc ( length +1 ); memset ( helper, 0, length+1); strncpy ( helper, (char *) tlvbuf, length ); - fprintf(stderr, "%s \"%s\";\n", sym->sym_ident, helper ); + printf("%s \"%s\";\n", sym->sym_ident, helper ); free(helper); } @@ -207,11 +207,11 @@ void decode_hexstr (unsigned char *tlvbu helper = (char *) malloc ( len+1 ); memset ( helper, 0, len+1); memcpy ( helper, (char *) tlvbuf, len ); - fprintf(stderr, "%s 0x", sym->sym_ident); + printf("%s 0x", sym->sym_ident); for(i=0; isym_ident); + printf("%s ", sym->sym_ident); if ( len < 2*sym->low_limit || len > 2*sym->high_limit ) - fprintf(stderr, "/* -- warning: illegal length of buffer --*/"); + printf("/* -- warning: illegal length of buffer --*/"); for(i=0; i 1 ) { - fprintf(stderr, "GenericTLV TlvCode %d TlvString ", + printf("GenericTLV TlvCode %d TlvString ", (unsigned int) tlvbuf[0]) ; - fprintf(stderr, "\"%s\"; /* tlv length = %zd */", cp, len); + printf("\"%s\"; /* tlv length = %zd */", cp, len); } else if ( len > 1 && cp[len-1] == 0 && str_isprint(cp, len-1 ) ) { - fprintf(stderr, "GenericTLV TlvCode %d TlvStringZero ", + printf("GenericTLV TlvCode %d TlvStringZero ", (unsigned int) tlvbuf[0] ) ; - fprintf(stderr, "\"%s\"; /* tlv length = %zd */", cp, len); + printf("\"%s\"; /* tlv length = %zd */", cp, len); } else { - fprintf(stderr, "GenericTLV TlvCode %d TlvLength %zd TlvValue ", + printf("GenericTLV TlvCode %d TlvLength %zd TlvValue ", (unsigned int) tlvbuf[0], len) ; snprint_hexadecimal ( hexvalue, 514, value, len); - fprintf(stderr, "%s;", hexvalue); + printf("%s;", hexvalue); } - fprintf(stderr, "\n"); + printf("\n"); free(value); } void decode_special (unsigned char *tlvbuf, symbol_type *sym, size_t length ) { - fprintf(stderr, "%s\n", sym->sym_ident); + printf("%s\n", sym->sym_ident); } void decode_aggregate (unsigned char *tlvbuf, symbol_type *sym, size_t length ) @@ -289,9 +289,9 @@ void decode_aggregate (unsigned char *tl /* cp = tlvbuf+1+tlv_llen; */ /* skip type,len of parent TLV */ cp = tlvbuf; - fprintf(stderr, "%s\n", sym->sym_ident); + printf("%s\n", sym->sym_ident); __docsis_indent(INDENT_NOOP, TRUE); - fprintf(stderr, "{\n"); + printf("{\n"); __docsis_indent(INDENT_INCREMENT, FALSE); @@ -312,7 +312,7 @@ void decode_aggregate (unsigned char *tl __docsis_indent(INDENT_DECREMENT, FALSE); __docsis_indent(INDENT_NOOP, TRUE); - fprintf(stderr, "}\n"); + printf("}\n"); } /* @@ -330,9 +330,9 @@ void decode_vspecific (unsigned char *tl /* cp = tlvbuf+1+tlv_llen; */ /* skip type,len of parent TLV */ cp = tlvbuf; - fprintf(stderr, "%s\n", sym->sym_ident); + printf("%s\n", sym->sym_ident); __docsis_indent(INDENT_NOOP, TRUE); - fprintf(stderr, "{\n"); + printf("{\n"); __docsis_indent(INDENT_INCREMENT, FALSE); @@ -375,7 +375,7 @@ void decode_vspecific (unsigned char *tl __docsis_indent(INDENT_DECREMENT, FALSE); __docsis_indent(INDENT_NOOP, TRUE); - fprintf(stderr, "}\n"); + printf("}\n"); } /* @@ -400,7 +400,7 @@ void decode_main_aggregate (unsigned cha __docsis_indent(INDENT_CLEAR, FALSE); - fprintf(stderr, "Main \n{\n"); + printf("Main \n{\n"); __docsis_indent(INDENT_INCREMENT, FALSE); while ( (unsigned int) (cp - tlvbuf) < buflen ) { @@ -422,12 +422,12 @@ void decode_main_aggregate (unsigned cha } #ifdef DEBUG if (cp[0] == 64 ) /* TLV 64 has length encoded as a short */ - fprintf(stderr, "/* TLV 64, size %hu */ \n", ntohs(*((unsigned short *)(cp+1))) ); + printf("/* TLV 64, size %hu */ \n", ntohs(*((unsigned short *)(cp+1))) ); #endif cp = (unsigned char*) cp + 1 + tlv_llen + tlv_vlen ; /* type, length, value */ } __docsis_indent(INDENT_DECREMENT, FALSE); - fprintf(stderr, "}\n"); + printf("}\n"); } int @@ -435,7 +435,7 @@ hexadecimal_to_binary (const char *str, { int len, itmp; #ifdef DEBUG - fprintf(stderr, "Hex string rx'd: %s\n", str); + printf("Hex string rx'd: %s\n", str); #endif if (!bufp) return -1; @@ -532,7 +532,7 @@ void __docsis_indent(int opCode, int doP if ( doPrint ) { - for (i=0; i Build-Depends: debhelper (>= 8.0.0), autotools-dev, dh-autoreconf, flex, bison, libsnmp-dev Standards-Version: 3.9.3 Homepage: http://docsis.sourceforge.net/ Vcs-Git: git://dumbledore.com.ar/debian-package-docsis.git Vcs-Browser: http://dumbledore.com.ar/gitweb/?p=debian-package-docsis.git;a=summary Package: docsis Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: generates configuration files for DOCSIS-compliant cable modems 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. debian/changelog0000644000000000000000000000133412146256617011053 0ustar docsis (0.9.6+git16-g61ee500+dfsg-2build1) saucy; urgency=low * Rebuild for libsnmp30. -- Colin Watson Mon, 20 May 2013 00:17:35 +0100 docsis (0.9.6+git16-g61ee500+dfsg-2) unstable; urgency=low * Add patch send-decode-output-to-stdout.patch to send decode output to stdout (Closes: #682337). * Add patch debian/patches/fix-double-use-of-stderr.patch to fix the incorrect double call to stderr. -- Lisandro Damián Nicanor Pérez Meyer Fri, 20 Jul 2012 22:18:03 -0300 docsis (0.9.6+git16-g61ee500+dfsg-1) unstable; urgency=low * Initial release (Closes: #522638). -- Lisandro Damián Nicanor Pérez Meyer Sun, 15 Apr 2012 13:33:31 -0300 debian/manpages0000644000000000000000000000002011750234032010671 0ustar debian/docsis.1