DOCSIS::ConfigFile::Decode - Decode functions for a DOCSIS config-file
DOCSIS::ConfigFile::Decode has functions which is used to decode binary data into either plain strings or complex data structures, dependent on the function called.
Returns a Math::BigInt object.
Math::BigInt
Will unpack the input string and return a MAC address in this format: "00112233" or "00112233445566".
Will unpack the input string and a string with leading "0x", followed by hexidesimal characters.
Will unpack the input string and return an integer, from -2147483648 to 2147483647.
Will unpack the input string and return a human readable IPv4 address.
Returns human-readable string, where special characters are "uri encoded". Example: "%" = "%25" and " " = "%20". It can also return the value from "hexstr" if it starts with a weird character, such as \x00.
\x00
Same as string above. However this string is zero-terminated in encoded form, but this function remove the last "\0" seen in the string.
Returns a value, printed as hex.
This method will return an empty string. It is used by DOCSIS types, which has zero length.
Will take a binary string and decode it into a complex datastructure, with "oid", "type" and "value".
Will unpack the input string and return a short integer, from 0 to 255.
Will unpack the input string and return an integer, from 0 to 4294967295.
Will unpack the input string and return a short integer, from 0 to 65535.
Same as "ushort", but will return an array ref with the integers.
Will byte-encode a complex vendorspec datastructure.
Will unpack the input string and return a complex datastructure, representing the vendor specific data.
DOCSIS::ConfigFile
To install DOCSIS::ConfigFile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DOCSIS::ConfigFile
CPAN shell
perl -MCPAN -e shell install DOCSIS::ConfigFile
For more information on module installation, please visit the detailed CPAN module installation guide.