freebsd-dev/contrib/bsnmp
Andrey V. Elsukov f3afd27f5f Add to bsnmpd(1) ability to specify multiple community strings with
different access rights.

By default there are two community strings with index 1 and 2, one for
read-only access and second for read-write access:

  begemotSnmpdCommunityString.0.1 = $(read)
  begemotSnmpdCommunityString.0.2 = $(write)

Now it is possible to define additional community strings using different
indexes:

  begemotSnmpdCommunityString.0.3 = "SomeString1"
  begemotSnmpdCommunityPermission.0.3 = 1
  begemotSnmpdCommunityString.0.4 = "SomeString2"
  begemotSnmpdCommunityPermission.0.4 = 2
  begemotSnmpdCommunityString.0.5 = "SomeString3"
  begemotSnmpdCommunityString.0.6 = "SomeString4"

New attribute begemotSnmpdCommunityPermission can be used to specify access
rights: 1 means "read-only" access, 2 means "read-write" access. If
attribute is not specified for some index this means "read-only" rights.

Community strings must be unique, i.e. must not be the same for different
indexes.

Obtained from:		Yandex LLC
MFC after:		2 weeks
Sponsored by:		Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D13785
2018-01-19 08:48:14 +00:00
..
gensnmpdef Similar to r311750, check for the result from smiGetModule to avoid a segfault 2017-01-09 06:13:27 +00:00
gensnmptree style(9): clean up trailing whitespace 2016-12-27 23:32:54 +00:00
lib bsnmp: explicitly test the return value for open_client_{local,udp} in snmp_open(..) 2017-03-20 17:26:13 +00:00
snmp_mibII Hide struct inpcb, struct tcpcb from the userland. 2017-03-21 06:39:49 +00:00
snmp_ntp style(9): clean up trailing whitespace 2016-12-27 23:32:54 +00:00
snmp_target style(9): clean up trailing whitespace 2016-12-27 23:32:54 +00:00
snmp_usm op_usm_users: don't deref uusers if it's NULL when SETting the value 2017-01-05 09:46:36 +00:00
snmp_vacm style(9): clean up trailing whitespace 2016-12-27 23:32:54 +00:00
snmpd Add to bsnmpd(1) ability to specify multiple community strings with 2018-01-19 08:48:14 +00:00
FREEBSD-upgrade
FREEBSD-Xlist
NEWS
oid-list Register OID for HAST module. 2013-05-08 20:04:32 +00:00
README
TODO
VERSION

Fri Dec  5 15:01:16 CET 2003

This is a mini-SNMP daemon. The basic daemon implements the system group
and a number of private extensions to manage the UDP transport mapping,
communities, trap destinations and loadable modules. In this form it can
be used to provide remote access to arbitrary data that can be described in
the form as required by the SMI. The daemon speaks both SNMPv1 and SNMPv2c.

One basic loadable module is provided together with the daemon:

- snmp_mibII provides the information groups for ip, tcp, and udp.

Installation
------------

As usual by doing:

	configure [--with-libbegemot[=path]]
	make
	make install

This does not install a configuration file. The standard location for the
configuration is /etc/snmpd.config, but can be overwritten on the command
line. An example configuration file is provided. Use --with-libbegemot
to use libbegemot instead of libisc.

Running
-------

	snmpd [-m name[=value]] [-p pid-file] [-c config-file] [-d] [-l prefix]
	      [-D debug-flags] [-I path]

	-m	defines a configuration macro. If no value is given it
		is set to the empty string.

	-p	specify the file where to store the PID. Default is
		/var/run/{prefix}.pid.

	-c	specify the configuration file. Default is /etc/{prefix}.config.

	-d	don't go into daemon mode.

	-l	specify the prefix. This is used for the default config and
		pid file names and for the syslog. Default is "snmpd".

	-D	specify debug flags:

		d	dump all PDUs.

		e	debug event library.

	-I	specify the include path for system configuration files.
		Default is /etc:/usr/etc:/usr/local/etc.

The directory snmpd contains a snmpd.sh script, which can be copied to
/usr/local/etc/rc.d to automatically start and stop the daemon. snmpd.config
is an example config script.

Bug reports:
-----------

Please report bugs to harti@freebsd.org.

Happy hacking,
harti