Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / lib / libsmi.3.in
1 .\"
2 .\" $Id: libsmi.3.in 4432 2006-05-29 16:21:11Z strauss $
3 .\"
4 .TH libsmi 3  "August 16, 2001" "IBR" "SMI Management Information Library"
5 .SH NAME
6 libsmi \- library to access SMI management information
7 .SH DESCRIPTION
8 This library contains functions that allow access to SMI management
9 information stored in repositories that are managed by \fBlibsmi\fP,
10 currently directories containing SMIv1/v2 and SMIng MIB module files.
11 .PP
12 The libsmi API is defined in \fBsmi.h\fP. Functions are
13 documented in \fBsmi_config\fP(3), \fBsmi_module\fP(3),
14 \fBsmi_node\fP(3), \fBsmi_type\fP(3), and \fBsmi_macro\fP(3).
15 .PP
16 The purpose of libsmi is to separate the weird parsing and handling of
17 MIB modules from management applications. MIB modules conforming to
18 SMIv1, SMIv2 and SMIng - a new language for management information,
19 developed at the Technical University of Braunschweig, Germany - can
20 be handled by libsmi.
21 .PP
22 NOTE: SMIng support in the current release of libsmi is neither stable
23 nor representing the work done in the IETF SMING working group. It is
24 based research efforts at TU Braunschweig and within the IRTF in 1999-2000.
25 .PP
26 .SH "EXAMPLE"
27 .nf
28 #include <stdio.h>
29 #include <string.h>
30 #include <smi.h>
31  
32 int main(int argc, char *argv[])
33 {
34     SmiNode *smiNode;
35     int oidlen, first = 1;
36     
37     if (argc != 2) {
38         fprintf(stderr, "Usage: smisubtree oid\\n");
39         exit(1);
40     }
41  
42     smiInit(NULL);
43  
44     for((smiNode = smiGetNode(NULL, argv[1])) &&
45             (oidlen = smiNode->oidlen);
46         smiNode && (first || smiNode->oidlen > oidlen);
47         smiNode = smiGetNextNode(smiNode, SMI_NODEKIND_ANY),
48             first = 0) {
49  
50         printf("%*s%-32s\\n",
51                (smiNode->oidlen - oidlen + 1) * 2, " ",
52                smiNode->name);
53         
54     };
55     
56     exit(0);
57 }
58 .fi
59 .SH "FILES"
60 .nf
61 @includedir@/smi.h    SMI library header file
62 .fi
63 .SH "SEE ALSO"
64 .BR "RFCs 2578-2580"
65 specify the SMIv2 standard [STD 58].  The (obsolete) SMIng specification
66 has been a working document of the IRTF
67 Network Management Working Group (NMRG) (draft-irtf-nmrg-sming-02).
68 .PP
69 .BR smi.h ", "
70 .BR smi_config "(3), "
71 .BR smi_module "(3), "
72 .BR smi_node "(3), "
73 .BR smi_type "(3), "
74 .BR smi_macro "(3), "
75 .SH "AUTHOR"
76 (C) 1999-2001 Frank Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de>
77 .br