Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / lib / smi_attribute.3.in
1 .TH "smi_attribute" "3" "February 10, 2007" "" "SMI Management Information Library"
2 .SH "NAME"
3 .\" START OF MAN PAGE COPIES
4 smiGetAttribute,
5 smiGetFirstAttribute,
6 smiGetNextAttribute,
7 smiGetAttributeParentClass,
8 smiGetAttributeParentType,
9 smiGetFirstUniqueAttribute,
10 smiGetNextUniqueAttribute,
11 smiGetEvent,
12 smiGetFirstEvent,
13 smiGetNextEvent,
14 smiGetAttributeFirstRange,
15 smiGetAttributeNextRange,
16 smiGetAttributeFirstNamedNumber,
17 smiGetAttributeNextNamedNumber
18 .\" END OF MAN PAGE COPIES
19 \- SMI Attribute
20 information routines
21 .SH "SYNOPSIS"
22 .nf 
23 .B #include <smi.h>
24 .RS
25 .RE
26 .sp
27 .BI "SmiAttribute *smiGetAttribute(SmiClass *" smiClassPtr ", char *" name);
28 .RE
29 .sp
30 .BI "SmiAttribute *smiGetFirstAttribute(SmiClass *" smiClassPtr );
31 .RE
32 .sp
33 .BI "SmiAttribute *smiGetNextAttribute(SmiAttribute *" smiAttributePtr );
34 .RE
35 .sp
36 .BI "SmiType *smiGetAttributeParentType(SmiType *" smiAttributePtr);
37 .RE
38 .sp
39 .BI "SmiClass *smiGetAttributeParentClass(SmiType *" smiAttributePtr);
40 .RE
41 .sp
42 .BI "SmiAttribute *smiGetFirstUniqueAttribute(SmiClass *" smiClassPtr);
43 .RE
44 .sp
45 .BI "SmiAttribute *smiGetNextUniqueAttribute(SmiAttribute *" smiAttributePtr);
46 .RE
47 .sp
48 .BI "SmiRange *smiGetAttributeFirstRange(SmiAttribute *" smiAttributePtr);
49 .RE
50 .sp
51 .BI "SmiRange *smiGetAttributeNextRange(SmiRange *" smiRangePtr);
52 .RE
53 .sp
54 .BI "SmiNamedNumber *smiGetAttributeFirstNamedNumber(SmiAttribute *" smiAttributePtr) ;
55 .RE
56 .sp
57 .BI "SmiNamedNumber *smiGetAttributeNextNamedNumber(SmiNamedNumber *" smiNamedNumberPtr);
58 .RE
59
60
61 typedef struct SmiAttribute {
62     SmiIdentifier       name;
63     SmiDecl             decl;
64     SmiStatus           status;
65     char                *description;
66     char                *reference;
67 } SmiAttribute;
68
69 typedef struct SmiRange {
70     SmiValue            minValue;
71     SmiValue            maxValue;
72 } SmiRange;
73
74 typedef struct SmiNamedNumber {
75     SmiIdentifier       name;
76     SmiValue            value;
77 } SmiNamedNumber;
78
79 .fi 
80 .SH "DESCRIPTION"
81 These functions retrieve information on a SMIng Attribute definition (SMIng).
82 .PP 
83 \fBsmiGetAttribute(SmiClass *smiClassPtr, char *name)\fP returns a
84 pointer to \fBstruct SmiAttribute\fP for the Attribute with the given
85 \fIname\fP in the given class(\fIsmiClassPtr\fP), or NULL if the
86 attribute with the given name does not exist.
87 .PP 
88 \fBsmiGetFirstAttribute(SmiClass *smiClassPtr)\fP and
89 \fBsmiGetNextAttribute(SmiAttribute *smiAttributePtr)\fP are used to
90 iterate through the attributes of the class given by
91 \fIsmiClassPtr\fP. They return a pointer to \fBstruct SmiAttribute\fP
92 that represents an attribute or NULL if there are no attributes left
93 in the class, or error has occurred.
94 .PP 
95 \fBsmiGetAttributeParentClass(SmiAttribute *smiAttributePtr)\fP
96 returns a pointer to a \fBstruct SmiClass\fP, pointing to the parent
97 class of the given \fIsmiAttributePtr\fP, or NULL if the attribute
98 does not reference class.  Note that attributes always have either
99 parent type or parent class.
100 .PP 
101 \fBsmiGetAttributeParentType(SmiType *smiAttributePtr)\fP returns a
102 pointer to a \fBstruct SmiType\fP, pointing to the parent type of the
103 given \fIsmiAttributePtr\fP, or NULL if the attribute does not
104 reference type.  Note that attributes always have either parent type
105 or parent class.
106 .PP 
107 \fBsmiGetFirstUniqueAttribute(SmiClass *smiClassPtr)\fP and
108 \fBsmiGetNextUniqueAttribute(SmiType *smiAttributePtr)\fP are used to
109 iterate through the unique attributes of the class given by
110 \fIsmiClassPtr\fP. They return a pointer to \fBstruct SmiAttribute\fP
111 that represents a unique attribute or NULL if there are no unique
112 attributes left in the class, or error has occurred. This function
113 \fBMUST NOT\fP be used for scalar classes, so it should only be called
114 after \fBisClassScalar()\fP has returned 0.
115 .PP 
116 \fBsmiGetAttributeFirstRange(SmiAttribute *smiAttributePtr)\fP, and
117 \fBsmiGetAttributeNextRange(SmiRange *smiRangePtr)\fP are used to
118 iterate through ranges that restrict number or octet string types.
119 Both functions return a pointer to the \fBstruct SmiRange\fP
120 representing the range, or NULL if there are no more ranges, or error
121 has occurred.
122 .PP 
123 \fBsmiGetAttributeFirstNamedNumber(SmiAttribute *smiAttributePtr)\fP
124 and \fBsmiGetAttributeNextNamedNumber(SmiNamedNumber
125 *smiNamedNumberPtr)\fP are used to iterate through named numbers of
126 bits or enumerations for attributes, which reference types, and to
127 retrieve the reference restriction of a pointer.  Both functions
128 return a pointer to the struct SmiNamedNumber representing the named
129 number, or NULL if there are no named numbers left, or error has
130 occurred.  \fBsmiGetFirstNamedNumber()\fP can be used to retrieve the
131 name of the identity that is restricting Pointer type, as it is stored
132 as the name of the first named number.
133 .SH "FILES"
134 .nf 
135 @includedir@/smi.h    SMI library header file
136 .fi 
137 .SH "SEE ALSO"
138 .BR libsmi "(3), "
139 .BR smi_module "(3), "
140 .BR smi.h
141 .SH "AUTHOR"
142 (C) 2007 Kaloyan Kanev, Jacobs University, Germany <k.kanev@jacobs-university.de>
143 .br