README 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. 1. General Information
  2. ======================
  3. This software is Copyright (c) 1999,2000,2001,2002 Cornel Ciocirlan
  4. Copyright (c) 2002,2003 Evvolve Media SRL
  5. Portions of this program are derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm.
  6. To contact the current maintainers and developers, send an E-mail to: docsis@evvolve.com.
  7. To contact the original author, send an E-mail to: ctrl@users.sourceforge.net.
  8. General questions about this software can be sent to docsis-users@sourceforge.net.
  9. Visit http://docsis.sourceforge.net and http://sourceforge.net/projects/docsis
  10. for the latest news on this program.
  11. PLEASE READ THE FILE License.txt.
  12. Caution: This is Unsupported software that may crash your computer, damage all your data
  13. or otherwise drive you nuts. You'd better know what you're doing.
  14. 2. Description
  15. ==============
  16. This program encodes text configuration files which contain Configuration File Settings into
  17. binary configuration files, as specified by the DOCSIS Radio Frequency Interface
  18. Specification, Appendix C.
  19. It supports most DOCSIS 2.0 Configuration Settings. Not supported (currently):
  20. * Telephony Settings
  21. * Vendor ID (Partial support provided)
  22. Refer to Appendix C of the Radio Frequency Interface Specification for a
  23. description of these settings.
  24. DOCSIS 1.0 considerations
  25. =========================
  26. More than one (up to 16) ClassOfService statements can appear in the
  27. configuration file. Only one BaselinePrivacy (BPI) statement can appear.
  28. The program does not check for the number of ClassOfService statements that
  29. appear, you have to make sure not to include more than 16 or unexpected results
  30. will occur (modems / CMTSes may reset).
  31. DOCSIS BPI Specification clearly states that the BPI settings MUST NOT be
  32. present if Privacy is not enabled in [at least one of] the ClassOfService
  33. parameters (for example if PrivacyEnable is 0 for all classes of service, BPI
  34. statement should not appear).
  35. The program is not yet as "intelligent" as to detect these problems
  36. automatically (quite trivial).
  37. 3. Usage
  38. ========
  39. There are three modes of operation:
  40. a). Encoding CM configuration files
  41. To encode a CM configuration file, make sure "docsis" is in your PATH and do:
  42. unix $ docsis -e cm_config_file.cfg my_key_file cm_config_file.bin
  43. The format of the text configuration file, although simple, is not
  44. described anywhere but the source code (see the grammar in docsis_yy.y
  45. and lexical analyzer in docsis_lex.l). As sometimes an example is more
  46. useful than a truckload of documentation, we've included a few
  47. configuration files (see examples/cm/*.cfg).
  48. In this mode of operation (triggered by the "-e" switch), the program will
  49. need a keyfile; it will calculate the CM MIC and use the string in the
  50. keyfile to calculate a CMTS MIC; and it will add the DOCSIS End of Data
  51. marker as well as pad at the end.
  52. An example key is provided in file testkey.key. The key is only a string of
  53. characters. Any trailing newline (\n) or carriage return (\r) characters
  54. are chopped to avoid confusion.
  55. b). Encoding PacketCable MTA configuration files
  56. MTA Configuration file support has been added in version 0.8.1.
  57. To encode a CM configuration file, make sure "docsis" is in your PATH and do:
  58. unix $ docsis -p mta_config_file.cfg mta_config_file.bin
  59. PacketCable MTA config files MUST start with the "MtaConfigDelimiter 1"
  60. configuration setting and MUST end with "MtaConfigDelimiter 255". All
  61. other configuration settings must be either SnmpMibObject or
  62. VendorSpecific. The program does not enforce this policy so you must make
  63. sure you abide by it or the MTA will reject the file.
  64. c). Decoding CM or MTA binary configuration files
  65. To decode a binary file, do:
  66. unix $ ./docsis -d my_binary_file.bin
  67. The decoded output is not always "compatible" with itself, eg cannot be
  68. directly encoded back into a binary file.
  69. This is mostly due to the usage of ucd-snmp library functions to print the
  70. SnmpMibObjects, which print out a different syntax than what we need.
  71. As of version 8.0, you can directly encode the decoded output. E.g.
  72. unix $ docsis -d cm_test.bin > cm_test.cfg
  73. unix $ docsis -e cm_test.cfg testkey.key cm_test.bin
  74. unix $ docsis -d mta_test.bin > mta_test.cfg
  75. unix $ docsis -p mta_test.cfg mta_test.bin
  76. should work, save for still remaining bugs.
  77. 4. Adding new configuration settings
  78. ====================================
  79. To add new configuration settings, in most cases the only thing you need to
  80. do is add them to the docsis_symtable.h (make sure you select the correct
  81. type-functions for encoding and decoding).
  82. Because of the way the encoder works, the symbol_name must
  83. determine all other values in the table with the exception of id and parent.
  84. Thus if two symbols share the same name they MUST share the same docsis_code,
  85. type-functions, limits etc. Only the id and parent can be different.