-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse error #11
Comments
I'm sorry if there has been some misunderstanding, but this library was never meant to support the full extent of ASN.1 notation, only the subset explicitly used for SMI v1 and v2. I might look into a more extensive parser in the future, but that would likely be within a separate library. |
@sleepinggenius2 thank you, I'm glad I asked. For context, I am writing a draft for a network protocol that would interface with such resources (SMI or ideally ASN.1 in general), and am trying to find a suitable "base" upon which to start. Thanks for your time! |
I'm not entirely sure what you are trying to accomplish, but there are certainly a number of protocols out there that currently use ASN.1 for their encoding. SNMP and LDAP are two that I can think of off the top of my head. They generally use a binary encoding though, like BER or DER, for efficiency on the wire. I'm guessing you're looking to utilize the textual notation to define the schema, kind of like you would do with protocol buffers? |
No, not encoding ... but access. Basically, I was working on implementing something like this in Go. This is what SMI documentation refers to as the SMI Protocol Server, which as you can see was never really done (but allegedly was planned a long time ago)... The core drive here (for me) is to make something available that allows for not only storage of SMI/MID/OID information, but also the querying/searching of this data. Yes I am well aware there are OID websites that allow this kind of activity, but afaik those are all proprietary. My intent was to attempt to give people another option they could use themselves (not to mention a facility for use internally, say within an organization). |
Thanks, take care now. |
Hi
Using two well-known ITU-T ASN.1 modules:
FROM
each other!... I am unable to load said modules using the
cmd/smi/main.go
example file.This has been tried by combining the above two files into one (and swapping the order), as well as keeping them separate. In the case of separation, we receive lots of "cannot import" messages but I believe that behavior may be expected due to the nature of how these two modules relate to one another.
The error:
I know it is reading the file, as I can see the offending line (on my concatenated copy, its line 36):
I realize these aren't "
MIB
s" per se, but they still contain valid ASN.1 that, by all rites, should be OK to parse.I can even take these modules, concatenate them together and parse them via OSS Nokalva's ASN.1 Playground (see here). This includes STRICT checking enabled.
I have no issues parsing my
/var/lib/snmp/mibs/ietf
,/var/lib/snmp/mibs/iana
folder contents, aside from a few known (and accurate) reports of invalid SNMP MIBs present on certain GNU OS releases throughout the years (e.g: SNMPv2-TC). Such cases I could confidently disregard as a result.I am thus wondering if:
gosmi
terms -or- if you believe this violates the precepts and goals upon whichgosmi
was designed, and ...Thank you
subcon42
PS --
For reference, here is "healthy" output from the aforementioned OSS Nokalva ASN.1 Playground "concatenated parse job":
The text was updated successfully, but these errors were encountered: