Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / lib / smi_type.3.in
1 .\"
2 .\" $Id: smi_type.3.in 4432 2006-05-29 16:21:11Z strauss $
3 .\"
4 .TH smi_type 3  "August 16, 2001" "IBR" "SMI Management Information Library"
5 .SH NAME
6 .\" START OF MAN PAGE COPIES
7 smiGetType,
8 smiGetFirstType,
9 smiGetNextType,
10 smiGetParentType,
11 smiGetTypeLine,
12 smiGetFirstRange,
13 smiGetNextRange,
14 smiGetFirstNamedNumber,
15 smiGetNextNamedNumber,
16 smiGetTypeModule
17 .\" END OF MAN PAGE COPIES
18 \- SMI type
19 information routines
20 .SH SYNOPSIS
21 .nf
22 .B #include <smi.h>
23 .RS
24 .RE
25 .sp
26 .BI "SmiType *smiGetType(SmiModule *" smiModulePtr ", char *" type );
27 .RE
28 .sp
29 .BI "SmiType *smiGetFirstType(SmiModule *" smiModulePtr );
30 .RE
31 .sp
32 .BI "SmiType *smiGetNextType(SmiType *" smiTypePtr );
33 .RE
34 .sp
35 .BI "SmiType *smiGetParentType(SmiType *" smiTypePtr );
36 .RE
37 .sp
38 .BI "int smiGetTypeLine(SmiType *" smiTypePtr );
39 .RE
40 .sp
41 .BI "SmiRange *smiGetFirstRange(SmiType *" smiTypePtr );
42 .RE
43 .sp
44 .BI "SmiRange *smiGetNextRange(SmiRange *" smiRangePtr );
45 .RE
46 .sp
47 .BI "SmiNamedNumber *smiGetFirstNamedNumber(SmiType *" smiTypePtr );
48 .RE
49 .sp
50 .BI "SmiNamedNumber *smiGetNextNamedNumber(SmiNamedNumber *" smiNamedNumberPtr );
51 .RE
52 .sp
53 .BI "SmiModule *smiGetTypeModule(SmiType *" smiTypePtr );
54 .RE
55
56 typedef struct SmiType {
57     SmiIdentifier       name;
58     SmiBasetype         basetype;
59     SmiDecl             decl;
60     char                *format;
61     SmiValue            value;
62     char                *units;
63     SmiStatus           status;
64     char                *description;
65     char                *reference;
66 } SmiType;
67
68 typedef struct SmiNamedNumber {
69     SmiIdentifier       name;
70     SmiValue            value;
71 } SmiNamedNumber;
72
73 typedef struct SmiRange {
74     SmiValue            minValue;
75     SmiValue            maxValue;
76 } SmiRange;
77
78 .fi
79 .SH DESCRIPTION
80 These functions retrieve information on a type definition (SMIng) or
81 a simple ASN.1 type definition (SMIv1/v2) or a TEXTUAL-CONVENTION
82 definition (SMIv2). Base types may also be retrieved by these functions.
83 .PP
84 The \fBsmiGetType()\fP function retrieves a \fBstruct SmiType\fP that
85 represents a type. \fIType\fP may be either a
86 fully qualified descriptor or a simple type name.
87 If \fIsmiModulePtr\fP is not NULL it used to limit the search to the
88 given module. If the type is not found, \fBsmiGetType()\fP returns NULL.
89 .PP
90 The \fBsmiGetFirstType()\fP and \fBsmiGetNextType()\fP functions are
91 used to iteratively retrieve \fBstruct SmiType\fPs. \fBsmiGetFirstType()\fP
92 returns the first one defined in the module
93 specified by \fIsmiModulePtr\fP. Subsequent calls to
94 \fBsmiGetNextType()\fP return the following ones.  If there are no
95 more type definitions in the module NULL is returned.
96 .PP
97 The \fBsmiGetParentType()\fP function retrieves a \fBstruct SmiType\fP
98 of the type from which the type specified by \fIsmiTypePtr\fP is
99 derived. If there is no parent type (i.e. the type specified
100 by \fIsmiTypePtr\fP is a base type), \fBsmiGetParentType()\fP returns NULL.
101 .PP
102 Similarly, the \fBsmiGetFirstRange()\fP and \fBsmiGetNextRange()\fP
103 functions are used to iteratively retrieve \fBstruct SmiRange\fPs
104 that represent range restrictions of the type specified by \fIsmiTypePtr\fP,
105 either size ranges of an octet string type or value
106 ranges in case of a numeric type.
107 .PP
108 Similarly, the \fBsmiGetFirstNamedNumber()\fP and \fBsmiGetNextNamedNumber()\fP
109 functions are used to iteratively retrieve \fBstruct SmiNamedNumber\fPs
110 that represent named numbers of the type specified by \fIsmiTypePtr\fP, which
111 has to be either a bit set or an enumeration type.
112 .PP
113 The \fBsmiGetTypeModule()\fP function returns the module that defines
114 the type given by \fIstruct SmiTypePtr\fP.
115 .PP
116 The \fBsmiGetTypeLine()\fP function returns the line number within the
117 module where the type specified by \fIsmiTypePtr\fP is defined.
118 .SH "FILES"
119 .nf
120 @includedir@/smi.h    SMI library header file
121 .fi
122 .SH "SEE ALSO"
123 .BR libsmi "(3), "
124 .BR smi_module "(3), "
125 .BR smi.h
126 .SH "AUTHOR"
127 (C) 1999-2001 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
128 .br