Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / lib / smi_module.3.in
1 .\"
2 .\" $Id: smi_module.3.in 4432 2006-05-29 16:21:11Z strauss $
3 .\"
4 .TH smi_module 3  "August 16, 2001" "IBR" "SMI Management Information Library"
5 .SH NAME
6 .\" START OF MAN PAGE COPIES
7 smiGetModule,
8 smiGetFirstModule,
9 smiGetNextModule,
10 smiGetModuleIdentityNode,
11 smiGetFirstImport,
12 smiGetNextImport,
13 smiIsImported,
14 smiGetFirstRevision,
15 smiGetNextRevision
16 .\" END OF MAN PAGE COPIES
17 \- SMI module information routines
18 .SH SYNOPSIS
19 .nf
20 .B #include <time.h>
21 .B #include <smi.h>
22 .RS
23 .RE
24 .sp
25 .BI "SmiModule *smiGetModule(char *" module );
26 .RE
27 .sp
28 .BI "SmiModule *smiGetFirstModule();
29 .RE
30 .sp
31 .BI "SmiModule *smiGetNextModule(SmiModule *" smiModulePtr );
32 .RE
33 .sp
34 .BI "SmiNode *smiGetModuleIdentityNode(SmiModule *" smiModulePtr );
35 .RE
36 .sp
37 .BI "SmiImport *smiGetFirstImport(SmiModule *" smiModulePtr );
38 .RE
39 .sp
40 .BI "SmiImport *smiGetNextImport(SmiImport *" smiImportPtr );
41 .RE
42 .sp
43 .BI "int smiIsImported(SmiModule *" smiModulePtr ", SmiModule *" importedModulePtr ", char *" importedName );
44 .RE
45 .sp
46 .BI "SmiRevision *smiGetFirstRevision(SmiModule *" smiModulePtr );
47 .RE
48 .sp
49 .BI "SmiRevision *smiGetNextRevision(SmiRevision *" smiRevisionPtr );
50 .RE
51
52 typedef struct SmiModule {
53     SmiIdentifier       name;
54     char                *path;
55     char                *organization;
56     char                *contactinfo;
57     char                *description;
58     char                *reference;
59     SmiLanguage         language;
60     int                 conformance;
61 } SmiModule;
62
63 typedef struct SmiRevision {
64     time_t              date;
65     char                *description;
66 } SmiRevision;
67
68 typedef struct SmiImport {
69     SmiIdentifier       module;
70     SmiIdentifier       name;
71 } SmiImport;
72
73 .fi
74 .SH DESCRIPTION
75 These functions retrieve various meta information on MIB
76 modules. Other functions to retrieve the definitions within a module are
77 documented in \fBsmi_type\fP(3), \fBsmi_node\fP(3), and \fBsmi_macro\fP(3).
78 .PP
79 The \fBsmiGetModule()\fP function retrieves a \fBstruct SmiModule\fP
80 that represents the SMI module named \fBmodule\fP. Elements not available
81 or not present for this module contain NULL. If the module is not found,
82 \fBsmiGetModule()\fP returns NULL.
83 .PP
84 The \fBsmiGetFirstModule()\fP and \fBsmiGetNextModule()\fP functions are
85 used to iteratively retrieve \fBstruct SmiModule\fPs of all known modules.
86 \fBsmiGetFirstModule()\fP returns the first known module.
87 Subsequent calls to \fBsmiGetNextModule()\fP return the following ones. 
88 If there are no more modules NULL is returned.
89 .PP
90 The \fBsmiGetModuleIdentityNode()\fP function retrieves
91 a \fBstruct SmiNode\fP that represents the node that is used to
92 identify the containing MIB module specified by \fIsmiModulePtr\fP.
93 If there is no such identity node, i.e. if this is not an SMIv2 or
94 SMIng module converted from SMIv2, \fBsmiGetModuleIdentityNode()\fP
95 returns NULL.
96 .PP
97 The \fBsmiGetFirstImport()\fP and \fBsmiGetNextImport()\fP functions are
98 used to iteratively retrieve \fBstruct SmiImport\fPs of a given module.
99 \fBsmiGetFirstImport()\fP returns the first identifier imported by
100 the module specified by \fIsmiModulePtr\fP.
101 Subsequent calls to \fBsmiGetNextImport()\fP return the following ones.
102 If there are no more imported identifiers NULL is returned.
103 .PP
104 The \fBsmiIsImported()\fP function returns a positive value if the
105 identifier \fIimportedName\fP defined in the module specified by
106 \fIimportedModulePtr\fP is imported in the module specified by
107 \fIsmiModulePtr\fP, or zero otherwise.
108 .PP
109 The \fBsmiGetFirstRevision()\fP and \fBsmiGetNextRevision()\fP
110 functions are used to iteratively retrieve \fBstruct SmiRevision\fPs of
111 a given module. \fBsmiGetFirstRevision()\fP returns the first (that is
112 most recent) revision information of the module specified by
113 \fIsmiModulePtr\fP. Subsequent calls to \fBsmiGetNextRevision()\fP
114 return the revision after (timely before) that one. If there are no
115 more revisions NULL is returned.
116 .SH "FILES"
117 .nf
118 @includedir@/smi.h    SMI library header file
119 .fi
120 .SH "SEE ALSO"
121 .BR libsmi "(3), "
122 .BR smi_config "(3), "
123 .BR smi_node "(3), "
124 .BR smi.h
125 .SH "AUTHOR"
126 (C) 1999-2001 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
127 .br