Blame lib/data.h

Packit 022b05
/*
Packit 022b05
 * data.h --
Packit 022b05
 *
Packit 022b05
 *      Definitions for the main data structures.
Packit 022b05
 *
Packit 022b05
 * Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
Packit 022b05
 *
Packit 022b05
 * See the file "COPYING" for information on usage and redistribution
Packit 022b05
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Packit 022b05
 *
Packit 022b05
 * @(#) $Id: data.h 7966 2008-03-27 21:25:52Z schoenw $
Packit 022b05
 */
Packit 022b05
Packit 022b05
#ifndef _DATA_H
Packit 022b05
#define _DATA_H
Packit 022b05
Packit 022b05
Packit 022b05
#include <stdio.h>
Packit 022b05
Packit 022b05
#include "smi.h"
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct List {
Packit 022b05
    SmiElement      export;
Packit 022b05
    void	    *ptr;
Packit 022b05
    struct List	    *nextPtr;
Packit 022b05
} List;
Packit 022b05
Packit 022b05
typedef enum Kind {
Packit 022b05
    KIND_UNKNOWN	 = 0 ,  /*					     */
Packit 022b05
    KIND_MODULE		 = 1 ,  /*					     */
Packit 022b05
    KIND_MACRO		 = 2 ,  /*					     */
Packit 022b05
    KIND_TYPE		 = 3 ,  /*					     */
Packit 022b05
    KIND_OBJECT		 = 4 ,  /*					     */
Packit 022b05
    KIND_IMPORT		 = 5 ,  /* descriptors to be imported.               */
Packit 022b05
    KIND_IMPORTED	 = 6 ,  /* imported descriptor. syntax `mod.descr'.  */
Packit 022b05
    KIND_NOTFOUND	 = 7    /* to be imported, but not found             */
Packit 022b05
} Kind;
Packit 022b05
#define NUM_KINDS  7
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef unsigned short ParserFlags;
Packit 022b05
typedef unsigned short ModuleFlags;
Packit 022b05
typedef unsigned short ImportFlags;
Packit 022b05
typedef unsigned short ObjectFlags;
Packit 022b05
typedef unsigned short NodeFlags;
Packit 022b05
typedef unsigned short TypeFlags;
Packit 022b05
typedef unsigned short MacroFlags;
Packit 022b05
Packit 022b05
#define NODE_FLAG_ROOT		0x0001 /* mark node tree's root */
Packit 022b05
Packit 022b05
#define FLAG_SEQTYPE		0x0002 /* type is set from SMIv1/2 SEQUENCE. */
Packit 022b05
#define FLAG_REGISTERED		0x0004 /* On an Object: this is registered.  */
Packit 022b05
#define FLAG_INCOMPLETE		0x0008 /* Just defined by a forward          */
Packit 022b05
				       /* referenced type or object.         */
Packit 022b05
#define	FLAG_CREATABLE	        0x0040 /* On a Row: New rows can be created. */
Packit 022b05
#define FLAG_INGROUP		0x0080 /* Node is contained in a group.      */
Packit 022b05
#define	FLAG_INCOMPLIANCE	0x0100 /* Group is mentioned in a compliance
Packit 022b05
                                           statement.
Packit 022b05
					   In case of ImportFlags: the import
Packit 022b05
				           is done through a compliance
Packit 022b05
				           MODULE phrase.                    */
Packit 022b05
#define	FLAG_INSYNTAX		0x0200 /* Type is mentioned in a syntax
Packit 022b05
                                           statement.                        */
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct View {
Packit 022b05
    char	    *name;
Packit 022b05
    struct View	    *nextPtr;
Packit 022b05
    struct View	    *prevPtr;
Packit 022b05
} View;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Module {
Packit 022b05
    SmiModule	    export;
Packit 022b05
    time_t	    lastUpdated; /* only for SMIv2 modules */
Packit 022b05
    struct Object   *objectPtr;
Packit 022b05
    struct Object   *firstObjectPtr;
Packit 022b05
    struct Object   *lastObjectPtr;
Packit 022b05
    struct Type	    *firstTypePtr;
Packit 022b05
    struct Type	    *lastTypePtr;
Packit 022b05
    struct Class    *firstClassPtr;
Packit 022b05
    struct Class    *lastClassPtr;
Packit 022b05
    struct Macro    *firstMacroPtr;
Packit 022b05
    struct Macro    *lastMacroPtr;
Packit 022b05
    struct Identity *firstIdentityPtr;
Packit 022b05
    struct Identity *lastIdentityPtr;
Packit 022b05
    struct Import   *firstImportPtr;
Packit 022b05
    struct Import   *lastImportPtr;
Packit 022b05
    struct Revision *firstRevisionPtr;
Packit 022b05
    struct Revision *lastRevisionPtr;
Packit 022b05
    ModuleFlags	    flags;
Packit 022b05
    int		    numImportedIdentifiers;
Packit 022b05
    int		    numStatements;
Packit 022b05
    int		    numModuleIdentities;
Packit 022b05
    struct Module   *nextPtr;
Packit 022b05
    struct Module   *prevPtr;
Packit 022b05
    struct Node     *prefixNodePtr;
Packit 022b05
} Module;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Revision {
Packit 022b05
    SmiRevision	    export;
Packit 022b05
    Module          *modulePtr;
Packit 022b05
    struct Revision *nextPtr;
Packit 022b05
    struct Revision *prevPtr;
Packit 022b05
    int		    line;
Packit 022b05
} Revision;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Import {
Packit 022b05
    SmiImport      export;
Packit 022b05
    Module         *modulePtr;
Packit 022b05
    ImportFlags	   flags;
Packit 022b05
    struct Import  *nextPtr;
Packit 022b05
    struct Import  *prevPtr;
Packit 022b05
    Kind	   kind;
Packit 022b05
    int		   use;
Packit 022b05
    int		   line;
Packit 022b05
} Import;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct NamedNumber {
Packit 022b05
    SmiNamedNumber export;
Packit 022b05
    struct Type    *typePtr;
Packit 022b05
} NamedNumber;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Range {
Packit 022b05
    SmiRange       export;
Packit 022b05
    struct Type    *typePtr;
Packit 022b05
} Range;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Type {
Packit 022b05
    SmiType        export;
Packit 022b05
    Module         *modulePtr;
Packit 022b05
    struct Type    *parentPtr;
Packit 022b05
    struct List    *listPtr;
Packit 022b05
    TypeFlags	   flags;
Packit 022b05
    struct Type    *nextPtr;
Packit 022b05
    struct Type    *prevPtr;
Packit 022b05
    int		   line;
Packit 022b05
} Type;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Option {
Packit 022b05
    SmiOption      export;
Packit 022b05
    struct Object  *compliancePtr;
Packit 022b05
    struct Object  *objectPtr;
Packit 022b05
    int		   line;
Packit 022b05
} Option;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Refinement {
Packit 022b05
    SmiRefinement  export;
Packit 022b05
    struct Object  *compliancePtr; /* the compl. Object this Ref belongs to  */
Packit 022b05
    struct Object  *objectPtr;     /* the Object refined by this Refinement  */
Packit 022b05
    Type	   *typePtr;       /* the refined Type (or NULL)             */
Packit 022b05
    Type	   *writetypePtr;  /* the refined WriteType (or NULL)        */
Packit 022b05
    int		   line;
Packit 022b05
} Refinement;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Compl {
Packit 022b05
    List  *mandatorylistPtr;
Packit 022b05
    List  *optionlistPtr;
Packit 022b05
    List  *refinementlistPtr;
Packit 022b05
} Compl;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Index {
Packit 022b05
    int	           implied;
Packit 022b05
    SmiIndexkind   indexkind;
Packit 022b05
    struct List    *listPtr; /* list of index columns (Object *) */
Packit 022b05
    struct Object  *rowPtr;  /* a referenced row (e.g. SMIv2 AUGMENTS) */
Packit 022b05
} Index;
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct SubjectCategories {
Packit 022b05
    struct List *categories;
Packit 022b05
    int         allCategories;
Packit 022b05
} SubjectCategories;
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Object {
Packit 022b05
    SmiNode        export;
Packit 022b05
    Module         *modulePtr;
Packit 022b05
    ObjectFlags	   flags;
Packit 022b05
    Type	   *typePtr;
Packit 022b05
    struct Object  *relatedPtr;         /* a related Object (augmented row) */
Packit 022b05
    struct List    *listPtr;	        /* OG, NT, NG, MC */
Packit 022b05
    struct List    *optionlistPtr;
Packit 022b05
    struct List    *refinementlistPtr;
Packit 022b05
    struct Node	   *nodePtr;
Packit 022b05
    struct Object  *prevPtr;		/* chain of Objects in this Module */
Packit 022b05
    struct Object  *nextPtr;
Packit 022b05
    struct Object  *prevSameNodePtr;    /* chain of Objects for this Node  */
Packit 022b05
    struct Object  *nextSameNodePtr;
Packit 022b05
    struct List    *uniquenessPtr;      /* UNIQUENESS */
Packit 022b05
    int		   line;
Packit 022b05
} Object;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Node {
Packit 022b05
    SmiSubid	   subid;
Packit 022b05
    NodeFlags	   flags;
Packit 022b05
    int            oidlen;
Packit 022b05
    SmiSubid       *oid;
Packit 022b05
    struct Node	   *parentPtr;
Packit 022b05
    struct Node	   *nextPtr;
Packit 022b05
    struct Node	   *prevPtr;
Packit 022b05
    struct Node	   *firstChildPtr;
Packit 022b05
    struct Node	   *lastChildPtr;
Packit 022b05
    Object	   *firstObjectPtr;
Packit 022b05
    Object	   *lastObjectPtr;
Packit 022b05
} Node;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Macro {
Packit 022b05
    SmiMacro	   export;
Packit 022b05
    Module	   *modulePtr;
Packit 022b05
    MacroFlags	   flags;
Packit 022b05
    struct Macro   *nextPtr;
Packit 022b05
    struct Macro   *prevPtr;
Packit 022b05
    int		   line;
Packit 022b05
} Macro;
Packit 022b05
Packit 022b05
typedef struct Identity {
Packit 022b05
    SmiIdentity	   	export;
Packit 022b05
    Module	   	*modulePtr;
Packit 022b05
    struct Identity	*parentPtr;
Packit 022b05
    struct Identity   	*nextPtr;
Packit 022b05
    struct Identity  	*prevPtr;
Packit 022b05
    int		  	line;
Packit 022b05
} Identity;
Packit 022b05
Packit 022b05
typedef struct Class {
Packit 022b05
    SmiClass	    	export;
Packit 022b05
    Module         	*modulePtr;
Packit 022b05
    struct Attribute	*firstAttributePtr;
Packit 022b05
    struct Attribute   	*lastAttributePtr;
Packit 022b05
    struct List		*uniqueList;
Packit 022b05
    struct Event	*firstEventPtr;
Packit 022b05
    struct Event   	*lastEventPtr;
Packit 022b05
    struct Class	*parentPtr;
Packit 022b05
    struct Class   	*nextPtr;
Packit 022b05
    struct Class  	*prevPtr;
Packit 022b05
    int		  	line;
Packit 022b05
} Class;
Packit 022b05
/*NOTE: if first element of uniqueList points
Packit 022b05
	to current class that is class->uniqueList-> = class;
Packit 022b05
	the class is scalar. If uniqueList = NULL; it is not
Packit 022b05
	meant to be instatiated directly. Otherwise it contains
Packit 022b05
	list of pointers to the class unique attributes.
Packit 022b05
*/
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Attribute {
Packit 022b05
    SmiAttribute 	export;
Packit 022b05
    Class          	*classPtr;
Packit 022b05
    struct Type    	*parentTypePtr;
Packit 022b05
    struct List    	*listPtr;
Packit 022b05
    struct Attribute    *nextPtr;
Packit 022b05
    struct Attribute	*prevPtr;
Packit 022b05
    int		   	line;
Packit 022b05
    struct Class	*parentClassPtr;
Packit 022b05
} Attribute;
Packit 022b05
Packit 022b05
typedef struct Event {
Packit 022b05
    SmiEvent	   	export;
Packit 022b05
    Class          	*classPtr;
Packit 022b05
    struct Event   	*nextPtr;
Packit 022b05
    struct Event  	*prevPtr;
Packit 022b05
    int		  	line;
Packit 022b05
} Event;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Parser {
Packit 022b05
    char	   *path;
Packit 022b05
    FILE	   *file;
Packit 022b05
    int		   line;
Packit 022b05
    int		   lcline;		/* for SMI comment warning */
Packit 022b05
    Module	   *modulePtr;
Packit 022b05
    ParserFlags	   flags;
Packit 022b05
    List	   *firstIndexlabelPtr; /* only for the SMIng parser */
Packit 022b05
    char	   *identityObjectName; /* only for the SMIng parser */
Packit 022b05
    Module         *complianceModulePtr;
Packit 022b05
    Module         *capabilitiesModulePtr;
Packit 022b05
    Node	   *parentNodePtr;
Packit 022b05
    int            currentDecl;
Packit 022b05
    int            firstStatementLine;
Packit 022b05
    int            firstNestedStatementLine;
Packit 022b05
    int	           firstRevisionLine;
Packit 022b05
    Node     	    *pendingNodePtr;
Packit 022b05
} Parser;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
typedef struct Handle {
Packit 022b05
    char            *name;
Packit 022b05
    struct Handle   *prevPtr;
Packit 022b05
    struct Handle   *nextPtr;
Packit 022b05
    View     	    *firstViewPtr;
Packit 022b05
    View     	    *lastViewPtr;
Packit 022b05
    Module   	    *firstModulePtr;
Packit 022b05
    Module   	    *lastModulePtr;
Packit 022b05
    Node     	    *rootNodePtr;
Packit 022b05
    Type     	    *typeOctetStringPtr;
Packit 022b05
    Type     	    *typeObjectIdentifierPtr;
Packit 022b05
    Type     	    *typeInteger32Ptr;
Packit 022b05
    Type     	    *typeUnsigned32Ptr;
Packit 022b05
    Type     	    *typeInteger64Ptr;
Packit 022b05
    Type     	    *typeUnsigned64Ptr;
Packit 022b05
    Type     	    *typeFloat32Ptr;
Packit 022b05
    Type     	    *typeFloat64Ptr;
Packit 022b05
    Type     	    *typeFloat128Ptr;
Packit 022b05
    Type     	    *typeEnumPtr;
Packit 022b05
    Type     	    *typeBitsPtr;
Packit 022b05
    Type			*typePointerPtr;
Packit 022b05
    int	     	    flags;
Packit 022b05
    char     	    *path;
Packit 022b05
    char     	    *cache;
Packit 022b05
    char     	    *cacheProg;
Packit 022b05
    int      	    errorLevel;
Packit 022b05
    SmiErrorHandler *errorHandler;
Packit 022b05
    Parser          *parserPtr;
Packit 022b05
} Handle;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern int	 smiDepth;	/* SMI parser recursion depth */
Packit 022b05
Packit 022b05
extern Handle    *smiHandle;    /* The current handle */
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Handle *addHandle(const char *name);
Packit 022b05
Packit 022b05
extern void removeHandle(Handle *handlePtr);
Packit 022b05
Packit 022b05
extern Handle *findHandleByName(const char *name);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern View *addView(const char *modulename);
Packit 022b05
Packit 022b05
extern int isInView(const char *modulename);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Module *addModule(char *modulename,
Packit 022b05
			 char *path,
Packit 022b05
			 ModuleFlags flags,
Packit 022b05
			 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setModuleIdentityObject(Module *modulePtr,
Packit 022b05
				    Object *objectPtr);
Packit 022b05
Packit 022b05
extern void setModuleLastUpdated(Module *modulePtr,
Packit 022b05
				 time_t lastUpdated);
Packit 022b05
Packit 022b05
extern void setModuleOrganization(Module *modulePtr,
Packit 022b05
				  char *organization);
Packit 022b05
Packit 022b05
extern void setModuleContactInfo(Module *modulePtr,
Packit 022b05
				 char *contactinfo);
Packit 022b05
Packit 022b05
extern void setModuleDescription(Module *modulePtr,
Packit 022b05
				 char *description,
Packit 022b05
				 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setModuleReference(Module *modulePtr,
Packit 022b05
			       char *reference,
Packit 022b05
			       Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Module *findModuleByName(const char *modulename);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Revision *addRevision(time_t date,
Packit 022b05
			     char *description,
Packit 022b05
			     Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setRevisionLine(Revision *revisionPtr,
Packit 022b05
			    int line,
Packit 022b05
			    Parser *parserPtr);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Import *addImport(char *name,
Packit 022b05
			 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void addImportFlags(Import *importPtr, ImportFlags flags);
Packit 022b05
Packit 022b05
extern void setImportModulename(Import *importPtr,
Packit 022b05
				char *modulename);
Packit 022b05
Packit 022b05
extern int checkImports(Module *modulePtr,
Packit 022b05
			Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Import *findImportByName(const char *name,
Packit 022b05
				Module *modulePtr);
Packit 022b05
Packit 022b05
extern Import *findImportByModulenameAndName(const char *modulename,
Packit 022b05
					     const char *name,
Packit 022b05
					     Module *modulePtr);
Packit 022b05
Packit 022b05
extern Object *addObject(char *objectname,
Packit 022b05
			 Node *parentNodePtr,
Packit 022b05
			 SmiSubid subid,
Packit 022b05
			 ObjectFlags flags,
Packit 022b05
			 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Object *duplicateObject(Object *templatePtr,
Packit 022b05
			       ObjectFlags flags,
Packit 022b05
			       Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Node *addNode(Node *parentNodePtr,
Packit 022b05
		     SmiSubid subid,
Packit 022b05
		     NodeFlags flags,
Packit 022b05
		     Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Node *createNodes(unsigned int oidlen, SmiSubid *oid);
Packit 022b05
Packit 022b05
extern Node *createNodesByOidString(const char *oid);
Packit 022b05
Packit 022b05
extern Node *getParentNode(Node *nodePtr);
Packit 022b05
Packit 022b05
/*
Packit 022b05
 * setObjectName() might relink MIB tree object structures. If the
Packit 022b05
 * current objectPtr is to be used after the call, it should look like
Packit 022b05
 *   objectPtr = setObjectName(objectPtr, name);
Packit 022b05
 */
Packit 022b05
extern Object *setObjectName(Object *objectPtr,
Packit 022b05
			     char *name, Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setObjectType(Object *objectPtr,
Packit 022b05
			  Type *typePtr);
Packit 022b05
Packit 022b05
extern void setObjectAccess(Object *objectPtr,
Packit 022b05
			    SmiAccess access);
Packit 022b05
Packit 022b05
extern void setObjectStatus(Object *objectPtr,
Packit 022b05
			    SmiStatus status);
Packit 022b05
Packit 022b05
extern void setObjectDescription(Object *objectPtr,
Packit 022b05
				 char *description,
Packit 022b05
				 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setObjectReference(Object *objectPtr,
Packit 022b05
			       char *reference,
Packit 022b05
			       Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setObjectDecl(Object *objectPtr,
Packit 022b05
			   SmiDecl decl);
Packit 022b05
Packit 022b05
extern void setObjectUniqueness(Object *objectPtr, List *listPtr);
Packit 022b05
Packit 022b05
extern void setObjectInstallErrors(Object *objectPtr, List *listPtr);
Packit 022b05
Packit 022b05
extern void setObjectLine(Object *objectPtr,
Packit 022b05
			  int line,
Packit 022b05
			  Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setObjectNodekind(Object *objectPtr,
Packit 022b05
			      SmiNodekind nodekind);
Packit 022b05
Packit 022b05
extern void addObjectFlags(Object *objectPtr,
Packit 022b05
			   ObjectFlags flags);
Packit 022b05
Packit 022b05
extern void deleteObjectFlags(Object *objectPtr,
Packit 022b05
			      ObjectFlags flags);
Packit 022b05
Packit 022b05
extern int checkObjectFlags(Object *objectPtr, ObjectFlags flags);
Packit 022b05
Packit 022b05
extern void setObjectList(Object *objectPtr,
Packit 022b05
			  struct List *listPtr);
Packit 022b05
Packit 022b05
extern void setObjectRelated(Object *objectPtr,
Packit 022b05
			     Object *relatedPtr);
Packit 022b05
Packit 022b05
extern void setObjectImplied(Object *objectPtr,
Packit 022b05
			     int implied);
Packit 022b05
Packit 022b05
extern void setObjectCreate(Object *objectPtr,
Packit 022b05
			    int create);
Packit 022b05
Packit 022b05
extern void setObjectIndexkind(Object *objectPtr,
Packit 022b05
			       SmiIndexkind indexkind);
Packit 022b05
Packit 022b05
extern void setObjectIndex(Object *objectPtr,
Packit 022b05
			   Index *indexPtr);
Packit 022b05
Packit 022b05
extern void setObjectFormat(Object *objectPtr,
Packit 022b05
			    char *format);
Packit 022b05
Packit 022b05
extern void setObjectUnits(Object *objectPtr,
Packit 022b05
			   char *units);
Packit 022b05
Packit 022b05
extern void setObjectValue(Object *objectPtr,
Packit 022b05
			   SmiValue *valuePtr);
Packit 022b05
Packit 022b05
extern Node *findNodeByParentAndSubid(Node *parentNodePtr,
Packit 022b05
				      SmiSubid subid);
Packit 022b05
Packit 022b05
extern Node *findNodeByOid(unsigned int oidlen, SmiSubid *oid);
Packit 022b05
Packit 022b05
extern Node *findNodeByOidString(char *oid);
Packit 022b05
Packit 022b05
extern Object *findObjectByNode(Node *nodePtr);
Packit 022b05
Packit 022b05
extern Object *findObjectByModuleAndNode(Module *modulePtr,
Packit 022b05
					 Node *nodePtr);
Packit 022b05
Packit 022b05
extern Object *findObjectByModulenameAndNode(const char *modulename,
Packit 022b05
					     Node *nodePtr);
Packit 022b05
Packit 022b05
extern Object *findObjectByName(const char *objectname);
Packit 022b05
Packit 022b05
extern Object *findNextObjectByName(const char *objectname,
Packit 022b05
				    Object *prevObjectPtr);
Packit 022b05
Packit 022b05
extern Object *findObjectByModuleAndName(Module *modulePtr,
Packit 022b05
					 const char *objectname);
Packit 022b05
Packit 022b05
extern Object *findObjectByModulenameAndName(const char *modulename,
Packit 022b05
					     const char *objectname);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Type *addType(char *type_name,
Packit 022b05
		     SmiBasetype basetype,
Packit 022b05
		     TypeFlags flags,
Packit 022b05
		     Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Type *duplicateType(Type *templatePtr,
Packit 022b05
			   TypeFlags flags,
Packit 022b05
			   Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Type *setTypeName(Type *typePtr,
Packit 022b05
			 char *name);
Packit 022b05
Packit 022b05
extern void setTypeStatus(Type *typePtr,
Packit 022b05
			  SmiStatus status);
Packit 022b05
Packit 022b05
extern void setTypeBasetype(Type *typePtr,
Packit 022b05
			  SmiBasetype basetype);
Packit 022b05
Packit 022b05
extern void setTypeParent(Type *typePtr,
Packit 022b05
			  Type *parentPtr);
Packit 022b05
Packit 022b05
extern void setTypeList(Type *typePtr,
Packit 022b05
			struct List *listPtr);
Packit 022b05
Packit 022b05
extern void setTypeDescription(Type *typePtr,
Packit 022b05
			       char *description,
Packit 022b05
			       Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setTypeReference(Type *typePtr,
Packit 022b05
			     char *reference,
Packit 022b05
			     Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setTypeDecl(Type *typePtr,
Packit 022b05
			SmiDecl decl);
Packit 022b05
Packit 022b05
extern void setTypeLine(Type *typePtr,
Packit 022b05
			int line,
Packit 022b05
			Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void addTypeFlags(Type *typePtr,
Packit 022b05
			 TypeFlags flags);
Packit 022b05
Packit 022b05
extern void deleteTypeFlags(Type *typePtr,
Packit 022b05
			    TypeFlags flags);
Packit 022b05
Packit 022b05
extern void setTypeFormat(Type *typePtr,
Packit 022b05
			  char *format);
Packit 022b05
Packit 022b05
extern void setTypeUnits(Type *typePtr,
Packit 022b05
			 char *units);
Packit 022b05
Packit 022b05
extern void setTypeValue(Type *typePtr,
Packit 022b05
			 SmiValue *valuePtr);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Type *findTypeByName(const char *type_name);
Packit 022b05
Packit 022b05
extern Type *findNextTypeByName(const char *type_name,
Packit 022b05
				Type *prevTypePtr);
Packit 022b05
Packit 022b05
extern Type *findTypeByModuleAndName(Module *modulePtr,
Packit 022b05
				     const char *type_name);
Packit 022b05
Packit 022b05
extern Type *findTypeByModulenameAndName(const char *modulename,
Packit 022b05
					 const char *type_name);
Packit 022b05
Packit 022b05
extern NamedNumber *findTypeNamedNumber(Type *typePtr,
Packit 022b05
					SmiInteger32 number);
Packit 022b05
					
Packit 022b05
					
Packit 022b05
					
Packit 022b05
extern Identity *addIdentity(char *identityname,
Packit 022b05
		             Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setIdentityDecl(Identity *identityPtr,
Packit 022b05
			    SmiDecl decl);
Packit 022b05
Packit 022b05
extern void setIdentityStatus(Identity *identityPtr,
Packit 022b05
			      SmiStatus status);
Packit 022b05
Packit 022b05
extern void setIdentityDescription(Identity *identityPtr,
Packit 022b05
				   char *description,
Packit 022b05
				   Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setIdentityReference(Identity *identityPtr,
Packit 022b05
				 char *reference,
Packit 022b05
				 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setIdentityParent(Identity *identityPtr,
Packit 022b05
			      Identity *parentPtr);
Packit 022b05
Packit 022b05
extern Identity *findIdentityByName(const char *identityname);
Packit 022b05
Packit 022b05
extern Identity *findIdentityByModuleAndName(Module *modulePtr,
Packit 022b05
					     const char *identityname);
Packit 022b05
Packit 022b05
extern Identity *findIdentityByModulenameAndName(const char *modulename,
Packit 022b05
						 const char *identity_name);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern Class *addClass(char *classname,
Packit 022b05
		       Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setClassDecl(Class *classPtr,
Packit 022b05
			 SmiDecl decl);
Packit 022b05
Packit 022b05
extern void setClassStatus(Class *classPtr,
Packit 022b05
			   SmiStatus status);
Packit 022b05
Packit 022b05
extern void setClassDescription(Class *classPtr,
Packit 022b05
				char *description,
Packit 022b05
				Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setClassReference(Class *classPtr,
Packit 022b05
			      char *reference,
Packit 022b05
			      Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Class *findClassByModuleAndName(Module *modulePtr, char *name);
Packit 022b05
Packit 022b05
extern Class *findClassByModulenameAndName(const char *modulename,
Packit 022b05
					   const char *class_name);
Packit 022b05
			      
Packit 022b05
Packit 022b05
		             
Packit 022b05
extern Attribute *duplicateTypeToAttribute(Type *templatePtr, 
Packit 022b05
					   Class *classPtr, Parser *parserPtr);
Packit 022b05
								
Packit 022b05
extern Attribute *addAttribute(char *attribute_name,
Packit 022b05
			       Class *classPtr, Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setAttributeName(Attribute *attributePtr, char *name);
Packit 022b05
Packit 022b05
extern void setAttributeDecl(Attribute *attributePtr,
Packit 022b05
			     SmiDecl decl);
Packit 022b05
Packit 022b05
extern void setAttributeStatus(Attribute *attributePtr,
Packit 022b05
			       SmiStatus status);
Packit 022b05
Packit 022b05
extern void setAttributeDescription(Attribute *attributePtr,
Packit 022b05
				    char *description);
Packit 022b05
Packit 022b05
extern void setAttributeReference(Attribute *attributePtr,
Packit 022b05
				  char *reference);
Packit 022b05
			      
Packit 022b05
extern void setAttributeAccess(Attribute *attributePtr,SmiAccess access);
Packit 022b05
Packit 022b05
extern void setAttributeParentType(Attribute *attributePtr,
Packit 022b05
				   Type *parentPtr);
Packit 022b05
Packit 022b05
extern void setAttributeParentClass(Attribute *attributePtr, 
Packit 022b05
				    Class *parentPtr);
Packit 022b05
Packit 022b05
extern void setAttributeList(Attribute *attributePtr, List *listPtr);
Packit 022b05
Packit 022b05
Packit 022b05
extern Event *addEvent(char *eventname, Class *classPtr, 
Packit 022b05
		       Parser *parserPtr);
Packit 022b05
			    
Packit 022b05
Packit 022b05
extern Macro *addMacro(char *macroname,
Packit 022b05
		       MacroFlags flags,
Packit 022b05
		       Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setMacroStatus(Macro *macroPtr,
Packit 022b05
			   SmiStatus status);
Packit 022b05
Packit 022b05
extern void setMacroDescription(Macro *macroPtr,
Packit 022b05
				char *description,
Packit 022b05
				Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setMacroReference(Macro *macroPtr,
Packit 022b05
			      char *reference,
Packit 022b05
			      Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setMacroDecl(Macro *macroPtr,
Packit 022b05
			 SmiDecl decl);
Packit 022b05
			 
Packit 022b05
extern void setMacroAbnf(Macro *macroPtr, 
Packit 022b05
			 char *abnf, 
Packit 022b05
			 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern void setMacroLine(Macro *macroPtr,
Packit 022b05
			 int line,
Packit 022b05
			 Parser *parserPtr);
Packit 022b05
Packit 022b05
extern Macro *findMacroByName(const char *macroname);
Packit 022b05
Packit 022b05
extern Macro *findMacroByModuleAndName(Module *modulePtr,
Packit 022b05
				       const char *macroname);
Packit 022b05
Packit 022b05
extern Macro *findMacroByModulenameAndName(const char *modulename,
Packit 022b05
					   const char *macroname);
Packit 022b05
					   
Packit 022b05
Packit 022b05
extern NamedNumber *findNamedNumberByName(Type *typePtr,
Packit 022b05
					  const char *name);
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
extern int smiInitData(void);
Packit 022b05
Packit 022b05
extern void smiFreeData(void);
Packit 022b05
Packit 022b05
extern Module *loadModule(const char *modulename, Parser *parserPtr);
Packit 022b05
Packit 022b05
Packit 022b05
#endif /* _DATA_H */