Commit Graph

300 Commits

Author SHA1 Message Date
Joel Dahl
2063b2c09b Minor spelling and grammar fixes. 2013-04-11 19:05:24 +00:00
Mikolaj Golub
aebd8de674 hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs
size and usage in hrStorageAllocationUnits. If the file system has
more than 2^31 allocations it can not be shown correctly and the
meters are useless.

In such cases follow net-snmp behaviour and increase
hrStorageAllocationUnits so the values fit under INT_MAX.

PR:		bin/177183
Submitted by:	Eugene Grosbein egrosbein rdtc.ru
MFC after:	2 weeks
2013-03-25 19:12:36 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Pedro F. Giffuni
646a7fea0c Clean some 'svn:executable' properties in the tree.
Submitted by:	Christoph Mallon
MFC after:	3 days
2013-01-26 22:08:21 +00:00
Simon J. Gerraty
7cd2dcf076 Updated/new Makefile.depend 2012-11-08 21:24:17 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Mikolaj Golub
16c3b091ae In snmp_hostres, device_map table is used for consistent device table
indexing. When a device has gone it is not removed from device_map
table but just its entry_p field is set to NULL.

So when traversing device_map in disk_OS_get_ATA_disks() and
disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the
bsnmpd crash is possible when a removed map entry is dereferenced.

Before the fix, for disk_OS_get_ATA_disks() the crash could be easily
reproduced running:

  atacontrol detach ata1

The crash was not observed in disk_OS_get_MD_disks() because currently
snmp_hostres does no see md(4) disks: to get the device list it uses
devinfo(3), which does not return md devices.

Reported by:	Miroslav Lachman 000.fbsd quip.cz
MFC after:	1 week
2012-09-17 07:32:53 +00:00
Gleb Smirnoff
6a9e7628f8 Do not count kernel threads as processes for hrSystemProcesses OID.
PR:		bin/160494
Submitted by:	Jeremy Chadwick <freebsd jdc.parodius.com>
2012-09-11 08:33:16 +00:00
Gleb Smirnoff
5739f2975d Spelling. 2012-09-11 08:28:58 +00:00
Gleb Smirnoff
d6d3f01e0a Merge the projects/pf/head branch, that was worked on for last six months,
into head. The most significant achievements in the new code:

 o Fine grained locking, thus much better performance.
 o Fixes to many problems in pf, that were specific to FreeBSD port.

New code doesn't have that many ifdefs and much less OpenBSDisms, thus
is more attractive to our developers.

  Those interested in details, can browse through SVN log of the
projects/pf/head branch. And for reference, here is exact list of
revisions merged:

r232043, r232044, r232062, r232148, r232149, r232150, r232298, r232330,
r232332, r232340, r232386, r232390, r232391, r232605, r232655, r232656,
r232661, r232662, r232663, r232664, r232673, r232691, r233309, r233782,
r233829, r233830, r233834, r233835, r233836, r233865, r233866, r233868,
r233873, r234056, r234096, r234100, r234108, r234175, r234187, r234223,
r234271, r234272, r234282, r234307, r234309, r234382, r234384, r234456,
r234486, r234606, r234640, r234641, r234642, r234644, r234651, r235505,
r235506, r235535, r235605, r235606, r235826, r235991, r235993, r236168,
r236173, r236179, r236180, r236181, r236186, r236223, r236227, r236230,
r236252, r236254, r236298, r236299, r236300, r236301, r236397, r236398,
r236399, r236499, r236512, r236513, r236525, r236526, r236545, r236548,
r236553, r236554, r236556, r236557, r236561, r236570, r236630, r236672,
r236673, r236679, r236706, r236710, r236718, r237154, r237155, r237169,
r237314, r237363, r237364, r237368, r237369, r237376, r237440, r237442,
r237751, r237783, r237784, r237785, r237788, r237791, r238421, r238522,
r238523, r238524, r238525, r239173, r239186, r239644, r239652, r239661,
r239773, r240125, r240130, r240131, r240136, r240186, r240196, r240212.

I'd like to thank people who participated in early testing:

Tested by:	Florian Smeets <flo freebsd.org>
Tested by:	Chekaluk Vitaly <artemrts ukr.net>
Tested by:	Ben Wilber <ben desync.com>
Tested by:	Ian FREISLICH <ianf cloudseed.co.za>
2012-09-08 06:41:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Dimitry Andric
7ae0e2c9f0 Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
2012-08-20 18:33:03 +00:00
Glen Barber
a3fb6da9ba General mdoc(7) and typo fixes.
PR:		167734
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-11 20:06:46 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Joel Dahl
c2965cd185 mdoc: terminate quoted strings.
Reviewed by:	brueffer
2012-03-26 15:18:14 +00:00
Joel Dahl
c0cbd1c6f1 Remove superfluous paragraph macro. 2012-03-25 09:18:34 +00:00
Ed Schouten
6b99842ada Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after:	1 month
2012-02-12 18:29:56 +00:00
Shteryana Shopova
b9288caaf6 Implement an option to execute SNMP walks using GETBULK requests in bsnmpwalk(1)
retrieving multiple values with a Single PDU.

Reviewed by:	philip@
Tested by:	tsanand129 (at) gmail (dot) com
2012-01-10 15:29:03 +00:00
Ulrich Spörlein
b81da4450d Partial backout of r228990, restore original MIB object name.
It's too late to change this in 9.0 -- so we have a release with the
misspelling in the wild and should not break users that depend on it.

Deprecating/replacing it because of a one-char typo seems excessive.
2012-01-05 21:36:28 +00:00
Ed Schouten
b589816c74 Fix subtle typo: compare against idx -- not index.
In this contest, index refers to the index(3) function. In this case it
doesn't really harm, as this function is never called with idx == NULL.

MFC after:	2 weeks
2012-01-03 11:10:15 +00:00
Ulrich Spörlein
3df5ecac8c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
Dimitry Andric
1605515d77 In usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h, use the correct
enumeration types for the mesh_peering and mesh_forwarding members of
struct wlan_iface, to fix enum conversion warnings.

MFC after:	1 week
2011-12-17 19:53:08 +00:00
Ivan Voras
1c4edd12cd Apparently, "ada" drives are better treated similarly to "da" drives. 2011-10-24 12:59:39 +00:00
Ivan Voras
9601613ecd It seems that the warning is much less severe than its message says. The
device is certainly added to the list after the first pass.
2011-10-24 12:43:20 +00:00
Ivan Voras
e9e42921af Fix typo
MFC after:	1 month
2011-10-24 12:21:58 +00:00
Ulrich Spörlein
f0720ed5f8 Fix broken mdoc.
Found by:	manlint
Approved by:	re (kib)
2011-08-01 22:21:18 +00:00
Andrey V. Elsukov
8f64015c0e Use full buffer size in read(2) call, there is no need to preserve the
last byte of the buffer.

Since we call refresh_device_tbl() for any devctl event types - no need
to check the first byte of buffer. Remove these checks.

Also remove logging for the case of unknown devd message. It incorrectly
triggers when all devctl events are not fit into one buffer and part of
unread data will be read in the next pass.

When length of data readed from devctl is equal to sizeof(buf), then try
to read from socket again, to read full data.

MFC after:	2 weeks
2011-07-11 12:51:35 +00:00
Ed Schouten
48a16a34d8 Remove redundant assignments to WARNS.
For these directories, WARNS is already implied to be 6.
2011-06-06 20:24:17 +00:00
Ruslan Ermilov
a6d11f7139 [mdoc] Fixed .Dt call. 2011-05-25 14:13:53 +00:00
Shteryana Shopova
cf90ea94a0 Unbreak the build by temprorarily not using include directives in
bsnmpd(1)' def files, until bsd.snmpmod.mk & Makefiles are fixed to
pass proper include path flags to gensnmptree.
2010-12-20 22:56:50 +00:00
Shteryana Shopova
72cd7a520d Bring in a SNMP module that allows configuration of SNMPv3 Notification targets.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip
Approved by:	philip
2010-12-20 17:13:14 +00:00
Shteryana Shopova
1c706be073 Pass proper -Wl,-export-dynamic to ld. Thus bsnmpd(1) compiled with clang
properly exports its symbols to the modules.

Submitted by:	dim
2010-12-16 15:18:53 +00:00
Shteryana Shopova
695239e2c7 Remove unnecessary debug/error CFLAGS.
Reported by	: pawel.worach (at) gmail (dot) com
2010-12-11 13:24:01 +00:00
Shteryana Shopova
836993f5cf Unbreak "make installworld" w/ DESTDIR specified
PR	:	kern/152939
2010-12-09 12:25:45 +00:00
Shteryana Shopova
a739872374 Add bsnmpd(1)'s SNMP client tools (including SNMPv3 support) to the base system.
Sponsored by:   The FreeBSD Foundation (the SNMPv3 bits), Google Summer of Code 2005
Reviewed by:    philip@ (mostly), bz@ (earlier version based on p4 ch124545)
Approved by:    philip@
2010-12-08 14:30:25 +00:00
Shteryana Shopova
135f7de5dd In bsnmpd(1) add support for SNMPv3 message processing model, including message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415).
Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip@ (mostly)
Approved by:	philip@
2010-12-08 13:51:38 +00:00
Ulrich Spörlein
ac203a768d Fix CPU load reporting independent of scheduler used.
- Sample CPU usage data from kern.cp_times, this makes for a far more
  accurate and scheduler independent algorithm.
- Rip out the process list scraping that is no longer required.
- Don't update CPU usage sampling on every request, but every 15s
  instead. This makes it impossible for an attacker to hide the CPU load
  by triggering 4 samplings in short succession when the system is idle.
- After reaching the steady-state, the system will always report the
  average CPU load of the last 60 sampled seconds.
- Untangling of call graph.

PR:		kern/130222
Tested by:	Julian Dunn <jdunn@aquezada.com>
		Gustau Pérez <gperez@entel.upc.edu>
		Jürgen Weiß <weiss@uni-mainz.de>
MFC after:	2 weeks

I'm unsure if some MIB standard states this must be the load average
for, eg. 300s, it looks like net-snmp isn't even bothering to implement
the CPU load reporting at all.
2010-10-28 20:18:26 +00:00
Joel Dahl
c2025a7660 Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages.  Minor corrections by me.

Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2010-08-16 15:18:30 +00:00
Joel Dahl
f6ac23919b Fix typos and spelling mistakes. 2010-08-06 14:33:42 +00:00
Shteryana Shopova
5593fdda18 Connect the snmp_wlan(3) module to the build.
Sponsored by:	The FreeBSD Foundation
2010-07-26 16:26:26 +00:00
Shteryana Shopova
09cbe818f0 Bring in a SNMP module to support monitoring cloned wireless interfaces
via bsnmpd(1). The module implements a private BEGEMOT-WIRELESS-MIB.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip@
Approved by:	philip@
2010-07-26 16:16:39 +00:00
Simon L. B. Nielsen
12b052b9e0 Make failed open of /dev/mdctl in the bsnmpd hostres module non-fatal.
This makes it possible to use the hostres module when bsnmpd is not
running as root.

MFC after:	1 week
2010-07-24 10:04:35 +00:00
Ulrich Spörlein
62486687ed mdoc: consistently spell our email addresses <foo@FreeBSD.org>
Reviewed by:	ru
2010-05-19 08:57:53 +00:00
Shteryana Shopova
438be77d54 Now actually implement reading/refreshing/returning data from the pfTablesAddrTable
and modify the BEGEMOT-PF-MIB to add support for IPV6 address' statistics in the PF
tables via pfTablesAddrNetType and pfTablesAddrNet. While here, upgrade the
pf_tree.def file to the new format that includes enumerated values. Also make sure
to return SNMP_ERR_NOSUCHNAME for ALTQ objects, if ALTQ is disabled, so that the agent
will know to skip the pfAltq subtree when servicing GETNEXT requests from SNMP clients
(otherwise snmpwalk on begemotPf would stop at the pfAltq subtree with bsnmpd returning
SNMP_ERR_GENERR).
2010-03-24 16:07:33 +00:00
Shteryana Shopova
9315567023 Make sure the snmp_pf module will first refresh its entires if necessary,
then find a specific entry, and get the requested value. So far, it found
the specific entry, refreshed the entry list if necessary, and got the
requested value from the found entry. The problem is that refreshing nukes
all old entries and replaces them with new ones and the obtained entry
pointer was no longer valid after the refresh.

Reviewed by:		bz, philip
MFC after:		1 week
2010-03-19 09:53:25 +00:00
Shteryana Shopova
72d420c708 Add support for retrieving labeled pf filter rule counters.
PR:		bin/132847
Submitted by:	Szalai Andras <szalai (dot) bandi (at) gmail.com>
2010-03-18 14:54:31 +00:00
Ulrich Spörlein
7729e3ba40 Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
the toplevel directory.

This does not change any WARNS level and survives a make universe.

Approved by:        ed (co-mentor)
2010-03-02 18:44:08 +00:00
Ed Schouten
b5810e9449 Port all applications in usr.sbin/ from libulog to utmpx. 2010-01-13 18:17:53 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Ed Schouten
71713ba2e1 Let the snmp_hostres module use utmpx.
Approved by:	harti
2009-12-24 17:55:47 +00:00
Shteryana Shopova
1753369083 Make sure enough memory is allocated for a struct pft_entry when
refreshing the list of pf tables.

OKed by:	philip
MFC after:	1 week
2009-12-05 13:45:21 +00:00
Attilio Rao
1262810177 Collapse devinfo_state_t with device_state_t in order to avoid a
structure replication and improve manteneability.

Reviewed by:	jhb, imp
Tested by:	Riccardo Torrini <riccardo at torrini dot org>
2009-11-15 16:44:43 +00:00
Ken Smith
3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
Kip Macy
a9eb07938f add zfs oid to bsnmpd
PR: bin/129360
Submitted by:	Ulrich Spoerlein
2009-05-17 05:54:25 +00:00
Bruce M Simpson
7a02aaee75 Only build the bsnmpd netgraph module if MK_NETGRAPH_SUPPORT is set. 2008-10-02 14:26:56 +00:00
Philip Paeps
0fecb888b2 Use INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
filling the table of ALTQ queues retrieved from the kernel.

It is possible for the kernel to return the queues not by pa.altq.qid order.
When this happens, pf_snmp would only partially fill its table.

PR:		bin/120974
Submitted by:	Mykola Dzham <i -at- levsha.org.ua>
MFC after:	3 days
2008-06-01 14:09:54 +00:00
Shteryana Shopova
24988ed32d Keep the snmp_bridge(3) module up to date with if_bridge(4) and add an
object to control the value of the new 'PRIVATE' bridge members' flag.
While here, remove stale '__unused' compiler directives.

Reviewed by:	bz
Approved by:	re (bmah), bz (mentor)
2007-08-08 19:27:50 +00:00
Max Laier
60ee384760 Link pf 4.1 to the build:
- move ftp-proxy from libexec to usr.sbin
 - add tftp-proxy
 - new altq mtag link

Approved by:	re (kensmith)
2007-07-03 12:46:08 +00:00
Rong-En Fan
27cfc42fc5 - Bump share library version which were missed in last bump
Reported by: 	     jhb
Discussed with:	     deischen, des, doubg, harti
Approved by:	     re (kensmith)
2007-06-18 18:47:54 +00:00
Pawel Jakub Dawidek
6b3d6017e8 s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
Soeren Straarup
7b8287fb85 ! is a generic info message
Reviewed by:	harti
Approved by:	harti
MFC after:	2 weeks
2007-03-09 16:29:15 +00:00
Shteryana Shopova
ffdddc92b4 Remove all #if __FreeBSD_version checks now that RSTP support has been
MFCed to RELENG_6. We no longer need that to compile the bridge module
under both RELENG_6 and CURRENT.

Approved by:	bz (mentor)
2007-02-04 13:31:05 +00:00
Bjoern A. Zeeb
61644918e3 Re-connect snmp_bridge to the build. It survived a make universe
(apart from powerpc where the build broke earlier).
2006-12-29 19:24:51 +00:00
Bjoern A. Zeeb
a245531a29 bridge_snmp.h
* Change the API of bridge_get_basemac to take a maximum buffer length.

bridge_if.c
* Adopt to new API.
* In bridge_attach_newif() remove an additional pointer to the buffer
  by shuffling the code a bit. Also makes the code more readable.

bridge_sys.c
* bridge_get_basemac():
  - Adopt to the new API.
  - Change check for error code of getifaddrs().
  - First check for sa_family != AF_LINK.
  - Copy sockaddr_dl * to get around alignment constraints on some
    platforms.
  - Use strcmp instead of strncmp so that "foo11" != "foo1".
* other functions:
  - Allocate n times of the struct we need instead of arbitrary len,
    cast to the type we want it to be and pass around struct *s instead
    of char *s. This gets us around alignment restrictions on some
    platforms and in addition it is more clear what data is passed around.
  - Name variables for same types consistently.

Reviewed by:    syrinx
2006-12-29 19:23:38 +00:00
Bjoern A. Zeeb
6f3914bcf4 ia64 is nit-picking according to tinderbox so temporary disconnect
the bridge module from the build until this is fixed.
2006-12-21 01:58:22 +00:00
Shteryana Shopova
814c25f3ad Connect the snmp_bridge(3) module to the build.
Approved by:	bz (mentor)
2006-12-20 22:08:35 +00:00
Shteryana Shopova
3c6bf05583 Keep in sync with the if_bridge(4) module (rev. 1.20 if_bridgevar.h,
1.12 bridgestp.h) and rename all PointToPoint related variables
from P2P to PTP (s/P2P/PTP/g s/p2p/ptp/g).

Approved by:	bz (mentor)
2006-12-20 22:02:45 +00:00
Shteryana Shopova
42910bde6c Remove an unused variable.
Approved by:	bz (mentor)
2006-12-20 21:31:28 +00:00
Shteryana Shopova
f02a1e5794 Do not add 'default:' cases inside a switch() on an enum like the
SNMP option argument. That way the compiler will give a warning in
case of a missing or an extra but unknown 'case:'.
Do the same for SNMP LEAF objects to be prepared once gensnmptree will
auto-generate enums for those too.
Add an abort() after the switch() instead of the 'default:' to catch
any errors. The nice side effect is that the compiler will correctly
track supposed to be 'uninitialized' variables with that.

When trying to set a value sanity check it before calling the OS
dependent API of snmp_bridge to tell whether it is an attempt to
set a bad value or a general error.

Suggested by:	harti (first part)
Approved by:	bz (mentor)
2006-12-15 20:01:57 +00:00
Shteryana Shopova
5b6598a8c2 Instead of explicitly initializing variables to avoid compiler warnings,
add a default case to handle the situation when the variables are not
initialized.
Furthermore, abort() if the snmp agent passes an invalid option to the
bridge module. As the option (SET, GET, GETNEXT, COMMIT, ROLLBACK) is
determined by the snmp agent based on the operation requested by user,
this behaviour is unlikely to be abused as a source for a DoS, but if
ever hit will likely reveal a problem in the snmp agent or bridge
module.

Approved by:    bz (mentor)
2006-12-09 20:58:26 +00:00
Shteryana Shopova
b5906f8eed Add support for RSTP (RFC4318) to the SNMP bridge monitoring module.
Approved by:	bz (mentor)
2006-12-07 22:36:17 +00:00
Shteryana Shopova
7850265edd Bring in a SNMP module to support monitoring if_bridge(4) interfaces
via bsnmpd(1). The module implements IETF BRIDGE-MIB as defined in
RFC4188 and a private BEGEMOT-BRIDGE-MIB.

Sponsored by:  Google Summer of Code 2006
Reviewed by:   bz
Approved by:   bz (mentor)
2006-11-19 15:42:48 +00:00
Hartmut Brandt
1e1c4c13fb Make the generated oid.h dependend on the Makefile. The Makefile defines
the symbols to be extracted from the MIB and if that list of symbols is
changed, oid.h should be re-generated.
2006-11-08 10:36:57 +00:00
Gleb Smirnoff
99eebd2a7c Fix buildworld. 2006-10-31 21:44:46 +00:00
Ruslan Ermilov
66f6e0e5df Revise markup. 2006-09-30 19:07:03 +00:00
Hartmut Brandt
e55adffce7 Reduce the memory requirements for the tables by (1) using malloced strings
instead of maximum sized arrays embedded in the table structures and (2)
using pointers to constant oids instead of copying the oid into each
table structure. This also fixes indexing in the case when a string used
for indexing is longer than the maximum size allowed in the MIB.

Submitted by:	Victor Cruceru <soc-victor@>
2006-07-14 09:07:56 +00:00
Ruslan Ermilov
e4a9274404 Add missing library dependencies. 2006-04-13 12:49:24 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Hartmut Brandt
7a775b30e9 Silence some warnings by defining configuration preprocessor symbols. 2006-03-13 09:23:51 +00:00
Ruslan Ermilov
da59fb310d A bandaid to unbreak world. 2006-02-27 20:46:34 +00:00
Hartmut Brandt
b8874ce66e Link the new file from the vendor fix to the build and install
the new MIB files. Add a target to smilint the MIB files.
2006-02-13 14:12:15 +00:00
Joel Dahl
fbf9b468d5 Expand contractions. 2006-02-01 14:33:14 +00:00
Erwin Lansing
5bc32c2c2b After changing hostres from libdisk to libgeom, it now compiles
and runs on amd64, so revert the stopgap from rev. 1.10

Approved by:		harti
Hardware borrowed from:	simon
2006-01-26 21:32:51 +00:00
Hartmut Brandt
4ecdfdcf91 Replace ki_ocomm by ki_comm. The former will go away.
Submitted by:	Victor Cruceru <soc-victor>
Suggested by:   Julian Elischer
2006-01-26 12:19:10 +00:00
Hartmut Brandt
1de368e2f2 Fix a bug in the processor load code: the wrong process was used to
get the inital processor load. Also fix compilation on sparc64 without NDEBUG.
2006-01-26 12:15:06 +00:00
Hartmut Brandt
c8203bd856 Fix false positives when searching for disks. Things like adv(4) are not
disks.

Submitted by:	Victor Cruceru <soc-victor@>
2006-01-26 11:49:27 +00:00
Hartmut Brandt
e8689b4ce4 Fix the MIB to use libgeom instead of libdisk.
Submitted by:	Victor Cruceru <soc-victor>
2006-01-26 10:13:32 +00:00
David E. O'Brien
f5eea0f5f2 Unbreak the AMD64 build by forgoing the 'snmp_hostres' functionality.
Approved by:	harti
2006-01-13 02:09:15 +00:00
Hartmut Brandt
6c5d6ce3dd Fix build without -DNDEBUG.
Spotted by:	obrien
2006-01-12 07:44:40 +00:00
David E. O'Brien
d1682a2c99 assert(3) is not used here. 2006-01-12 02:53:42 +00:00
Hartmut Brandt
5348e773b2 Connect the HOSTRES MIB to the build. 2006-01-09 12:34:07 +00:00
Hartmut Brandt
d76947f322 msg 2006-01-09 12:33:45 +00:00
Philip Paeps
14edf864f1 Check for altq presence during module init, and allow module to work even if
altq is not present (just disable the altq bits in that case).

PR:		89601
Submitted by:	Juraj Lutter <otis -at- sk.freebsd.org>
MFC after:	3 days
2005-11-30 21:08:04 +00:00
Ruslan Ermilov
8a98250bf9 Fix prototypes. 2005-11-24 14:23:16 +00:00
Hartmut Brandt
b89b4d4d9a Use the new bsd.snmpmod.mk makefile to build the modules. The -I pointers
into the contrib directory are still necessary for some of the Makefiles,
because the C-sources there use non-canonical includes ("" includes) to get
at the header files.
2005-11-10 10:14:57 +00:00
Hartmut Brandt
1fea9479b2 Use the canonical include name for snmpmod.h. The build infrastructure takes
already care to pick up the correct version of the file depending on how
we build.
2005-11-10 10:12:01 +00:00
Hartmut Brandt
3f9b405c78 Catch up with the import of bsnmp-1.11. Add a couple of new
configuration flags to CFLAGS.
2005-10-04 15:03:39 +00:00
Philip Paeps
2c94e1ffc1 Fix unhandled malloc errors.
PR:		bin/83467
Submitted by:	Dan Lukes <dan -at- obluda.cz>
Prodded by:	glebius
MFC after:	3 days
2005-08-29 10:08:04 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Ken Smith
a84020c2b9 Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
2005-07-22 17:19:05 +00:00
Hartmut Brandt
09907cdf46 No need to specify the include subdirectory. During buildworld the
correct files are included from a temp. include directory.

Explained by:	ru
2005-05-25 12:04:44 +00:00
Hartmut Brandt
14bf9dc9bc This module was wrongly including header from /usr/include. Give it
the correct path to the source headers.
2005-05-23 12:24:46 +00:00
Philip Paeps
56037aa4e3 Catch up with the bsnmpd daemon's 64bit time ticks. 2005-05-23 11:41:14 +00:00
Hartmut Brandt
d6d9dd67f4 The ticks delivered by the SNMP daemon are now 64-bit, so make our
local tick variable which is used to reduce the number of updates from
kernel structures and to ensure intra-PDU consistency also 64 bit.
2005-05-23 11:24:39 +00:00
Hartmut Brandt
da4969a319 Bump the shared library version number of the modules because of
changes in the module interface.
2005-05-23 11:22:54 +00:00
Hartmut Brandt
8bacf1a614 Enable tcp-wrapper support in the SNMP daemon.
Submitted by:	glebius
2005-04-26 16:49:15 +00:00
Philip Paeps
cc1ee05370 time_t is signed, so s/uintmax_t/intmax_t/g. Has anyone got an extra pointy
hat for me?  I'm running out of them.

Spotted by:	des
Pointy hat to:	philip
2005-03-15 14:52:11 +00:00
Philip Paeps
d3ddf1d615 Cast time_t to uintmax_t so they can be printed as %ju without breaking on
various architectures.  This should appease tinderbox on alpha and not break
it anywhere else.

Suggested by:	harti
2005-03-15 10:45:42 +00:00
Philip Paeps
18467146cd Make this compile properly on 64bit machines.
Pointy hat to:	philip
2005-03-14 23:01:25 +00:00
Philip Paeps
2f5e00be39 Add snmp_pf, a bsnmpd module for monitoring (not managing!) pf firewalls.
Currently implemented are most things related to states and interfaces, todo
are address tables and altq.  I've tried to keep this roughly in sync with a
project implementing this for net-snmpd.

Reviewed by:	harti, dhartmei
MFC after:	1 month
2005-03-14 22:16:39 +00:00
Hartmut Brandt
1c80835774 Finish repo-copy of lib/libbsnmp/modules to usr.sbin/bsnmpd/modules.
These modules are modules for the daemon, not for the library so
they should be where the daemon is.
2005-03-14 17:32:16 +00:00
Ruslan Ermilov
59892d33e5 who's -> whose 2005-02-13 23:23:30 +00:00
Ruslan Ermilov
254dd1666e Let bsd.prog.mk set SRCS and MAN to their default values. 2005-01-28 16:08:11 +00:00
Ruslan Ermilov
ead5223f54 Fixed punctuation in xrefs. 2005-01-21 20:48:00 +00:00
Ruslan Ermilov
07736e20e9 NOATM -> NO_ATM 2004-12-21 09:08:06 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Giorgos Keramidas
c084d183ed Delete a .Fn that had no argument and
properly terminate a .Bl with a matching .El

MFC after:	3 days
2004-10-09 04:03:08 +00:00
Tom Rhodes
5f892a7ff0 Fix build in the !NOATM case by using the begemot library in place of
using libisc which was a part of BIND8.

Discussed with:	des, re, dougb
Submitted by:	harti (one part)
Reviewed by:	harti (previous version)
2004-09-24 22:10:34 +00:00
Hartmut Brandt
0d5467be9e Link to the build again. The problem was that we need a new
gensnmptree for the .def file to parse. This was fixed in
Makefile.inc1.
2004-08-11 16:47:12 +00:00
Hartmut Brandt
6c6e198147 Again something bad is happening so comment out the ATM module. 2004-08-11 16:01:46 +00:00
Hartmut Brandt
d6024e35bf Now, after the import of NgATM-1.1, re-enable the atm module. 2004-08-11 12:27:31 +00:00
Scott Long
ddb75b6fab Disable the snmp_atm module until the source gets fixed. This will unbreak
this portion of the build.
2004-08-10 04:56:39 +00:00
Hartmut Brandt
c33ca5aaa0 Link the snmp_atm module to the build unless NOATM is defined. 2004-08-09 16:40:39 +00:00
Hartmut Brandt
a566bd48a8 Now that gensnmptree can read and merge more than one tree make
the rule so that the tree .c and .h files can be produced from several
trees.
2004-08-09 16:37:25 +00:00
Hartmut Brandt
9856b0ba40 A module for bsnmpd(1) that exports a MIB that contains information about
the local ATM interfaces and allows to change some parameters via SNMP.
2004-08-09 16:36:04 +00:00
Ruslan Ermilov
1c85060a13 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Hartmut Brandt
a0f139102f Install the MIBs and the definition file to the new location under
/usr/share/snmp.

Noted by: bmah
2004-04-15 08:56:06 +00:00
Hartmut Brandt
16b2454cdb Use a MANFILTER to patch the man pages to point to the right path.
Noted by: phk
2004-04-14 16:31:54 +00:00
Hartmut Brandt
a9ad93accb Put the name of the module first in the list of all .Nm calls with
argument. This makes the output of calling .Nm without an argument
more senseful later on.
2004-04-14 16:11:05 +00:00
Hartmut Brandt
c254ec5573 Compare with 0 if comparing an integer, not with NULL. 2004-04-14 16:09:20 +00:00
Hartmut Brandt
9de3b3505c Move the SNMP MIBs and tree definitions from /usr/share/bsnmp to
/usr/share/snmp. This mirrors the use of /usr/local/share/snmp and
makes also more sense when non-bsnmp-specific MIBs go in.
2004-04-14 16:06:19 +00:00
Mark Murray
16fc3635f7 Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
Hartmut Brandt
92ba581c32 Rename the makefile variable MIBS to BMIBS so that it does not
conflict with the environment variable MIBS that is used by net-snmp.
2004-01-24 20:14:03 +00:00
Hartmut Brandt
0543f20b95 Rename the MIBS makefile variable to BMIBS so that it does not conflict
with the environment variable MIBS that is used by net-snmp.
2004-01-24 20:12:30 +00:00
Hartmut Brandt
b6a6dd1872 Create the OID and tree files while building the modules and the daemon
instead of creating them by hand and storing them in the CVS tree. Add
gensnmptree to the bootstrap tools (it is used to generated these files).
This simplifies the update procedure.

Submitted by:	ru
2004-01-23 16:22:49 +00:00
Hartmut Brandt
006d70f8ec Update generated files. 2004-01-23 11:08:47 +00:00
Hartmut Brandt
ec8a2cd977 Catch up with import of version 1.5a of bsnmp. 2004-01-23 11:08:17 +00:00
Hartmut Brandt
1e1beb03a8 Catch up with the import of version 1.5a of bsnmp.
Fix the script to insert $FreeBSD$ into the generated file instead
of the script's FreeBSD id.
2004-01-23 11:07:55 +00:00
Hartmut Brandt
f1bd897915 Style: remove an empty line. 2004-01-23 11:01:57 +00:00
Ruslan Ermilov
ec56136935 Clean up makefiles.
Reviewed by:	harti
2004-01-19 19:26:02 +00:00
Hartmut Brandt
89624a3490 Replace all uses of the old netgraph constants NG_*LEN by the new
constants NG_*SIZ that include the trailing NUL byte. This change
is mostly mechanical except for the replacement of a couple of snprintf()
and sprintf() calls with strlcpy.
2003-11-15 15:26:35 +00:00
Hartmut Brandt
07841df0e6 Add an empty definition of the MIBS variable so that the makefile does
not try to use a MIBS definition from the environment.

Submitted by:	Joe Marcus Clarke <marcus@marcuscom.com>
2003-11-13 10:18:16 +00:00
Hartmut Brandt
360b288fd2 The snmp_netgraph module depends on libnetgraph. So add a dependency and
add libnetgraph to the list of prebuilt libraries in the main Makefile.

Reviewed by:	ru
2003-11-12 17:09:13 +00:00
Hartmut Brandt
723d6e6459 Correct the include path so that the include files are found
with include "...".
2003-11-10 14:04:34 +00:00
Hartmut Brandt
9bba371fbf Fix the build by adjusting the include directives. The problem was
that the sources use "..." includes to get at include files that
later on reside in an include sub-directory.
2003-11-10 13:43:26 +00:00
Hartmut Brandt
91a2f929e4 Add the build infrastructure for the SNMP daemon that is the base
for the NgATM ILMI daemon and for the tree parsing helper program.
2003-11-10 09:22:40 +00:00
Hartmut Brandt
259ee3d78e Add build infrastructure for libbsnmp and the modules. Add the
netgraph module for the SNMP daemon.
2003-11-10 09:17:34 +00:00