summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp/gensnmptree
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-10-04 14:41:06 +0000
committerharti <harti@FreeBSD.org>2005-10-04 14:41:06 +0000
commitefb2dfa1774240830b3f74b7fe4ab8050cc1cda0 (patch)
tree939b9a00cfa4d79510a088859c9352b689740218 /contrib/bsnmp/gensnmptree
parent2b366eef52ee173d11c8c3b0570cd771e5c0044a (diff)
downloadFreeBSD-src-efb2dfa1774240830b3f74b7fe4ab8050cc1cda0.zip
FreeBSD-src-efb2dfa1774240830b3f74b7fe4ab8050cc1cda0.tar.gz
Virgin import of bsnmpd 1.11
Diffstat (limited to 'contrib/bsnmp/gensnmptree')
-rw-r--r--contrib/bsnmp/gensnmptree/Makefile.in17
-rw-r--r--contrib/bsnmp/gensnmptree/gensnmptree.116
-rw-r--r--contrib/bsnmp/gensnmptree/gensnmptree.c4
3 files changed, 29 insertions, 8 deletions
diff --git a/contrib/bsnmp/gensnmptree/Makefile.in b/contrib/bsnmp/gensnmptree/Makefile.in
new file mode 100644
index 0000000..91634ef
--- /dev/null
+++ b/contrib/bsnmp/gensnmptree/Makefile.in
@@ -0,0 +1,17 @@
+# Copyright (c) 2001-2003
+# Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+# All rights reserved.
+#
+# Author: Harti Brandt <harti@freebsd.org>
+#
+# $Begemot: bsnmp/gensnmptree/Makefile.in,v 1.3 2004/04/13 17:01:31 novo Exp $
+#
+
+PROG= gensnmptree
+SRCS= gensnmptree.c
+MAN1= gensnmptree.1
+
+CFLAGS+= -I$(srcdir)/../lib
+
+$(PROG): $(SRCS:.c=.lo)
+ $(LIBTOOL) --mode=link $(CC) $(LDLAGS) -o $@ $(SRCS:.c=.lo)
diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.1 b/contrib/bsnmp/gensnmptree/gensnmptree.1
index 1aed9bf..3ebefe6 100644
--- a/contrib/bsnmp/gensnmptree/gensnmptree.1
+++ b/contrib/bsnmp/gensnmptree/gensnmptree.1
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2001-2003
+.\" Copyright (c) 2001-2005
.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
.\" All rights reserved.
.\"
@@ -26,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.4 2005/02/25 11:55:56 brandt_h Exp $
+.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.5 2005/06/15 11:31:25 brandt_h Exp $
.\"
-.Dd October 7, 2003
+.Dd June 14, 2005
.Dt GENSNMPTREE 1
.Os
.Sh NAME
@@ -43,8 +43,8 @@
The
.Nm
utility is used to either generate C language tables and header files from
-a MIB description or to numeric OIDs from MIB descriptions. The first form
-is used only for maintaining the
+a MIB description or to numeric OIDs from MIB descriptions.
+The first form is used only for maintaining the
.Xr snmpd 1
daemon or for module writers.
The second form may be used by SNMP client program writers.
@@ -70,7 +70,8 @@ option is specified
.Nm
expects MIB variable names (only the last component) on its command line.
It reads a MIB specification from standard input and for each MIB variable
-name emits two C preprocessor defines on its standard output. One define
+name emits two C preprocessor defines on its standard output.
+One define
.Va OID_ Ns Ar name
can be used as an array initialized to initialize a
.Va struct asn_oid .
@@ -85,7 +86,8 @@ Print a short help page.
.It Fl e
Enter extract mode.
.It Fl l
-Generate local preprocessor includes. This is used for bootstrapping
+Generate local preprocessor includes.
+This is used for bootstrapping
.Xr snmpd 1 .
.It Fl t
Instead of normal output print the resulting tree.
diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.c b/contrib/bsnmp/gensnmptree/gensnmptree.c
index 97c5106..89cd237 100644
--- a/contrib/bsnmp/gensnmptree/gensnmptree.c
+++ b/contrib/bsnmp/gensnmptree/gensnmptree.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.42 2005/04/26 16:26:19 brandt_h Exp $
+ * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.43 2005/10/04 11:21:29 brandt_h Exp $
*
* Generate OID table from table description.
*
@@ -595,7 +595,9 @@ gen_table(struct node *node)
fprintf(fp, "#include <sys/types.h>\n");
fprintf(fp, "#include <stdio.h>\n");
+#ifdef HAVE_STDINT_H
fprintf(fp, "#include <stdint.h>\n");
+#endif
if (localincs) {
fprintf(fp, "#include \"asn1.h\"\n");
fprintf(fp, "#include \"snmp.h\"\n");
OpenPOWER on IntegriCloud