#!/bin/sh # This script generates an HTML file which contains an overview of all configuration settings supported by DOCSIS, # as defined in ../src/docsis_symtable.h. # Tried to make it as portable as possible. We still need sh, sed & awk. if test $# -ne 2; then echo "Usage: $0 " exit 1; fi cat > $1 << EOF DOCSIS Configuration Settings

DOCSIS Configuration Settings

In the table below you can find a list of all Configuration Settings understood by this program. The name should be self-descriptive; if not you can refer to the DOCSIS RFI specification - Appendix C, for detailed explanations of what each of these mean.

For String and Hexadecimal strings, the "Range" field means the minimum and maximum length of the string. For "List" types, it represents the number of elements in the list.

This list was generated for docsis version $2. EOF grep -e "^{" ../src/docsis_symtable.h\ | grep -v "*"\ | grep -v "decode_md5"\ | awk '{print $5 "_" $3 " " $7 " " $8 " " $9}' \ | sed 's/\"//g' \ | sed 's/^0,_//g' \ | sed 's/^[0-9]*,_/\ \;\ \;\ \;\ \;/g'\ | sed 's/\decode_//g' \ | sed 's/\ //g' | tr -s "\(\)" "%%" \ | sed 's/^/
Configuration SettingTypeRange of values allowed
/g' \ | sed 's/,\%/<\/b><\/td>/g' \ | sed 's/%,/<\/td>/g' \ | sed 's/,/-/g' \ | sed 's/$/<\/td><\/tr>/g'\ | sed 's/uchar/Unsigned Integer/g' \ | sed 's/uint/Unsigned Integer/g' \ | sed 's/ushort_list/Unsigned Integer List - comma separated/g' \ | sed 's/ushort/Unsigned Integer/g' \ | sed 's/0xFFFFFFFF/4294967296/g' \ | sed 's/ip/IP address/g' \ | sed 's/ether/Ethernet MAC address/g' \ | sed 's/ethermask/Ethernet MAC address mask/g' \ | sed 's/hexstr/Hexadecimal characters/g' \ | sed 's/string/String - double quote delimited/g' \ | sed 's/strzero/String - double quote delimited/g' \ | sed 's/aggregate/Aggregate/g' \ | sed 's/vspecific/Aggregate/g' \ | sed 's/oid/SNMP Object Identifier - numeric/g' \ | sed 's/snmp_wd/SNMP Write Control - OID, value/g' \ | sed 's/snmp_object/SNMP MIB Object- OID, Type, Value/g' \ | sed 's/0-0/Not Applicable/g' >> $1 echo "
" >> $1