summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp/snmpd
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
commit273b7adb85a03a00c3b173831af21c60e5d77eb0 (patch)
treea51b475bc2677600ec8246577e5ea721c041a42d /contrib/bsnmp/snmpd
parent3a13f9df8e23f636a28dcd8d08fb4ace5d70eb57 (diff)
downloadFreeBSD-src-273b7adb85a03a00c3b173831af21c60e5d77eb0.zip
FreeBSD-src-273b7adb85a03a00c3b173831af21c60e5d77eb0.tar.gz
Virgin import of bsnmpd 1.8
Diffstat (limited to 'contrib/bsnmp/snmpd')
-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
5 files changed, 41 insertions, 31 deletions
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