jc@minya.UUCP (John Chambers) (03/06/91)
For some time now, I've been trying to get together in one .h file a definitive list of the ASN.1 type codes. This isn't easy. I found some of them in an OSI doc. (8825? It's at work and I'm not, so I'm probably not remembering the number right.) Others appear in various programs' .h files around where I'm working. I'm generally not too sure that everything I see is even correct. For instance, I've seen several .h files define an IP Address type: #define IPID 0x40 which I suspect is not really an ISO standard; then again maybe it is, but I've yet to find this code in any ISO document. Has ISO published the obvious table anywhere? Have I been staring at it all along and not recognizing it? Can someone tell me where to RTFM to find it? Or is it all just folklore? Particularly interesting would be some sort of coherent explanation of how ISO (OSI?) addressing is really supposed to work; especially how one might recognize (i.e., parse) one in a message, and what is legal to generate in a message. Note that I'm not particularly interested in the symbolic meta-language used in most ISO documents. I need to generate and parse actual packets as they appear on the network. So far, the meta-language has been not very useful in tackling this job. A table of hex codes would be much more valuable... [BTW, is there an ISO FAQ file somewhere? I've yet to see one.] -- All opinions Copyright (c) 1991 by John Chambers. Inquire for licensing at: Home: 1-617-484-6393 Work: 1-508-486-5475 Uucp: ...!{bu.edu,harvard.edu,ima.com,eddie.mit.edu,ora.com}!minya!jc
jas@proteon.com (John A. Shriver) (03/07/91)
IPID is probably defined in SNMP SMI (RFC 1155).
hta@isolde.er.sintef.no (Harald Tveit Alvestrand) (03/08/91)
In article <544@minya.UUCP>, jc@minya.UUCP (John Chambers) writes: |> For some time now, I've been trying to get together in one .h file a |> definitive list of the ASN.1 type codes. Your effort may be doomed to failure..... I assume that by "type code" you mean "tag value". First you have to understand the tag system. There are 4 kinds of tags. The UNIVERSAL tags are *all* defined (by law!) in ISO 8824, the ASN.1 standard. The APPLICATION tags are defined in the individual standards. For example, tag APPLICATION 1 means "CountryName" in X.400, while it means (probably) something completely different in the other standard you are looking at. So, the answer to "what is APPLICATION xx" is the question "What standard are you conforming to?" The CONTEXT tags are defined by context; doing them in a global .h file is pretty near useless. The PRIVATE tags are NOT defined by any standard. In fact, I have yet to find anybody using them seriously for information interchange...... Besides, you do not want to use HEX values when listing the tag values in anything but .h files: 0x40 means "[APPLICATION 0]", but ONLY IF we take the simplifying assumption that it is encoded using BER, where the first and second bits encode the tag class. Clearer? -- Harald Tveit Alvestrand Harald.Alvestrand@elab-runit.sintef.no C=no;PRMD=uninett;O=sintef;OU=elab-runit;S=alvestrand;G=harald +47 7 59 70 94