freebsd-dev/contrib/bsnmp
Dimitry Andric b740e02500 bsnmp: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in bsnmp's snmpd.h:

    contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            peer->input.stream = 1;
                               ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.

MFC after:	3 days
2023-04-17 18:26:03 +02:00
..
gensnmpdef Similar to r311750, check for the result from smiGetModule to avoid a segfault 2017-01-09 06:13:27 +00:00
gensnmptree Follow the standard object definition from RFC2578 2022-12-29 22:02:27 +02:00
lib bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2023-03-03 08:11:39 -05:00
snmp_mibII Follow the standard object definition from RFC2578 2022-12-29 22:02:27 +02:00
snmp_ntp Update bsnmp to version 1.13. This does not bring user-visible changes. 2018-07-03 08:44:40 +00:00
snmp_target bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2023-03-03 08:11:39 -05:00
snmp_usm bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2023-03-03 08:11:39 -05:00
snmp_vacm bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2023-03-03 08:11:39 -05:00
snmpd bsnmp: make single bit bitfields unsigned to avoid clang 16 warning 2023-04-17 18:26:03 +02:00
tests Merge release 1.14 of bsnmp. 2020-04-01 15:25:16 +00:00
FREEBSD-upgrade
FREEBSD-Xlist
NEWS
oid-list
README
TODO
VERSION Update bsnmp to version 1.13. This does not bring user-visible changes. 2018-07-03 08:44:40 +00:00

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