2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.3 1995-02-09 15:51:49 quinn
10 * Revision 1.2 1995/02/07 14:13:46 quinn
13 * Revision 1.1 1995/02/03 17:04:38 quinn
22 * Top level oid en/decoder.
23 * Returns 1 on success, 0 on error.
25 int odr_oid(ODR o, Odr_oid **p, int opt)
31 o->t_class = ODR_UNIVERSAL;
34 if (o->direction == ODR_DECODE)
36 if ((res = ber_tag(o, *p, o->t_class, o->t_tag, &cons)) < 0)
46 if (o->direction == ODR_PRINT)
48 fprintf(o->print, "%sOID\n", odr_indent(o));
51 if (o->direction == ODR_DECODE)
52 *p = nalloc(o, ODR_OID_SIZE);
53 return ber_oid(o, *p);