Skip to content

Convert::ASN1 just doesn't seem to handle MIBs at all #10

Open
@SineSwiper

Description

@SineSwiper
use Convert::ASN1;
use Data::Dump;

my $asn = Convert::ASN1->new;
$asn->prepare_file('snmpv2.mib');
dd $asn->error;
$asn->prepare_file('snmpv2-tc.mib');
dd $asn->error;
$asn->prepare_file('snmpv2-smi.mib');
dd $asn->error;
$asn->prepare('
org            OBJECT IDENTIFIER ::= { iso 3 }  --  "iso" = 1
dod            OBJECT IDENTIFIER ::= { org 6 }
internet       OBJECT IDENTIFIER ::= { dod 1 }
');
dd $asn->error;
$asn->prepare('
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
');
dd $asn->error;

# Outputs...
"syntax error ::= BEGIN\n\nIMPORTS\n    MODULE-IDENTITY, \n"
"syntax error ::= BEGIN\n\nIMPORTS\n    TimeTicks        \n"
"syntax error ::= BEGIN\n\n-- the path to the root\n\norg \n"
"syntax error ::= { iso 3 }  --  \"iso\" = 1\ndod        \n"
"Parse error before (SIZE(11 | 13))\n\n"

I can't seem to make any progress in getting C:A to parse a full or partial MIB, even with the basic, low-level SNMPv2 standards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions