Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!ucbvax!bloom-beacon!eru!hagbard!sunic!ugle.unit.no!isolde!hta From: hta@isolde.er.sintef.no (Harald Tveit Alvestrand) Newsgroups: comp.protocols.iso Subject: Re: Just what are the ASN.1 type codes? Keywords: ASN.1, PER Message-ID: <1991Mar8.075541.4943@ugle.unit.no> Date: 8 Mar 91 07:55:41 GMT References: <544@minya.UUCP> Sender: hta@isolde (Harald Tveit Alvestrand) Reply-To: harald.alvestrand@elab-runit.sintef.no Distribution: comp.protocols.iso Organization: ELAB-RUNIT, SINTEF, Norway Lines: 33 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