Invalid ASN.1 file?
I'm kind of new to ASN.1, so I don't know if I have invalid files or if I just don't know what I'm doing.
I've found an ASN file for parsing H245 messages here. There are a lot of "..." sections that appear to break the compiler I'm using (BinaryNotes). If I remove the "..." entries, I can get it to compile. Is开发者_运维百科 that what I'm supposed to do?
I'm running into other problems when decoding and I'd like to make sure this isn't the cause of those issues.
The "..." indicates that the structure (sequence, choice etc.) can be expanded in a future version, i.e. more fields can be added after the "...". The ASN.1 decoder must be able to successfully read the data even if these additional fields are inserted. It is allowed to ignore the new fields.
The ASN file you are processing has already made use of the expansion. It is no longer version 1 as there are fields after the "..." in certain places.
Removing the "..." is a short-term solution. You will run into problems when the structures are expanded again because your decoder is likely to stumble over the new fields.
精彩评论