NAME

DOCSIS::ConfigFile::Decode - Decode functions for a DOCSIS config-file

VERSION

See DOCSIS::ConfigFile

FUNCTIONS

snmp_object

$data = snmp_object($bytestring);

$data template:

{
  oid   => "", # numeric OID
  type  => "", # what kind of value (corresponding to C<snmp_type>)
  value => "", # the oid value
}

bigint

$bigint_obj = bigint($bytestring);

Returns a Math::BigInt object.

uint

$int = uint($bytestring);

Returns an unsigned integer: 0..2**32-1

ushort

$short = ushort($bytestring);

Returns an unsigned short integer: 0..2**16-1

uchar

$chr = uchar($bytesstring);

Returns an unsigned character: [0..255]

vendorspec

($vendor_id, $vendor_data) = vendorspec($bytestring);

Return value example:

"0x001337" => { # vendor ID
  type   => "24", # vendor specific type
  value  => "42", # vendor specific value
  length => "1",  # the length of the value meassured in bytes
};

ip

$ipv4_address = ip($bytestring);

Returns an IPv4-address.

ether

$mac = ether($bytestring);

Returns a MAC-address.

string($bytestring)

Returns human-readable string if it can, or the string hex-encoded if it cannot.

hexstr($bytestring)

Returns a value, printed as hex.

mic($bytestring)

Returns a value, printed as hex.

AUTHOR

BUGS

SUPPORT

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

See DOCSIS::ConfigFile