summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-02-28 17:27:11 +0000
committerharti <harti@FreeBSD.org>2005-02-28 17:27:11 +0000
commitd6f7f1ed96b4925ac40b725d63c7d8de184bf6cb (patch)
tree645f040690f9bfb33aea76d2ba5a344ef9840c89 /contrib/bsnmp
parentc177bb55fbaf41611e2379ece511a03515cb6c91 (diff)
parent273b7adb85a03a00c3b173831af21c60e5d77eb0 (diff)
downloadFreeBSD-src-d6f7f1ed96b4925ac40b725d63c7d8de184bf6cb.zip
FreeBSD-src-d6f7f1ed96b4925ac40b725d63c7d8de184bf6cb.tar.gz
This commit was generated by cvs2svn to compensate for changes in r142810,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bsnmp')
-rw-r--r--contrib/bsnmp/NEWS13
-rw-r--r--contrib/bsnmp/VERSION2
-rw-r--r--contrib/bsnmp/gensnmpdef/gensnmpdef.14
-rw-r--r--contrib/bsnmp/gensnmptree/gensnmptree.14
-rw-r--r--contrib/bsnmp/gensnmptree/gensnmptree.c11
-rw-r--r--contrib/bsnmp/lib/asn1.314
-rw-r--r--contrib/bsnmp/lib/bsnmpagent.316
-rw-r--r--contrib/bsnmp/lib/bsnmpclient.319
-rw-r--r--contrib/bsnmp/lib/bsnmplib.310
-rw-r--r--contrib/bsnmp/lib/snmpagent.c7
-rw-r--r--contrib/bsnmp/oid-list21
-rw-r--r--contrib/bsnmp/snmp_mibII/mibII.c3
-rw-r--r--contrib/bsnmp/snmp_mibII/mibII_interfaces.c4
-rw-r--r--contrib/bsnmp/snmp_mibII/snmp_mibII.310
-rw-r--r--contrib/bsnmp/snmp_mibII/snmp_mibII.h5
-rw-r--r--contrib/bsnmp/snmpd/bsnmpd.118
-rw-r--r--contrib/bsnmp/snmpd/main.c4
-rw-r--r--contrib/bsnmp/snmpd/snmpd.config3
-rw-r--r--contrib/bsnmp/snmpd/snmpmod.344
-rw-r--r--contrib/bsnmp/snmpd/trans_lsock.c3
20 files changed, 136 insertions, 79 deletions
diff --git a/contrib/bsnmp/NEWS b/contrib/bsnmp/NEWS
index b0a9210..33e114b 100644
--- a/contrib/bsnmp/NEWS
+++ b/contrib/bsnmp/NEWS
@@ -1,3 +1,16 @@
+1.8
+ many man page fixes from ru@freebsd.org and tobez@freebsd.org
+
+ snmpd/main.c: fix a problem which resulted in the daemon exiting
+ when a local socket was closed.
+
+ snmpd/trans_lsock.c: include stdio.h to get a prototype for remove.
+
+ gensnmptree/gensnmptree.c: fix a compile error
+1.7a
+ fix core dump when config file cannot be opened (submitted by
+ Maxim Konovalov)
+
1.7
snmpd: Move event library initialisation before reading of
config file (thanks to phk).
diff --git a/contrib/bsnmp/VERSION b/contrib/bsnmp/VERSION
index d3bdbdf..6259340 100644
--- a/contrib/bsnmp/VERSION
+++ b/contrib/bsnmp/VERSION
@@ -1 +1 @@
-1.7
+1.8
diff --git a/contrib/bsnmp/gensnmpdef/gensnmpdef.1 b/contrib/bsnmp/gensnmpdef/gensnmpdef.1
index df2edf0..661bb31 100644
--- a/contrib/bsnmp/gensnmpdef/gensnmpdef.1
+++ b/contrib/bsnmp/gensnmpdef/gensnmpdef.1
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/gensnmpdef/gensnmpdef.1,v 1.2 2004/08/06 08:46:44 brandt Exp $
+.\" $Begemot: bsnmp/gensnmpdef/gensnmpdef.1,v 1.3 2005/02/25 11:55:54 brandt_h Exp $
.\"
.Dd April 14, 2004
-.Dt gensnmpdef 1
+.Dt GENSNMPDEF 1
.Os
.Sh NAME
.Nm gensnmpdef
diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.1 b/contrib/bsnmp/gensnmptree/gensnmptree.1
index c26f24b..1aed9bf 100644
--- a/contrib/bsnmp/gensnmptree/gensnmptree.1
+++ b/contrib/bsnmp/gensnmptree/gensnmptree.1
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.3 2004/08/06 08:46:46 brandt Exp $
+.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.4 2005/02/25 11:55:56 brandt_h Exp $
.\"
.Dd October 7, 2003
-.Dt gensnmptree 1
+.Dt GENSNMPTREE 1
.Os
.Sh NAME
.Nm gensnmptree
diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.c b/contrib/bsnmp/gensnmptree/gensnmptree.c
index d3b9909..3b2e2c0 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.38 2004/08/06 08:46:46 brandt Exp $
+ * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.41 2005/02/25 11:51:12 brandt_h Exp $
*
* Generate OID table from table description.
*
@@ -50,7 +50,7 @@
*
* elements := EMPTY | elements element
*
- * element := tree | leaf
+ * element := tree | leaf | column
*
* index := TYPE | index TYPE
*
@@ -560,9 +560,12 @@ gen_header(struct node *np, u_int oidlen, const char *func)
if((np->flags & (FL_GET|FL_SET)) == 0)
return;
- if (np->type == NODE_COLUMN)
+ if (np->type == NODE_COLUMN) {
+ if (func == NULL)
+ errx(1, "column without function (%s) - probably "
+ "outside of a table", np->name);
sprintf(f, "%s", func);
- else
+ } else
sprintf(f, "%s", np->u.leaf.func);
LIST_FOREACH(ptr, &funcs, link)
diff --git a/contrib/bsnmp/lib/asn1.3 b/contrib/bsnmp/lib/asn1.3
index 0b7e768..017e61a 100644
--- a/contrib/bsnmp/lib/asn1.3
+++ b/contrib/bsnmp/lib/asn1.3
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/lib/asn1.3,v 1.5 2004/08/06 08:46:48 brandt Exp $
+.\" $Begemot: bsnmp/lib/asn1.3,v 1.6 2005/02/25 11:55:57 brandt_h Exp $
.\"
.Dd August 15, 2002
-.Dt asn1 3
+.Dt ASN1 3
.Os
.Sh NAME
.Nm asn_get_header ,
@@ -253,7 +253,7 @@ length, insert it into the right place and shift the value if the resulting
length field is shorter than the estimated one.
.Pp
The function
-.Fn asn_get_integer_raw
+.Fn asn_get_integer_raw
is used to decode a signed integer value (32-bit). It assumes, that the
header of the integer has been decoded already.
.Fa len
@@ -443,7 +443,7 @@ makes a printable string from
The buffer pointed to by
.Fa str
must be large enough to hold the result. The constant
-.Li ASN_OIDSTRLEN
+.Li ASN_OIDSTRLEN
is defined to be the length of the maximum string generated by this function
(including the trailing NUL).
The function
@@ -468,11 +468,11 @@ starting with
.Sq ASN.1:
followed by the error message and an optional dump of the buffer.
.Sh SEE ALSO
-.Xr snmpd 1 ,
.Xr gensnmptree 1 ,
-.Xr bsnmplib 3
+.Xr snmpd 1 ,
+.Xr bsnmpagent 3 ,
.Xr bsnmpclient 3 ,
-.Xr bsnmpagent 3
+.Xr bsnmplib 3
.Sh STANDARDS
This implementation conforms to the applicable IETF RFCs and ITU-T
recommendations.
diff --git a/contrib/bsnmp/lib/bsnmpagent.3 b/contrib/bsnmp/lib/bsnmpagent.3
index a679fe8..d563aa9 100644
--- a/contrib/bsnmp/lib/bsnmpagent.3
+++ b/contrib/bsnmp/lib/bsnmpagent.3
@@ -26,13 +26,13 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/lib/bsnmpagent.3,v 1.6 2004/08/06 08:46:51 brandt Exp $
+.\" $Begemot: bsnmp/lib/bsnmpagent.3,v 1.7 2005/02/25 11:55:58 brandt_h Exp $
.\"
.Dd August 16, 2002
-.Dt bsnmpagent 3
+.Dt BSNMPAGENT 3
.Os
.Sh NAME
-.Nm bsnmpagent
+.Nm bsnmpagent ,
.Nm snmp_depop_t ,
.Nm snmp_op_t ,
.Nm tree ,
@@ -200,7 +200,7 @@ Note, that one must be careful when changing the tree while executing a SET
operation. Consult the sources for
.Xr snmpd 1 .
.Pp
-The global variable
+The global variable
.Va snmp_trace
together with the function pointed to by
.Va snmp_debug
@@ -309,7 +309,7 @@ interdependend table columns dependencies may be necessary.
If the previous step fails at any point, the node's operation callback
functions are called for all bindings for which SNMP_OP_SET was executed
with SNMP_OP_ROLLBACK, in the opposite order. This allows all variables to
-undo the effect of the SET operation. After this all the dependencies
+undo the effect of the SET operation. After this all the dependencies
are freed
and the finalizers are executed with a fail flag of 1. Then the function
returns to the caller with an appropriate error indication.
@@ -345,7 +345,7 @@ two OIDs. In the table case, the first oid is typically the table's base OID
and the second one the index. Both of these can easily be generated from the
variables OID with
.Fn asn_slice_oid .
-The function
+The function
.Fn snmp_dep_lookup
tries to find a dependency based on these two OIDs and, if it cannot find one
creates a new one. This means for the table example, that the function
@@ -399,10 +399,10 @@ If an error occures in any of the function an error indication as described
above is returned. Additionally the functions may call snmp_error on unexected
errors.
.Sh SEE ALSO
-.Xr snmpd 1 ,
.Xr gensnmptree 1 ,
-.Xr bsnmplib 3
+.Xr snmpd 1 ,
.Xr bsnmpclient 3 ,
+.Xr bsnmplib 3 ,
.Xr snmpmod 3
.Sh STANDARDS
This implementation conforms to the applicable IETF RFCs and ITU-T
diff --git a/contrib/bsnmp/lib/bsnmpclient.3 b/contrib/bsnmp/lib/bsnmpclient.3
index d75232e..9775ef2 100644
--- a/contrib/bsnmp/lib/bsnmpclient.3
+++ b/contrib/bsnmp/lib/bsnmpclient.3
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.7 2004/08/06 08:46:52 brandt Exp $
+.\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.8 2005/02/25 11:55:58 brandt_h Exp $
.\"
.Dd August 15, 2002
-.Dt bsnmpclient 3
+.Dt BSNMPCLIENT 3
.Os
.Sh NAME
.Nm snmp_client ,
@@ -145,12 +145,12 @@ for applicable values. The default version is
.Li SNMP_V2c .
.It Va trans
If this is
-.Dv SNMP_TRANS_LOC_DGRAM
+.Dv SNMP_TRANS_LOC_DGRAM
a local datagram socket is used.
If it is
-.Dv SNMP_TRANS_LOC_STREAM
+.Dv SNMP_TRANS_LOC_STREAM
a local stream socket is used.
-For
+For
.Dv SNMP_TRANS_UDP
a UDP socket is created.
It uses the
@@ -237,9 +237,8 @@ application.
.El
.Pp
In the current implementation there is a global variable
-.Bd -unfilled -offset indent
-.Vt extern struct snmp_client snmp_client ;
-.Ed
+.Pp
+.D1 Vt extern struct snmp_client snmp_client ;
.Pp
that is used by all the library functions. The first call into the library must
be a call to
@@ -580,10 +579,10 @@ in the
filed of
.Va snmp_client .
.Sh SEE ALSO
-.Xr snmpd 1 ,
.Xr gensnmptree 1 ,
+.Xr snmpd 1 ,
+.Xr bsnmpagent 3 ,
.Xr bsnmplib 3
-.Xr bsnmpagent 3
.Sh STANDARDS
This implementation conforms to the applicable IETF RFCs and ITU-T
recommendations.
diff --git a/contrib/bsnmp/lib/bsnmplib.3 b/contrib/bsnmp/lib/bsnmplib.3
index d4e0f13..a0da293 100644
--- a/contrib/bsnmp/lib/bsnmplib.3
+++ b/contrib/bsnmp/lib/bsnmplib.3
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/lib/bsnmplib.3,v 1.5 2004/08/06 08:46:52 brandt Exp $
+.\" $Begemot: bsnmp/lib/bsnmplib.3,v 1.6 2005/02/25 11:55:59 brandt_h Exp $
.\"
.Dd August 15, 2002
-.Dt bsnmplib 3
+.Dt BSNMPLIB 3
.Os
.Sh NAME
.Nm snmp_value_free ,
@@ -290,11 +290,11 @@ Success.
Encoding failed.
.El
.Sh SEE ALSO
-.Xr snmpd 1 ,
.Xr gensnmptree 1 ,
-.Xr bsnmplib 3
+.Xr snmpd 1 ,
+.Xr bsnmpagent 3 ,
.Xr bsnmpclient 3 ,
-.Xr bsnmpagent 3
+.Xr bsnmplib 3
.Sh STANDARDS
This implementation conforms to the applicable IETF RFCs and ITU-T
recommendations.
diff --git a/contrib/bsnmp/lib/snmpagent.c b/contrib/bsnmp/lib/snmpagent.c
index 5b42c83..38bc140 100644
--- a/contrib/bsnmp/lib/snmpagent.c
+++ b/contrib/bsnmp/lib/snmpagent.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/lib/snmpagent.c,v 1.18 2004/08/06 08:46:55 brandt Exp $
+ * $Begemot: bsnmp/lib/snmpagent.c,v 1.19 2004/08/19 17:09:09 brandt Exp $
*
* SNMP Agent functions
*/
@@ -339,6 +339,11 @@ do_getnext(struct context *context, const struct snmp_value *inb,
/* object has no data - try next */
if (++tp == tree + tree_size)
break;
+
+ if (TR(GETNEXT))
+ snmp_debug("getnext: no data - avancing to %s",
+ asn_oid2str(&tp->oid));
+
outb->var = tp->oid;
}
diff --git a/contrib/bsnmp/oid-list b/contrib/bsnmp/oid-list
new file mode 100644
index 0000000..ea7cb55
--- /dev/null
+++ b/contrib/bsnmp/oid-list
@@ -0,0 +1,21 @@
+$Begemot: bsnmp/oid-list,v 1.1 2005/02/25 12:21:00 brandt_h Exp $
+
+This file documents the OID assignments under BSNMP's private OID.
+
+While I was at Fraunhofer Fokus (www.fokus.fraunhofer.de) I registered
+an official OID for Fokus: enterprises 12325 and assigned the sub-OID 1
+to the software I develop. Under this OID there are:
+
+enterprises
+ 12325 FOKUS
+ 1 BEGEMOT
+ 1 BEGEMOT-SNMPD
+ 2 BEGEMOT-NETGRAPH snmpd netgraph module
+ 100 BEGEMOT-ILMID snmpd ILMID module
+ 101 BEGEMOT-ATM snmpd ATM module
+ 200 BEGEMOT-PF snmpd PF module (phillip@freebsd.org)
+
+If you need an OID and don't know where to stuck it in, I can assign you one -
+just drop me a mail.
+
+harti
diff --git a/contrib/bsnmp/snmp_mibII/mibII.c b/contrib/bsnmp/snmp_mibII/mibII.c
index 851f17e..f6760dc 100644
--- a/contrib/bsnmp/snmp_mibII/mibII.c
+++ b/contrib/bsnmp/snmp_mibII/mibII.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/snmp_mibII/mibII.c,v 1.20 2004/08/06 08:46:59 brandt Exp $
+ * $Begemot: bsnmp/snmp_mibII/mibII.c,v 1.21 2005/02/25 16:04:41 brandt_h Exp $
*
* Implementation of the standard interfaces and ip MIB.
*/
@@ -590,6 +590,7 @@ mibif_create(u_int sysindex, const char *name)
ifp->sysindex = sysindex;
strcpy(ifp->name, name);
strcpy(ifp->descr, name);
+ ifp->spec_oid = oid_zeroDotZero;
map = NULL;
if (!mib_if_is_dyn(ifp->name)) {
diff --git a/contrib/bsnmp/snmp_mibII/mibII_interfaces.c b/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
index a6ac11c..ffe94fd 100644
--- a/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
+++ b/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/snmp_mibII/mibII_interfaces.c,v 1.13 2004/08/06 08:47:01 brandt Exp $
+ * $Begemot: bsnmp/snmp_mibII/mibII_interfaces.c,v 1.14 2005/02/25 16:04:42 brandt_h Exp $
*
* Interfaces group.
*/
@@ -336,7 +336,7 @@ op_ifentry(struct snmp_context *ctx, struct snmp_value *value,
break;
case LEAF_ifSpecific:
- value->v.oid = oid_zeroDotZero;
+ value->v.oid = ifp->spec_oid;
break;
}
return (SNMP_ERR_NOERROR);
diff --git a/contrib/bsnmp/snmp_mibII/snmp_mibII.3 b/contrib/bsnmp/snmp_mibII/snmp_mibII.3
index 94b2590..b87a69c 100644
--- a/contrib/bsnmp/snmp_mibII/snmp_mibII.3
+++ b/contrib/bsnmp/snmp_mibII/snmp_mibII.3
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/snmp_mibII/snmp_mibII.3,v 1.4 2004/08/06 08:47:06 brandt Exp $
+.\" $Begemot: bsnmp/snmp_mibII/snmp_mibII.3,v 1.6 2005/02/28 16:00:11 brandt_h Exp $
.\"
.Dd August 19, 2002
-.Dt snmp_mibII 3
+.Dt SNMP_MIBII 3
.Os
.Sh NAME
.Nm mibII ,
@@ -151,6 +151,7 @@ struct mibif {
mibif_notify_f xnotify;
void *xnotify_data;
const struct lmodule *xnotify_mod;
+ struct asn_oid spec_oid;
};
.Ed
.Pp
@@ -337,9 +338,10 @@ The description of the MIB tree implemented by
.It Pa /usr/local/share/snmp/mibs
.It Pa @MIBSPATH@
The various internet MIBs.
+.El
.Sh SEE ALSO
-.Xr snmpmod 3 ,
-.Xr gensnmptree 1
+.Xr gensnmptree 1 ,
+.Xr snmpmod 3
.Sh STANDARDS
This implementation conforms to the applicable IETF RFCs.
.Sh AUTHORS
diff --git a/contrib/bsnmp/snmp_mibII/snmp_mibII.h b/contrib/bsnmp/snmp_mibII/snmp_mibII.h
index 506fde5..569c115 100644
--- a/contrib/bsnmp/snmp_mibII/snmp_mibII.h
+++ b/contrib/bsnmp/snmp_mibII/snmp_mibII.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/snmp_mibII/snmp_mibII.h,v 1.15 2004/08/06 08:47:06 brandt Exp $
+ * $Begemot: bsnmp/snmp_mibII/snmp_mibII.h,v 1.16 2005/02/25 16:04:43 brandt_h Exp $
*
* Implementation of the interfaces and IP groups of MIB-II.
*/
@@ -76,6 +76,9 @@ struct mibif {
mibif_notify_f xnotify;
void *xnotify_data;
const struct lmodule *xnotify_mod;
+
+ /* to be set by ifType specific modules. This is ifSpecific. */
+ struct asn_oid spec_oid;
};
/*
diff --git a/contrib/bsnmp/snmpd/bsnmpd.1 b/contrib/bsnmp/snmpd/bsnmpd.1
index c11ee6b..bfc792d 100644
--- a/contrib/bsnmp/snmpd/bsnmpd.1
+++ b/contrib/bsnmp/snmpd/bsnmpd.1
@@ -26,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.4 2004/08/06 08:47:10 brandt Exp $
+.\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.6 2005/02/25 11:56:01 brandt_h Exp $
.\"
.Dd August 15, 2002
.Dt SNMPD 1
@@ -47,7 +47,7 @@
The
.Nm
daemon servers the internet SNMP (Simple Network Managment Protocol).
-It is intended to server only the absolute basic MIBs and implement all other
+It is intended to serve only the absolute basic MIBs and implement all other
MIBs through loadable modules. In this way the
.Nm
can be used in unexpected ways.
@@ -84,7 +84,7 @@ value. The value can be specified in the usual C-syntax for numbers.
This option specifies a colon separated list of directories to search for
configuration include files. The default is
.Pa /etc:/usr/etc/:/usr/local/etc .
-These paths are only searched for include specified within <> parantheses.
+These paths are only searched for include specified within <> parentheses.
.It Fl l Ar prefix
The
.Ar prefix
@@ -112,7 +112,7 @@ MIB variable assignments
.El
.Pp
If a line is too long it can be continued on the next line by ending it with
-a backslash. Empty lines and lines who's first non-blank character is a
+a backslash. Empty lines and lines in which the first non-blank character is a
.Dq #
sign are ignored.
.Pp
@@ -123,7 +123,7 @@ in a single SET PDU. Any failure during the initial configuration read causes
to exit. A failure during the configuration read caused by a module load
causes the loading of the module to fail.
.Pp
-The configuration is red during initialisation of
+The configuration is read during initialisation of
.Nm ,
when a module is loaded and when
.Nm
@@ -177,7 +177,7 @@ include directive that takes one of two forms:
.Pp
The first form causes the file to be searched in the current directory, the
second form causes the file to be searched in the directories specified in
-the system include path. Nesting depths is only restricted by available
+the system include path. Nesting depth is only restricted by available
memory.
.Ss MIB VARIABLE ASSIGNMENTS
A MIB variable is assigned with the syntax
@@ -189,10 +189,10 @@ oid [ suboids ] = value
is the name of the variable to be set. Only the last component of the entire
name is used here. If the variable is a scalar, the index (.0) is automatically
appended and need not to be specified. If the variable is a table column,
-the index (
-.Va suboids )
+the index
+.Pq Va suboids
must be specified. The index consist of elements each seperated from the
-previous one by a dot. Elements may be either numbers, strings or hostnames
+previous one by a dot. Elements may be either numbers, strings or hostnames
enclosed in [] brackets. If the element is a number it is appended
to the current oid. If the element is a string, its length and the
.Tn ASCII
diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c
index 3575b9a..4654f5b 100644
--- a/contrib/bsnmp/snmpd/main.c
+++ b/contrib/bsnmp/snmpd/main.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/snmpd/main.c,v 1.89 2004/08/06 08:47:11 brandt Exp $
+ * $Begemot: bsnmp/snmpd/main.c,v 1.90 2005/02/25 11:50:03 brandt_h Exp $
*
* SNMPd main stuff.
*/
@@ -612,7 +612,7 @@ fd_resume(void *p)
#ifdef USE_LIBBEGEMOT
if (f->id >= 0)
return (0);
- if ((f->fd = poll_register(f->fd, input, f, POLL_IN)) < 0) {
+ if ((f->id = poll_register(f->fd, input, f, POLL_IN)) < 0) {
err = errno;
syslog(LOG_ERR, "select fd %d: %m", f->fd);
errno = err;
diff --git a/contrib/bsnmp/snmpd/snmpd.config b/contrib/bsnmp/snmpd/snmpd.config
index ffa3415..8de767c 100644
--- a/contrib/bsnmp/snmpd/snmpd.config
+++ b/contrib/bsnmp/snmpd/snmpd.config
@@ -26,7 +26,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Begemot: bsnmp/snmpd/snmpd.config,v 1.14 2004/08/06 08:47:12 brandt Exp $
+# $Begemot: bsnmp/snmpd/snmpd.config,v 1.15 2005/02/25 11:50:43 brandt_h Exp $
#
# Example configuration file.
#
@@ -62,6 +62,7 @@ begemotSnmpdPortStatus.127.0.0.1.161 = 1
# open a unix domain socket
begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
+begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
# send traps to the traphost
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
diff --git a/contrib/bsnmp/snmpd/snmpmod.3 b/contrib/bsnmp/snmpd/snmpmod.3
index 58cc953..496bd05 100644
--- a/contrib/bsnmp/snmpd/snmpmod.3
+++ b/contrib/bsnmp/snmpd/snmpmod.3
@@ -26,10 +26,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/snmpd/snmpmod.3,v 1.7 2004/08/06 08:47:14 brandt Exp $
+.\" $Begemot: bsnmp/snmpd/snmpmod.3,v 1.8 2005/02/25 11:56:01 brandt_h Exp $
.\"
.Dd August 16, 2002
-.Dt snmpmod 3
+.Dt SNMPMOD 3
.Os
.Sh NAME
.Nm INSERT_OBJECT_OID_LINK_INDEX ,
@@ -161,18 +161,26 @@ Begemot SNMP library
.Ft size_t
.Fn buf_size "int tx"
.Ft enum snmpd_input_err
-.Fn snmp_input_start "const u_char *buf" "size_t len" "const char *source" \
- "struct snmp_pdu *pdu" "int32_t *ip" "size_t *pdulen"
+.Fo snmp_input_start
+.Fa "const u_char *buf" "size_t len" "const char *source"
+.Fa "struct snmp_pdu *pdu" "int32_t *ip" "size_t *pdulen"
+.Fc
.Ft enum snmpd_input_err
-.Fn snmp_input_finish "struct snmp_pdu *pdu" "const u_char *rcvbuf" \
- "size_t rcvlen" "u_char *sndbuf" "size_t *sndlen" "const char *source" \
- "enum snmpd_input_err ierr" "int32_t ip" "void *data"
+.Fo snmp_input_finish
+.Fa "struct snmp_pdu *pdu" "const u_char *rcvbuf"
+.Fa "size_t rcvlen" "u_char *sndbuf" "size_t *sndlen" "const char *source"
+.Fa "enum snmpd_input_err ierr" "int32_t ip" "void *data"
+.Fc
.Ft void
-.Fn snmp_output "struct snmp_pdu *pdu" "u_char *sndbuf" "size_t *sndlen" \
- "const char *dest"
+.Fo snmp_output
+.Fa "struct snmp_pdu *pdu" "u_char *sndbuf" "size_t *sndlen"
+.Fa "const char *dest"
+.Fc
.Ft void
-.Fn snmp_send_port "void *trans" "const struct asn_oid *port" \
- "struct snmp_pdu *pdu" "const struct sockaddr *addr" "socklen_t addrlen"
+.Fo snmp_send_port
+.Fa "void *trans" "const struct asn_oid *port"
+.Fa "struct snmp_pdu *pdu" "const struct sockaddr *addr" "socklen_t addrlen"
+.Fc
.Ft void
.Fn snmp_send_trap "const struct asn_oid *oid" "..."
.Ft int
@@ -227,7 +235,7 @@ a string, that identfies the module to the daemon. This identifier is used
to select the correct configuration section from the configuration files and
to identify resources allocated to this module. A row in the module table is
created by writing a string of non-zero length to the
-.Va begemotSnmpdModulePath
+.Va begemotSnmpdModulePath
column. This string must be the complete path to the file containing the module.
A module can be unloaded by writing a zero length string to the path column
of an existing row.
@@ -340,7 +348,7 @@ the global one and the module is unloaded. If initialisation is successful,
the modules
.Fn start
function is called.
-After it returns the
+After it returns the
.Fn loaded
functions of all modules (including the loaded one) are called.
.Pp
@@ -436,7 +444,7 @@ argument to the node operation callback.
The variable
.Va this_tick
contains the tick (there are 100 SNMP ticks in a second) when
-the current PDU processing was started.
+the current PDU processing was started.
The variable
.Va start_tick
contains the tick when the daemon was started.
@@ -483,7 +491,7 @@ while the assignments in the configuration file are processed. To
or
.Li COMM_WRITE
when the community strings for the read-write or read-only community are found
-in the incoming PDU.
+in the incoming PDU.
.Pp
Modules can define additional communities. This may be necessary to provide
transport proxying (a PDU received on one communication link is proxied to
@@ -851,11 +859,11 @@ beginning at position
.Fa off .
.El
.Sh SEE ALSO
-.Xr snmpd 1 ,
.Xr gensnmptree 1 ,
-.Xr bsnmplib 3
+.Xr snmpd 1 ,
+.Xr bsnmpagent 3 ,
.Xr bsnmpclient 3 ,
-.Xr bsnmpagent 3
+.Xr bsnmplib 3
.Sh STANDARDS
This implementation conforms to the applicable IETF RFCs and ITU-T
recommendations.
diff --git a/contrib/bsnmp/snmpd/trans_lsock.c b/contrib/bsnmp/snmpd/trans_lsock.c
index 55b6902..3bcb333 100644
--- a/contrib/bsnmp/snmpd/trans_lsock.c
+++ b/contrib/bsnmp/snmpd/trans_lsock.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/snmpd/trans_lsock.c,v 1.5 2004/08/06 08:47:15 brandt Exp $
+ * $Begemot: bsnmp/snmpd/trans_lsock.c,v 1.6 2005/02/25 11:50:25 brandt_h Exp $
*
* Local domain socket transport
*/
@@ -34,6 +34,7 @@
#include <sys/un.h>
#include <sys/stat.h>
+#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <syslog.h>
OpenPOWER on IntegriCloud