4 * This header contains the entry points into the modules
5 * which dump MIB modules in various output format.
7 * Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
8 * Copyright (c) 1999 J. Schoenwaelder, Technical University of Braunschweig.
10 * See the file "COPYING" for information on usage and redistribution
11 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * @(#) $Id: smidump.h 7870 2008-03-11 19:29:58Z schoenw $
24 * The following flags can be passed to output drivers in the flags
25 * member of the struct above.
28 #define SMIDUMP_FLAG_SILENT 0x01 /* suppress comments */
29 #define SMIDUMP_FLAG_UNITE 0x02 /* generated united output */
30 #define SMIDUMP_FLAG_ERROR 0x04 /* parser hit serious parse errors */
34 * Driver capability flags which are used to warn about options not
35 * understood by a particular output driver.
38 #define SMIDUMP_DRIVER_CANT_UNITE 0x02
39 #define SMIDUMP_DRIVER_CANT_OUTPUT 0x04
44 * The data structure which represents a driver specific option.
45 * A static array of these options (with the last option's type
46 * being OPT_END) is used in SmidumpDriver.
47 * The SmidumpDriverOption structure is based on shhopt.h:optStruct.
50 typedef struct SmidumpDriverOption {
56 } SmidumpDriverOption;
61 * The data structure which represents the entry point for an output
62 * driver. The ignflags contain the driver capabilities as described
66 typedef struct SmidumpDriver {
67 char *name; /* Name of the output driver. */
68 void (*func) (int, SmiModule **, /* Output generating function. */
70 int smiflags; /* Flags for the SMI parser. */
71 int ignflags; /* Output driver flags ignored. */
72 char *descr; /* Short description. */
73 SmidumpDriverOption *opt; /* Driver specific options. */
74 struct SmidumpDriver *next;
80 * The entry points for the output drivers that currently exist for
84 extern void initSmi(void);
85 extern void initSming(void);
86 extern void initSppi(void);
87 extern void initSvg(void);
88 extern void initImports(void);
89 extern void initTypes(void);
90 extern void initTree(void);
91 extern void initIdentifiers(void);
92 extern void initMetrics(void);
93 extern void initMosy(void);
94 extern void initXml(void);
95 extern void initCorba(void);
96 extern void initCm(void);
97 extern void initNetsnmp(void);
98 extern void initJax(void);
99 extern void initPython(void);
100 extern void initPerl(void);
101 extern void initScli(void);
102 extern void initXsd(void);
103 extern void initSizes(void);
104 extern void initCompliances(void);
105 extern void initYang(void);
106 extern void initBoilerplate(void);
108 extern void initSql(void);
109 extern void initFig(void);
113 * The functions are wrappers for the malloc functions which handle
114 * memory allocation errors by terminating the program.
117 extern void *xmalloc(size_t size);
118 extern void *xrealloc(void *ptr, size_t size);
119 extern void *xcalloc(size_t nmemb, size_t size);
120 extern char *xstrdup(const char *s);
121 extern void xfree(void *ptr);
123 extern void smidumpRegisterDriver(SmidumpDriver *driver);
125 #endif /* _SMIDUMP_H */