… | |
… | |
412 | use Exporter qw(import); |
412 | use Exporter qw(import); |
413 | |
413 | |
414 | our $VERSION; |
414 | our $VERSION; |
415 | |
415 | |
416 | BEGIN { |
416 | BEGIN { |
417 | $VERSION = 1.1; |
417 | $VERSION = 1.11; |
418 | XSLoader::load __PACKAGE__, $VERSION; |
418 | XSLoader::load __PACKAGE__, $VERSION; |
419 | } |
419 | } |
420 | |
420 | |
421 | our %EXPORT_TAGS = ( |
421 | our %EXPORT_TAGS = ( |
422 | const_index => [qw( |
422 | const_index => [qw( |
… | |
… | |
468 | |
468 | |
469 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_IPADDRESS , BER_TYPE_IPADDRESS); |
469 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_IPADDRESS , BER_TYPE_IPADDRESS); |
470 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_COUNTER32 , BER_TYPE_INT); |
470 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_COUNTER32 , BER_TYPE_INT); |
471 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_UNSIGNED32, BER_TYPE_INT); |
471 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_UNSIGNED32, BER_TYPE_INT); |
472 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_TIMETICKS , BER_TYPE_INT); |
472 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_TIMETICKS , BER_TYPE_INT); |
473 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_OPAQUE , BER_TYPE_IPADDRESS); |
|
|
474 | |
473 | |
475 | =head2 DEBUGGING |
474 | =head2 DEBUGGING |
476 | |
475 | |
477 | To aid debugging, you cna call the C<ber_dump> function to print a "nice" |
476 | To aid debugging, you cna call the C<ber_dump> function to print a "nice" |
478 | representation to STDOUT. |
477 | representation to STDOUT. |
… | |
… | |
733 | |
732 | |
734 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_IPADDRESS , BER_TYPE_IPADDRESS); |
733 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_IPADDRESS , BER_TYPE_IPADDRESS); |
735 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_COUNTER32 , BER_TYPE_INT); |
734 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_COUNTER32 , BER_TYPE_INT); |
736 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_UNSIGNED32, BER_TYPE_INT); |
735 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_UNSIGNED32, BER_TYPE_INT); |
737 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_TIMETICKS , BER_TYPE_INT); |
736 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_TIMETICKS , BER_TYPE_INT); |
738 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_OPAQUE , BER_TYPE_IPADDRESS); |
737 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_OPAQUE , BER_TYPE_BYTES); |
739 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_COUNTER64 , BER_TYPE_INT); |
738 | $SNMP_PROFILE->set (ASN_APPLICATION, SNMP_COUNTER64 , BER_TYPE_INT); |
740 | |
739 | |
741 | =head2 LIMITATIONS/NOTES |
740 | =head2 LIMITATIONS/NOTES |
742 | |
741 | |
743 | This module can only en-/decode 64 bit signed and unsigned integers, and |
742 | This module can only en-/decode 64 bit signed and unsigned integers, and |
744 | only when your perl supports those. So no UUID OIDs for now (unless you |
743 | only when your perl supports those. So no UUID OIDs for now (unless you |
745 | map the C<OBJECT IDENTIFIER> tag to something other than C<BER_TYPE_OID>). |
744 | map the C<OBJECT IDENTIFIER> tag to something other than C<BER_TYPE_OID>). |
746 | |
745 | |
747 | This module does not generally care about ranges, i.e. it will happily |
746 | This module does not generally care about ranges, i.e. it will happily |
748 | de-/encode 64 bit integers into an C<ASN_INTEGER> value, or a negative |
747 | de-/encode 64 bit integers into an C<SNMP_UNSIGNED32> value, or a negative |
749 | number into an C<SNMP_COUNTER64>. |
748 | number into an C<SNMP_COUNTER64>. |
750 | |
749 | |
751 | OBJECT IDENTIFIEERs cannot have unlimited length, although the limit is |
750 | OBJECT IDENTIFIEERs cannot have unlimited length, although the limit is |
752 | much larger than e.g. the one imposed by SNMP or other protocols, and is |
751 | much larger than e.g. the one imposed by SNMP or other protocols, and is |
753 | about 4kB. |
752 | about 4kB. |
754 | |
753 | |
755 | Indefinite length encoding is not supported. |
|
|
756 | |
|
|
757 | Constructed strings are decoded just fine, but there should be a way to |
754 | Constructed strings are decoded just fine, but there should be a way to |
758 | join them for convenience. |
755 | join them for convenience. |
759 | |
756 | |
760 | REAL values are not supported and will currently croak. |
757 | REAL values are not supported and will currently croak. |
761 | |
758 | |
762 | The encoder and decoder tend to accept more formats than should be |
|
|
763 | strictly supported - security sensitive applications are strongly advised |
|
|
764 | to review the code first. |
|
|
765 | |
|
|
766 | This module has undergone little to no testing so far. |
|
|
767 | |
|
|
768 | =head2 ITHREADS SUPPORT |
759 | =head2 ITHREADS SUPPORT |
769 | |
760 | |
770 | This module is unlikely to work when the (officially discouraged) ithreads |
761 | This module is unlikely to work when the (officially discouraged) ithreads |
771 | are in use. |
762 | are in use. |
772 | |
763 | |