1smi_type(3)           SMI Management Information Library           smi_type(3)
2
3
4

NAME

6       smiGetType,  smiGetFirstType, smiGetNextType, smiGetParentType, smiGet‐
7       TypeLine,  smiGetFirstRange,  smiGetNextRange,  smiGetFirstNamedNumber,
8       smiGetNextNamedNumber, smiGetTypeModule - SMI type information routines
9

SYNOPSIS

11       #include <smi.h>
12
13       SmiType *smiGetType(SmiModule *smiModulePtr, char *type);
14
15       SmiType *smiGetFirstType(SmiModule *smiModulePtr);
16
17       SmiType *smiGetNextType(SmiType *smiTypePtr);
18
19       SmiType *smiGetParentType(SmiType *smiTypePtr);
20
21       int smiGetTypeLine(SmiType *smiTypePtr);
22
23       SmiRange *smiGetFirstRange(SmiType *smiTypePtr);
24
25       SmiRange *smiGetNextRange(SmiRange *smiRangePtr);
26
27       SmiNamedNumber *smiGetFirstNamedNumber(SmiType *smiTypePtr);
28
29       SmiNamedNumber *smiGetNextNamedNumber(SmiNamedNumber *smiNamedNumberPtr);
30
31       SmiModule *smiGetTypeModule(SmiType *smiTypePtr);
32
33       typedef struct SmiType {
34           SmiIdentifier       name;
35           SmiBasetype         basetype;
36           SmiDecl             decl;
37           char                *format;
38           SmiValue            value;
39           char                *units;
40           SmiStatus           status;
41           char                *description;
42           char                *reference;
43       } SmiType;
44
45       typedef struct SmiNamedNumber {
46           SmiIdentifier       name;
47           SmiValue            value;
48       } SmiNamedNumber;
49
50       typedef struct SmiRange {
51           SmiValue            minValue;
52           SmiValue            maxValue;
53       } SmiRange;
54
55

DESCRIPTION

57       These  functions retrieve information on a type definition (SMIng) or a
58       simple ASN.1 type definition (SMIv1/v2) or a TEXTUAL-CONVENTION defini‐
59       tion (SMIv2). Base types may also be retrieved by these functions.
60
61       The  smiGetType() function retrieves a struct SmiType that represents a
62       type. Type may be either a fully qualified descriptor or a simple  type
63       name.   If  smiModulePtr is not NULL it used to limit the search to the
64       given module. If the type is not found, smiGetType() returns NULL.
65
66       The smiGetFirstType() and smiGetNextType() functions are used to itera‐
67       tively  retrieve  struct  SmiTypes. smiGetFirstType() returns the first
68       one defined in the module specified by smiModulePtr.  Subsequent  calls
69       to  smiGetNextType()  return  the following ones.  If there are no more
70       type definitions in the module NULL is returned.
71
72       The smiGetParentType() function retrieves a struct SmiType of the  type
73       from  which the type specified by smiTypePtr is derived. If there is no
74       parent type (i.e. the type specified by smiTypePtr  is  a  base  type),
75       smiGetParentType() returns NULL.
76
77       Similarly,  the  smiGetFirstRange() and smiGetNextRange() functions are
78       used to iteratively retrieve  struct  SmiRanges  that  represent  range
79       restrictions of the type specified by smiTypePtr, either size ranges of
80       an octet string type or value ranges in case of a numeric type.
81
82       Similarly,  the  smiGetFirstNamedNumber()  and  smiGetNextNamedNumber()
83       functions  are used to iteratively retrieve struct SmiNamedNumbers that
84       represent named numbers of the type specified by smiTypePtr, which  has
85       to be either a bit set or an enumeration type.
86
87       The  smiGetTypeModule()  function  returns  the module that defines the
88       type given by struct SmiTypePtr.
89
90       The smiGetTypeLine() function returns the line number within the module
91       where the type specified by smiTypePtr is defined.
92

FILES

94       /usr/include/smi.h    SMI library header file
95

SEE ALSO

97       libsmi(3), smi_module(3), smi.h
98

AUTHOR

100       (C)    1999-2001    Frank    Strauss,    TU    Braunschweig,    Germany
101       <strauss@ibr.cs.tu-bs.de>
102
103
104
105IBR                             August 16, 2001                    smi_type(3)
Impressum