2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: odr_null.c,v 1.6 2005-06-25 15:46:04 adam Exp $
9 * \brief Implements ODR NULL codec
18 * Top level null en/decoder.
19 * Returns 1 on success, 0 on error.
21 int odr_null(ODR o, Odr_null **p, int opt, const char *name)
29 o->t_class = ODR_UNIVERSAL;
32 if ((res = ber_tag(o, p, o->t_class, o->t_tag, &cons, opt, name)) < 0)
35 return odr_missing(o, opt, name);
36 if (o->direction == ODR_PRINT)
39 odr_printf(o, "NULL\n");
44 #ifdef ODR_STRICT_NULL
45 odr_seterror(OPROTO, 42);
48 /* Warning: Bad NULL */
51 if (o->direction == ODR_DECODE)
58 * indent-tabs-mode: nil
60 * vim: shiftwidth=4 tabstop=8 expandtab