lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

TextualConventionMacro.Syntax == null #663

Closed lextudio-support closed 2 hours ago

lextudio-support commented 2 hours ago

There seems to be a bug in the parser: TextualConventionMacro.Syntax is allways null.. Even DisplayString in SNMPv2-TC is not parsen correctly.

Can you please check and fix this bug, or tell me where and how it can be fixed?

Also the textual conventions are not mapped on the UnknownType class. But that can be achieved with the following code:

http://pastebin.com/XfMwxYas

Also the size is never parsed? OCTET STRING (SIZE (0..255))

Original Reported Date: 2012-07-03T06:49:58.713-07:00 Original CodePlex Discussion Thread ID: 361816

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

Thanks for reporting it. Will check it this weekend. To fix it you need to review the ANTLR grammar file (which may not be easy if you are not familiar with ANTLR).

Original Posted Date: 2012-07-03T19:52:11.66-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

I just checked in a new change set, https://github.com/lextudio/sharpsnmplib/commit/3cb1d12d1bf0027f0d19a66c51db0a962b53704a

In it, TextualConventionMacro.Syntax is no more null (it was parsed correctly, but not assigned to this property as expected).

Please test this change set and let me know if there is remaining issues.

Regards,

Lex

Original Posted Date: 2012-07-07T19:20:24.8-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

Works perfect, thanks!

Where can I the size of a syntax type? For example from: OCTET STRING (SIZE (0..255))

Original Posted Date: 2012-07-09T06:59:58.097-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

The size part should be parsed as a SizeConstraintElement object, but as you can see, I did not yet implement them.

It takes a while to review all related materials and determine what is the best way to implement the missing classes. Therefore, this has been left for

SNMP 8.0.

Lex

Original Posted Date: 2012-07-09T22:59:30.157-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

Is it possible that the constraint argument never contains data?

Original Posted Date: 2012-08-22T02:56:29.71-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

If you hava a chance to review the ASN.1 syntax reference, you will see if a constraint is set, it should be correct. Otherwise, it should never be there. However, in #SNMP 7.5, I don't have time to implement all such constraints (which are also never seriously used in 7.5 and below). So I left the place holders there.

Once I get my new laptop (maybe in early October), I will rebuild the development environment and start hacking on the compiler again. Hope we can see some amazing things then.

Regards,

Lex

Original Posted Date: 2012-08-31T06:40:01.47-07:00

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

The missing feature has been implemented, but in a commercial edition,

https://pro.sharpsnmp.com

Original Posted Date: 2014-02-01T04:00:19.827-08:00

lextudio-support commented 2 hours ago

Marked as Answer Date: 2013-10-06T04:12:28.857-07:00