Centos server – DOCSIS howto

DOCSIS stands for Data over Cable Service Interface Specification and is a standard developed by Cablelabs.

docsis is a small program that can be used to generate binary configuration files for DOCSIS-compliant cable modems. Click here to get the latest version.

Unpack the downloaded package with

tar -xvzf docsis-0.9.6.tar.gz
cd docsis-0.9.6/
./configure
make
make install

In case that configure complains about missing packages, install them with yum (usually gcc, bison, net-snmp-devel, flex).

Enter docsis command to see the output

[root@s1 /]# docsis
DOCSIS Configuration File creator, version 0.9.6
Copyright (c) 1999,2000,2001 Cornel Ciocirlan, ctrl@users.sourceforge.net
Copyright (c) 2002,2003,2004,2005 Evvolve Media SRL, docsis@evvolve.com
 
To encode a cable modem configuration file:
         docsis -e   
To encode multiple cable modem configuration files:
         docsis -m  ...   
To encode a MTA configuration file:
         docsis -p  
To encode multiple MTA configuration files:
         docsis -m -p  ...  
To decode a CM or MTA config file:
         docsis -d 
 
Where:
              = name of text (human readable) cable modem or MTA
                          configuration file
              = text file containing the authentication key
                          (shared secret) to be used for the CMTS MIC
           = name of output file where the binary data will
                          be written to (if it does not exist it is created).
           = name of binary file to be decoded
         = new extension to be used when encoding multiple files
 
See examples/*.cfg for configuration file format.
 
Please send bugs or questions to docsis-users@lists.sourceforge.net

NOTE

It is possible to get the next error during make

docsis_lex.o: In function `yylex':
/downloads/docsis-0.9.6/src/docsis_lex.c:1734: undefined reference to `yywrap'
collect2: ld returned 1 exit status
make[2]: *** [docsis] Error 1
make[2]: Leaving directory `/downloads/docsis-0.9.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/downloads/docsis-0.9.6'
make: *** [all] Error 2

To solve this problem, install flex with yum install flex flex-devel.
Then repeat ./configure and make commands.

11 thoughts on “Centos server – DOCSIS howto”

  1. Thanks a lot .
    So I installed docsis on ubuntu server 12.0.9 and your tuto helped me.
    At the end, I had to install m4, net-snmp, bison and flex packages.
    More, I got to solved another error (error while loading shared libraires libnetsnmp.so.15…) and enter this command “copy /usr/local/lib/libnetsnmp.so.15 /usr/lib”

    Enjoy docsis

  2. I get the error during make but i have installed flex and repeat ./configure and make commands and i this error continue….

    I installed m4, net-snmp, bison and flex packages.

    What i can do?

  3. [root@smit docsis-0.9.6]# make
    make all-recursive
    make[1]: se ingresa al directorio `/home/docsis-0.9.6′
    Making all in src
    make[2]: se ingresa al directorio `/home/docsis-0.9.6/src’
    /bin/sh ../libtool –tag=CC –mode=link gcc -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wendif-labels -Werror-implicit-function-declaration -Wextra -Wno-unused-parameter -Wfloat-equal -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wundef -g -g -O2 -L/usr/local/lib -lnetsnmp -lm -lm -o docsis docsis.o ethermac.o md5.o docsis_encode.o docsis_decode.o docsis_snmp.o docsis_yy.o docsis_lex.o hmac_md5.o -lresolv
    libtool: link: gcc -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wendif-labels -Werror-implicit-function-declaration -Wextra -Wno-unused-parameter -Wfloat-equal -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wundef -g -g -O2 -o docsis docsis.o ethermac.o md5.o docsis_encode.o docsis_decode.o docsis_snmp.o docsis_yy.o docsis_lex.o hmac_md5.o -L/usr/local/lib /usr/local/lib/libnetsnmp.so -lm -lresolv -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
    docsis_lex.o: In function `yylex’:
    /home/docsis-0.9.6/src/docsis_lex.c:1734: undefined reference to `yywrap’
    collect2: error: ld returned 1 exit status
    make[2]: *** [docsis] Error 1
    make[2]: se sale del directorio `/home/docsis-0.9.6/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: se sale del directorio `/home/docsis-0.9.6′
    make: *** [all] Error 2

  4. I have CentOS 5.5 / 64b, and at to compile docsis-0.9.6, the result was:

    configure: error: M4 is required

    but my m4 is already installed ( /usr/bin/m4 ).

    So, after many tries, I changed the “configure” file. I added
    M4=/usr/bin/m4 at the line 10733 and It worked to compile…

    and finally ./configure; make ; make install

    Slds,

    GF

  5. I get this..

    /docsis-0.9.6/src/docsis_lex.c:1720: undefined reference to `yywrap

  6. yum install flex flex-devel
    make clean

    and try again. If make clean isn’t possible, extract archive again and start from the beginning.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.