YAZ  5.34.0
odr.h
Go to the documentation of this file.
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) Index Data.
3  * All rights reserved.
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of Index Data nor the names of its contributors
13  * may be used to endorse or promote products derived from this
14  * software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
33 #ifndef ODR_H
34 #define ODR_H
35 
36 #include <stdio.h>
37 #include <string.h>
38 
39 #include <yaz/yconfig.h>
40 #include <yaz/nmem.h>
41 
42 /* for definition of Odr_oid */
43 #include <yaz/oid_util.h>
44 
46 
49 #define ODR_INT_PRINTF NMEM_INT_PRINTF
50 
51 #ifndef bool_t
52 #define bool_t int
53 #endif
54 
55 /*
56  * Tag modes
57  */
58 #define ODR_NONE -1
59 #define ODR_IMPLICIT 0
60 #define ODR_EXPLICIT 1
61 
62 /*
63  * Classes
64  */
65 #define ODR_UNIVERSAL 0
66 #define ODR_APPLICATION 1
67 #define ODR_CONTEXT 2
68 #define ODR_PRIVATE 3
69 
70 /*
71  * UNIVERSAL tags
72  */
73 #define ODR_BOOLEAN 1
74 #define ODR_INTEGER 2
75 #define ODR_BITSTRING 3
76 #define ODR_OCTETSTRING 4
77 #define ODR_NULL 5
78 #define ODR_OID 6
79 #define ODR_ODESC 7
80 #define ODR_EXTERNAL 8
81 #define ODR_REAL 9
82 #define ODR_ENUM 10
83 #define ODR_SEQUENCE 16
84 #define ODR_SET 17
85 #define ODR_NUMERICSTRING 18
86 #define ODR_PRINTABLESTRING 19
87 #define ODR_GENERALIZEDTIME 24
88 #define ODR_GRAPHICSTRING 25
89 #define ODR_VISIBLESTRING 26
90 #define ODR_GENERALSTRING 27
91 
92 /*
93  * odr stream directions
94  */
95 #define ODR_DECODE 0
96 #define ODR_ENCODE 1
97 #define ODR_PRINT 2
98 
99 typedef struct odr_oct
100 {
101  char *buf;
102  int len;
104 
105 typedef void Odr_null;
106 extern Odr_null *ODR_NULLVAL;
107 
108 typedef Odr_oct Odr_any;
109 
110 typedef struct odr_bitmask
111 {
112 #define ODR_BITMASK_SIZE 256
114  int top;
116 
117 #define ODR_S_SET 0
118 #define ODR_S_CUR 1
119 #define ODR_S_END 2
120 
121 typedef struct odr *ODR;
122 
124 struct odr
125 {
126  int direction; /* the direction of this stream */
127 
128  int error; /* current error state (0==OK) */
129 
130  NMEM mem; /* memory handle for decoding (primarily) */
131 
132  struct Odr_private *op;
133 };
134 
135 typedef int (*Odr_fun)(ODR, char **, int, const char *);
136 
137 typedef struct odr_arm
138 {
139  int tagmode;
140  int zclass;
141  int tag;
142  int which;
144  char *name;
146 
147 /*
148  * Error control.
149  */
150 #define ONONE 0
151 #define OMEMORY 1
152 #define OSYSERR 2
153 #define OSPACE 3
154 #define OREQUIRED 4
155 #define OUNEXPECTED 5
156 #define OOTHER 6
157 #define OPROTO 7
158 #define ODATA 8
159 #define OSTACK 9
160 #define OCONLEN 10
161 #define OLENOV 11
162 #define OHTTP 12
163 
164 extern char *odr_errlist[];
165 
166 YAZ_EXPORT int odr_offset(ODR o);
167 YAZ_EXPORT int odr_geterror(ODR o);
168 YAZ_EXPORT int odr_geterrorx(ODR o, int *x);
169 YAZ_EXPORT void odr_seterror(ODR o, int errorno, int errorid);
170 YAZ_EXPORT void odr_setelement(ODR o, const char *addinfo);
171 YAZ_EXPORT const char *odr_getelement(ODR o);
172 YAZ_EXPORT void odr_perror(ODR o, const char *message);
173 YAZ_EXPORT void odr_setprint(ODR o, FILE *file);
174 YAZ_EXPORT void odr_setprint_noclose(ODR o, FILE *file);
175 YAZ_EXPORT ODR odr_createmem(int direction);
176 YAZ_EXPORT void odr_reset(ODR o);
177 YAZ_EXPORT void odr_destroy(ODR o);
178 YAZ_EXPORT void odr_setbuf(ODR o, char *buf, int len, int can_grow);
179 YAZ_EXPORT char *odr_getbuf(ODR o, int *len, int *size);
180 YAZ_EXPORT void *odr_malloc(ODR o, size_t size);
181 YAZ_EXPORT char *odr_strdup(ODR o, const char *str);
182 YAZ_EXPORT char *odr_strdupn(ODR o, const char *str, size_t n);
183 YAZ_EXPORT char *odr_strdup_null(ODR o, const char *str);
184 YAZ_EXPORT Odr_int *odr_intdup(ODR o, Odr_int v);
185 YAZ_EXPORT Odr_bool *odr_booldup(ODR o, Odr_bool v);
186 YAZ_EXPORT Odr_oct *odr_create_Odr_oct(ODR o, const char *buf, int sz);
187 YAZ_EXPORT NMEM odr_extract_mem(ODR o);
188 YAZ_EXPORT Odr_null *odr_nullval(void);
189 #define odr_release_mem(m) nmem_destroy(m)
190 #define ODR_MEM NMEM
191 
192 #define odr_implicit_tag(o, t, p, cl, tg, opt, name)\
193  (odr_implicit_settag((o), cl, tg), t ((o), (p), (opt), name) )
194 
195 #define odr_explicit_tag(o, t, p, cl, tg, opt, name)\
196  ((int) (odr_constructed_begin((o), (p), (cl), (tg), 0) ? \
197  t ((o), (p), (opt), name) &&\
198  odr_constructed_end(o) : odr_missing((o), opt, name)))
199 
200 #define ODR_MASK_ZERO(mask)\
201  ((void) (memset((mask)->bits, 0, ODR_BITMASK_SIZE),\
202  (mask)->top = -1))
203 
204 #define ODR_MASK_SET(mask, num)\
205  (((mask)->bits[(num) >> 3] |= 0X80 >> ((num) & 0X07)),\
206  (void) ((mask)->top < (num) >> 3 ? ((mask)->top = (num) >> 3) : 0))
207 
208 #define ODR_MASK_CLEAR(mask, num)\
209  ((mask)->bits[(num) >> 3] &= ~(0X80 >> ((num) & 0X07)))
210 
211 #define ODR_MASK_GET(mask, num) ( ((num) >> 3 <= (mask)->top) ? \
212  ((mask)->bits[(num) >> 3] & (0X80 >> ((num) & 0X07)) ? 1 : 0) : 0)
213 
214 
215 #define odr_ok(o) (!(o)->error)
216 #define odr_getmem(o) ((o)->mem)
217 
218 #define ODR_MAXNAME 256
219 
220 YAZ_EXPORT int ber_boolean(ODR o, int *val);
221 YAZ_EXPORT int ber_tag(ODR o, void *p, int zclass, int tag,
222  int *constructed, int opt, const char *name);
223 YAZ_EXPORT int ber_enctag(ODR o, int zclass, int tag, int constructed);
224 YAZ_EXPORT int ber_dectag(const char *buf, int *zclass,
225  int *tag, int *constructed, int max);
226 YAZ_EXPORT int odr_bool(ODR o, Odr_bool **p, int opt, const char *name);
227 YAZ_EXPORT int odr_integer(ODR o, Odr_int **p, int opt, const char *name);
228 YAZ_EXPORT int odr_enum(ODR o, Odr_int **p, int opt, const char *name);
229 YAZ_EXPORT int odr_implicit_settag(ODR o, int zclass, int tag);
230 YAZ_EXPORT int ber_enclen(ODR o, int len, int lenlen, int exact);
231 YAZ_EXPORT int ber_declen(const char *buf, int *len, int max);
232 YAZ_EXPORT void odr_prname(ODR o, const char *name);
233 YAZ_EXPORT int ber_null(ODR o);
234 YAZ_EXPORT int odr_null(ODR o, Odr_null **p, int opt, const char *name);
235 YAZ_EXPORT int ber_integer(ODR o, Odr_int *val);
236 YAZ_EXPORT int odr_constructed_begin(ODR o, void *p, int zclass, int tag,
237  const char *name);
238 YAZ_EXPORT int odr_constructed_end(ODR o);
239 YAZ_EXPORT int odr_sequence_begin(ODR o, void *p, int size, const char *name);
240 YAZ_EXPORT int odr_set_begin(ODR o, void *p, int size, const char *name);
241 YAZ_EXPORT int odr_sequence_end(ODR o);
242 YAZ_EXPORT int odr_set_end(ODR o);
243 YAZ_EXPORT int ber_octetstring(ODR o, Odr_oct *p, int cons);
244 YAZ_EXPORT int odr_octetstring(ODR o, Odr_oct **p, int opt, const char *name);
245 YAZ_EXPORT int odp_more_chunks(ODR o, const char *base, int len);
246 YAZ_EXPORT int odr_constructed_more(ODR o);
247 YAZ_EXPORT int odr_bitstring(ODR o, Odr_bitmask **p, int opt,
248  const char *name);
249 YAZ_EXPORT int ber_bitstring(ODR o, Odr_bitmask *p, int cons);
250 YAZ_EXPORT int odr_generalstring(ODR o, char **p, int opt, const char *name);
251 YAZ_EXPORT int ber_oidc(ODR o, Odr_oid *p, int max_oid_size);
252 YAZ_EXPORT int odr_oid(ODR o, Odr_oid **p, int opt, const char *name);
253 YAZ_EXPORT int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp,
254  const char *name);
255 YAZ_EXPORT int odr_cstring(ODR o, char **p, int opt, const char *name);
256 YAZ_EXPORT int odr_iconv_string(ODR o, char **p, int opt, const char *name);
257 YAZ_EXPORT int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num,
258  const char *name);
259 YAZ_EXPORT int odr_set_of(ODR o, Odr_fun type, void *p, int *num,
260  const char *name);
261 YAZ_EXPORT int odr_any(ODR o, Odr_any **p, int opt, const char *name);
262 
263 YAZ_EXPORT int ber_any(ODR o, Odr_any **p);
270 YAZ_EXPORT int completeBER(const char *buf, int len);
271 
272 YAZ_EXPORT void odr_begin(ODR o);
273 YAZ_EXPORT void odr_end(ODR o);
274 YAZ_EXPORT Odr_oid *odr_oiddup(ODR odr, const Odr_oid *o);
275 YAZ_EXPORT Odr_oid *odr_oiddup_nmem(NMEM nmem, const Odr_oid *o);
276 YAZ_EXPORT int odr_grow_block(ODR b, int min_bytes);
277 YAZ_EXPORT int odr_write(ODR o, const char *buf, int bytes);
278 YAZ_EXPORT int odr_seek(ODR o, int whence, int offset);
279 YAZ_EXPORT int odr_dumpBER(FILE *f, const char *buf, int len);
280 YAZ_EXPORT void odr_choice_bias(ODR o, int what);
281 YAZ_EXPORT void odr_choice_enable_bias(ODR o, int mode);
282 YAZ_EXPORT size_t odr_total(ODR o);
283 YAZ_EXPORT char *odr_errmsg(int n);
284 YAZ_EXPORT Odr_oid *odr_getoidbystr(ODR o, const char *str);
285 YAZ_EXPORT Odr_oid *odr_getoidbystr_nmem(NMEM o, const char *str);
286 
287 YAZ_EXPORT int odr_initmember(ODR o, void *p, int size);
288 YAZ_EXPORT int odr_peektag(ODR o, int *zclass, int *tag, int *cons);
289 YAZ_EXPORT void odr_setlenlen(ODR o, int len);
290 YAZ_EXPORT int odr_missing(ODR o, int opt, const char *name);
291 YAZ_EXPORT char *odr_prepend(ODR o, const char *prefix, const char *old);
292 
293 typedef struct Odr_external
294 {
295  Odr_oid *direct_reference; /* OPTIONAL */
296  Odr_int *indirect_reference; /* OPTIONAL */
297  char *descriptor; /* OPTIONAL */
298  int which;
299 #define ODR_EXTERNAL_single 0
300 #define ODR_EXTERNAL_octet 1
301 #define ODR_EXTERNAL_arbitrary 2
302  union
303  {
306  Odr_bitmask *arbitrary; /* we aren't really equipped for this*/
307  } u;
309 
310 YAZ_EXPORT int odr_external(ODR o, Odr_external **p, int opt,
311  const char *name);
312 YAZ_EXPORT int odr_visiblestring(ODR o, char **p, int opt,
313  const char *name);
314 YAZ_EXPORT int odr_graphicstring(ODR o, char **p, int opt,
315  const char *name);
316 YAZ_EXPORT int odr_generalizedtime(ODR o, char **p, int opt,
317  const char *name);
318 
319 YAZ_EXPORT int odr_set_charset(ODR o, const char *to, const char *from);
320 
321 YAZ_EXPORT void odr_set_stream(ODR o, void *handle,
322  void (*stream_write)(ODR o,
323  void *handle,
324  int type,
325  const char *buf,
326  int len),
327  void (*stream_close)(void *handle));
328 
329 YAZ_EXPORT void odr_printf(ODR o, const char *fmt, ...);
330 
331 YAZ_EXPORT const char **odr_get_element_path(ODR o);
332 
333 YAZ_EXPORT Odr_int odr_atoi(const char *s);
334 
335 YAZ_EXPORT Odr_int odr_strtol(const char *nptr, char **endptr, int base);
336 
338 
339 #include <yaz/xmalloc.h>
340 
341 #endif
342 /*
343  * Local variables:
344  * c-basic-offset: 4
345  * c-file-style: "Stroustrup"
346  * indent-tabs-mode: nil
347  * End:
348  * vim: shiftwidth=4 tabstop=8 expandtab
349  */
350 
int opt
Definition: initopt.c:19
char * name
Definition: initopt.c:18
enum l_file_type type
Definition: log.c:47
Header for Nibble Memory functions.
int nmem_bool_t
BER/utility boolean.
Definition: nmem.h:71
long long int nmem_int_t
Definition: nmem.h:59
void odr_perror(ODR o, const char *message)
Definition: odr.c:57
void odr_setprint_noclose(ODR o, FILE *file)
Definition: odr.c:169
int odr_constructed_more(ODR o)
Definition: odr_cons.c:136
const char ** odr_get_element_path(ODR o)
Definition: odr.c:95
int odr_set_begin(ODR o, void *p, int size, const char *name)
Definition: odr_seq.c:38
void odr_setelement(ODR o, const char *addinfo)
Definition: odr.c:125
int odr_generalizedtime(ODR o, char **p, int opt, const char *name)
Definition: odr_use.c:63
int odr_null(ODR o, Odr_null **p, int opt, const char *name)
Definition: odr_null.c:19
int ber_oidc(ODR o, Odr_oid *p, int max_oid_size)
Definition: ber_oid.c:19
nmem_bool_t Odr_bool
Definition: odr.h:48
NMEM odr_extract_mem(ODR o)
Definition: odr_mem.c:23
int completeBER(const char *buf, int len)
determine whether a buffer is a complete BER buffer
Definition: ber_any.c:123
int odr_initmember(ODR o, void *p, int size)
Definition: odr_tag.c:44
int odr_iconv_string(ODR o, char **p, int opt, const char *name)
Definition: odr_oct.c:107
int odr_sequence_of(ODR o, Odr_fun type, void *p, int *num, const char *name)
Definition: odr_seq.c:134
Odr_null * ODR_NULLVAL
Definition: odr.c:28
void odr_choice_bias(ODR o, int what)
Definition: odr_choice.c:90
Odr_oct Odr_any
Definition: odr.h:108
int odr_any(ODR o, Odr_any **p, int opt, const char *name)
Definition: odr_any.c:23
struct odr * ODR
Definition: odr.h:121
int ber_declen(const char *buf, int *len, int max)
Definition: ber_len.c:93
int odr_sequence_end(ODR o)
Definition: odr_seq.c:61
int odr_geterrorx(ODR o, int *x)
Definition: odr.c:83
nmem_int_t Odr_int
Definition: odr.h:47
struct odr_bitmask Odr_bitmask
void odr_begin(ODR o)
int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp, const char *name)
Definition: odr_choice.c:17
int odr_geterror(ODR o)
Definition: odr.c:78
int odr_sequence_begin(ODR o, void *p, int size, const char *name)
Definition: odr_seq.c:15
void odr_prname(ODR o, const char *name)
Definition: odr_util.c:18
int odr_offset(ODR o)
Definition: odr.c:285
struct Odr_external Odr_external
struct odr_oct Odr_oct
int odr_grow_block(ODR b, int min_bytes)
Definition: odr_mem.c:77
int odr_constructed_begin(ODR o, void *p, int zclass, int tag, const char *name)
Definition: odr_cons.c:24
int ber_dectag(const char *buf, int *zclass, int *tag, int *constructed, int max)
Decodes BER identifier octets.
Definition: ber_tag.c:165
Odr_oid * odr_getoidbystr_nmem(NMEM o, const char *str)
Definition: odr_util.c:65
size_t odr_total(ODR o)
Definition: odr_mem.c:61
int odr_peektag(ODR o, int *zclass, int *tag, int *cons)
Definition: odr_tag.c:15
int odr_integer(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_int.c:19
ODR odr_createmem(int direction)
Definition: odr.c:200
#define ODR_BITMASK_SIZE
Definition: odr.h:112
int ber_integer(ODR o, Odr_int *val)
Definition: ber_int.c:33
char * odr_errmsg(int n)
Definition: odr.c:52
int odr_generalstring(ODR o, char **p, int opt, const char *name)
Definition: odr_use.c:51
int odr_missing(ODR o, int opt, const char *name)
Definition: odr_util.c:82
int odr_set_charset(ODR o, const char *to, const char *from)
Definition: odr.c:185
char * odr_strdupn(ODR o, const char *str, size_t n)
Definition: odr_mem.c:46
int odp_more_chunks(ODR o, const char *base, int len)
Definition: odr_util.c:29
int(* Odr_fun)(ODR, char **, int, const char *)
Definition: odr.h:135
Odr_int odr_atoi(const char *s)
Definition: odr_mem.c:146
int odr_constructed_end(ODR o)
Definition: odr_cons.c:148
int ber_enclen(ODR o, int len, int lenlen, int exact)
Definition: ber_len.c:30
int odr_dumpBER(FILE *f, const char *buf, int len)
Definition: dumpber.c:129
void odr_setbuf(ODR o, char *buf, int len, int can_grow)
Definition: odr.c:267
void odr_setlenlen(ODR o, int len)
Definition: odr_cons.c:19
void Odr_null
Definition: odr.h:105
int ber_enctag(ODR o, int zclass, int tag, int constructed)
BER-encode a zclass/tag/constructed package (identifier octets).
Definition: ber_tag.c:123
struct odr_arm Odr_arm
int ber_null(ODR o)
Definition: ber_null.c:22
Odr_bool * odr_booldup(ODR o, Odr_bool v)
Definition: odr_mem.c:56
char * odr_strdup_null(ODR o, const char *str)
Definition: odr_mem.c:41
int odr_octetstring(ODR o, Odr_oct **p, int opt, const char *name)
Definition: odr_oct.c:19
void odr_choice_enable_bias(ODR o, int mode)
Definition: odr_choice.c:96
int odr_bool(ODR o, Odr_bool **p, int opt, const char *name)
Definition: odr_bool.c:21
void odr_setprint(ODR o, FILE *file)
Definition: odr.c:164
int odr_implicit_settag(ODR o, int zclass, int tag)
Definition: odr_tag.c:32
int ber_any(ODR o, Odr_any **p)
Definition: ber_any.c:21
char * odr_strdup(ODR o, const char *str)
Definition: odr_mem.c:36
Odr_oid * odr_oiddup(ODR odr, const Odr_oid *o)
Definition: odr_util.c:60
int odr_enum(ODR o, Odr_int **p, int opt, const char *name)
Definition: odr_enum.c:19
int odr_bitstring(ODR o, Odr_bitmask **p, int opt, const char *name)
Definition: odr_bit.c:22
int odr_oid(ODR o, Odr_oid **p, int opt, const char *name)
Definition: odr_oid.c:20
int odr_seek(ODR o, int whence, int offset)
Definition: odr_mem.c:117
int odr_set_end(ODR o)
Definition: odr_seq.c:66
char * odr_prepend(ODR o, const char *prefix, const char *old)
Definition: odr_util.c:103
Odr_null * odr_nullval(void)
Definition: odr.c:30
Odr_oid * odr_oiddup_nmem(NMEM nmem, const Odr_oid *o)
Definition: odr_util.c:47
int odr_set_of(ODR o, Odr_fun type, void *p, int *num, const char *name)
Definition: odr_seq.c:124
int odr_write(ODR o, const char *buf, int bytes)
Definition: odr_mem.c:98
int odr_visiblestring(ODR o, char **p, int opt, const char *name)
Definition: odr_use.c:41
int ber_bitstring(ODR o, Odr_bitmask *p, int cons)
Definition: ber_bit.c:20
Odr_oid * odr_getoidbystr(ODR o, const char *str)
Definition: odr_util.c:77
void odr_set_stream(ODR o, void *handle, void(*stream_write)(ODR o, void *handle, int type, const char *buf, int len), void(*stream_close)(void *handle))
Definition: odr.c:174
int odr_graphicstring(ODR o, char **p, int opt, const char *name)
Definition: odr_use.c:57
int ber_octetstring(ODR o, Odr_oct *p, int cons)
Definition: ber_oct.c:22
char * odr_getbuf(ODR o, int *len, int *size)
Definition: odr.c:277
void odr_end(ODR o)
Odr_int odr_strtol(const char *nptr, char **endptr, int base)
Definition: odr_mem.c:132
int odr_external(ODR o, Odr_external **p, int opt, const char *name)
Definition: odr_use.c:15
int ber_tag(ODR o, void *p, int zclass, int tag, int *constructed, int opt, const char *name)
Encode/decode BER tags.
Definition: ber_tag.c:34
const char * odr_getelement(ODR o)
Definition: odr.c:90
Odr_int * odr_intdup(ODR o, Odr_int v)
Definition: odr_mem.c:51
void odr_destroy(ODR o)
Definition: odr.c:253
void * odr_malloc(ODR o, size_t size)
Definition: odr_mem.c:31
void odr_seterror(ODR o, int errorno, int errorid)
Definition: odr.c:118
void odr_reset(ODR o)
Definition: odr.c:226
Odr_oct * odr_create_Odr_oct(ODR o, const char *buf, int sz)
Definition: odr_mem.c:66
int odr_cstring(ODR o, char **p, int opt, const char *name)
Definition: odr_oct.c:60
char * odr_errlist[]
Definition: odr.c:35
int ber_boolean(ODR o, int *val)
Definition: ber_bool.c:21
void odr_printf(ODR o, const char *fmt,...)
Definition: odr.c:290
Header for OID basic functions.
short Odr_oid
Definition: oid_util.h:42
union Odr_external::@26 u
Odr_oid * direct_reference
Definition: odr.h:295
char * descriptor
Definition: odr.h:297
int which
Definition: odr.h:298
Odr_oct * octet_aligned
Definition: odr.h:305
Odr_int * indirect_reference
Definition: odr.h:296
Odr_bitmask * arbitrary
Definition: odr.h:306
Odr_any * single_ASN1_type
Definition: odr.h:304
ODR private data.
Definition: odr-priv.h:83
Definition: odr.h:138
int tagmode
Definition: odr.h:139
int which
Definition: odr.h:142
int zclass
Definition: odr.h:140
int tag
Definition: odr.h:141
char * name
Definition: odr.h:144
Odr_fun fun
Definition: odr.h:143
char bits[ODR_BITMASK_SIZE]
Definition: odr.h:113
int top
Definition: odr.h:114
Definition: odr.h:100
int len
Definition: odr.h:102
char * buf
Definition: odr.h:101
Definition: odr.h:125
struct Odr_private * op
Definition: odr.h:132
int error
Definition: odr.h:128
int direction
Definition: odr.h:126
NMEM mem
Definition: odr.h:130
Header for memory handling functions.
Header with fundamental macros.
#define YAZ_BEGIN_CDECL
Definition: yconfig.h:56
#define YAZ_END_CDECL
Definition: yconfig.h:57