aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bsnmpd/modules
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1627-54/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* bsnmpd snmp_bridge: Remove set but unused variable.John Baldwin2023-06-201-3/+2
|
* bsnmpd/modules/snmp_lm75: Fix typosElyes Haouas2023-06-021-1/+1
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/653
* bsnmpd/modules/snmp_hostres: Fix typosElyes Haouas2023-06-024-8/+8
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/653
* bsnmpd/modules/snmp_bridge: Fix typosElyes Haouas2023-06-021-1/+1
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/653
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1212-12/+12
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-198-8/+11
|
* snmp_hostres(3): Fix a typo in a debug messageGordon Bergling2022-07-031-1/+1
| | | | | | - s/atempt/attempt/ MFC after: 3 days
* Remove DS_BUSY caseWarner Losh2021-11-301-1/+0
| | | | | | DS_BUSY is no longer a device state. Remove it from here. Sponsored by: Netflix
* bsnmpd: Remove "All Rights Reserved" from FreeBSD Foundation copyrightsEd Maste2021-10-226-7/+1
| | | | Sponsored by: The FreeBSD Foundation
* bsnmp: Fix incorrect use of libpfctlKristof Provost2021-06-171-2/+2
| | | | | | | | | | When we introduced libpfctl in bnsmpd this was done incorrectly, and a GETRULE call was replaced by pfctl_add_rule(). Change it to pfctl_get_rule(). Reviewed by: donner MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate")
* bsnmpd: Return the correct uptime.Warner Losh2021-05-051-30/+7
| | | | | | | | | | | | | | Do not assume that the kernel boot time is invariant. It is not. FreeBSD uses the formula: wall_time = boot_time + uptime where uptime is monotinically increasing and boot_time is adjusted to get the proper time of day. FreeBSD offers a way to retrieve the uptime directly, so use that instead of trying to compute it by subtracting boot_time from wall_time. Sponsored by: Netflix Reviewed by: cy@ Differential Revision: https://reviews.freebsd.org/D30114
* pf: Allow multiple labels to be set on a ruleKristof Provost2021-04-261-1/+1
| | | | | | | | | | | | Allow up to 5 labels to be set on each rule. This offers more flexibility in using labels. For example, it replaces the customer 'schedule' keyword used by pfSense to terminate states according to a schedule. Reviewed by: glebius MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29936
* libpfctl: Switch to pfctl_ruleKristof Provost2021-04-101-8/+9
| | | | | | | | | | | Stop using the kernel's struct pf_rule, switch to libpfctl's pfctl_rule. Now that we use nvlists to communicate with the kernel these structures can be fully decoupled. Reviewed by: glebius MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29644
* bsnmp: Use libpfctlKristof Provost2021-04-102-1/+6
| | | | | | | Reviewed by: glebius MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29642
* snmp_wlan(3): Fix mandoc warningsGordon Bergling2020-11-201-15/+17
| | | | | | | - new sentence, new line Notes: svn path=/head/; revision=367899
* Fix a comment for the SUN geom class.Warner Losh2020-02-101-1/+1
| | | | | | | | Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Notes: svn path=/head/; revision=357737
* Fix comment. It mentioned sparc64 specifically, but alignment issuesWarner Losh2020-02-101-2/+1
| | | | | | | | | | are present elsewhere. Reivewed by: cy@, bcr@ Differential Revision: https://reviews.freebsd.org/D23593 Notes: svn path=/head/; revision=357736
* Fix the following -Werror warning from clang 10.0.0 in bsnmpd:Dimitry Andric2020-01-311-1/+2
| | | | | | | | | | | | | | | | | usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading indentation; statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation] return (-1); ^ usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is here } else ^ The intent was to group the return statement with the previous syslog() call. MFC after: 3 days Notes: svn path=/projects/clang1000-import/; revision=357339
* Fix the following -Werror warning from clang 10.0.0 in bsnmpd:Dimitry Andric2020-01-291-2/+2
| | | | | | | | | | | | | usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare] begemotBridgeStpPortEnable_enabled || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ Work around it by casting the enum values to the type of val->v.integer. MFC after: 3 days Notes: svn path=/projects/clang1000-import/; revision=357271
* Update Makefile.depend filesSimon J. Gerraty2019-12-113-3/+3
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* No need for each bsnmpd(1) module to open connection to syslogShteryana Shopova2019-06-211-1/+0
| | | | | | | | | | | | bsnmpd(1) main does that early on init and the connection is available to all loaded modules Event: Vienna Hackathon 2019 PR: 233431 , 221487 MFC after: 2 weeks Notes: svn path=/head/; revision=349265
* Unbreak snmp_pf(3) after the changes introduced in r338209Shteryana Shopova2019-06-212-2/+2
| | | | | | | | | PR: 237011 Event: Vienna Hackathon 2019 MFC after: 2 weeks Notes: svn path=/head/; revision=349264
* snmp_hostres(3): fix a typo in sanity checks in handle_chunk()Andriy Voskoboinyk2019-02-181-1/+1
| | | | | | | | | PR: 204253 Submitted by: David Binderman <dcb314@hotmail.com> MFC after: 5 days Notes: svn path=/head/; revision=344245
* Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths ofPatrick Kelsey2018-08-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2^32 bps or greater to be used. Prior to this, bandwidth parameters would simply wrap at the 2^32 boundary. The computations in the HFSC scheduler and token bucket regulator have been modified to operate correctly up to at least 100 Gbps. No other algorithms have been examined or modified for correct operation above 2^32 bps (some may have existing computation resolution or overflow issues at rates below that threshold). pfctl(8) will now limit non-HFSC bandwidth parameters to 2^32 - 1 before passing them to the kernel. The extensions to the pf(4) ioctl interface have been made in a backwards-compatible way by versioning affected data structures, supporting all versions in the kernel, and implementing macros that will cause existing code that consumes that interface to use version 0 without source modifications. If version 0 consumers of the interface are used against a new kernel that has had bandwidth parameters of 2^32 or greater configured by updated tools, such bandwidth parameters will be reported as 2^32 - 1 bps by those old consumers. All in-tree consumers of the pf(4) interface have been updated. To update out-of-tree consumers to the latest version of the interface, define PFIOC_USE_LATEST ahead of any includes and use the code of pfctl(8) as a guide for the ioctls of interest. PR: 211730 Reviewed by: jmallett, kp, loos MFC after: 2 weeks Relnotes: yes Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D16782 Notes: svn path=/head/; revision=338209
* Update bsnmp to version 1.13. This does not bring user-visible changes.Hartmut Brandt2018-07-0316-7/+18
| | | | | | | | | | For developers gensnmptree can now generate functions for enums to convert between enums and strings and to check the validity of a value. The sources in FreeBSD are now in sync with the upstream which allows to bring in IPv6 modifications. Notes: svn path=/head/; revision=335885
* SPDX: use the Beerware identifier.Pedro F. Giffuni2017-11-301-0/+2
| | | | Notes: svn path=/head/; revision=326408
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2712-0/+24
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-3111-12/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* bsnmpd: Only refresh devtree if devd event is a new or removed device.Pedro F. Giffuni2017-10-281-1/+3
| | | | | | | | | | | It makes sense to refresh the tree only when a device is inserted or removed, otherwise bsnmpd wastes lot of CPU. PR: 209368 MFC after: 1 week Notes: svn path=/head/; revision=325067
* Remove the NATM framework including the en(4), fatm(4), hatm(4), andBrooks Davis2017-04-246-506/+1
| | | | | | | | | | | | | | | | | | | | | | | | patm(4) devices. Maintaining an address family and framework has real costs when we make infrastructure improvements. In the case of NATM we support no devices manufactured in the last 20 years and some will not even work in modern motherboards (some newer devices that patm(4) could be updated to support apparently exist, but we do not currently have support). With this change, support remains for some netgraph modules that don't require NATM support code. It is unclear if all these should remain, though ng_atmllc certainly stands alone. Note well: FreeBSD 11 supports NATM and will continue to do so until at least September 30, 2021. Improvements to the code in FreeBSD 11 are certainly welcome. Reviewed by: philip Approved by: harti Notes: svn path=/head/; revision=317383
* Use nitems() from sys/param.h.Marcelo Araujo2017-03-121-1/+1
| | | | | | | | Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943 Notes: svn path=/head/; revision=315102
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-281-4/+0
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Add smilint target to subdir targets so "make smilint" here will runEnji Cooper2017-01-171-1/+3
| | | | | | | | | | | | the smilint target in subdirs While here, convert a path that's .CURDIR relative to SRCTOP MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312330
* Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328Enji Cooper2017-01-172-10/+0
| | | | | | | | | MFC after: 1 week X-MFC with: r312328 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312329
* Add a REVISION section to track changes for the BEGEMOT-NETGRAPH MIB fileEnji Cooper2017-01-091-0/+13
| | | | | | | | | | | This change also documents the modification harti made to a handful of objects in r122758 (the max OCTET STRING width was increased from 15 to 31 octets) MFC after: 1 week Notes: svn path=/head/; revision=311761
* Add a REVISION section to track changes for the BEGEMOT-ATM-FREEBSD-MIB MIB fileEnji Cooper2017-01-091-1/+3
| | | | | | | | | | There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Notes: svn path=/head/; revision=311758
* Add a REVISION section to track changes for the hostres moduleEnji Cooper2017-01-091-0/+3
| | | | | | | | | | There haven't been any changes to the MIB definition, so the REVISION remains static at the version it was imported at MFC after: 1 week Notes: svn path=/head/; revision=311741
* Improve the smilint target in the hostres and mibII modulesEnji Cooper2017-01-092-4/+6
| | | | | | | | | | | - Mark the smilint target .PHONY so it's always executed when requested - Leverage .PATH for BMIBS instead of spelling the path out longhand for them MFC after: 1 week Notes: svn path=/head/; revision=311740
* Use SRCTOP instead of spelling out the full path with .CURDIREnji Cooper2017-01-097-8/+8
| | | | | | | | | This helps condense the output for CFLAGS and .PATH MFC after: 3 days Notes: svn path=/head/; revision=311739
* OS_getSystemUptime: use nitems for calculating the number of elementsEnji Cooper2017-01-051-2/+2
| | | | | | | | | in a sysctl mib instead of hardcoding the number 2 MFC after: 3 days Notes: svn path=/head/; revision=311393
* style cleanupEnji Cooper2017-01-041-3/+2
| | | | | | | | | | - bridge_pf_dump: use nitems instead of spelling it out longhand - bridge_do_pfctl: sort variables by alignment for type MFC after: 1 week Notes: svn path=/head/; revision=311294
* bridge_do_pfctl: allocate mib_name dynamically using asprintfEnji Cooper2017-01-041-7/+12
| | | | | | | | | | | | | This is being done to reduce wasted space, simplify complexity in the code, and to quell a Coverity warning about buffer overruns. warning about buffer overruns. MFC after: 1 week Reported by: Coverity CID: 1006736 Notes: svn path=/head/; revision=311293
* bridge_get_pfval: use nitems instead of spelling it out longhandEnji Cooper2017-01-041-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=311291
* Use strlcpy instead of strcpy when copying the bridge name to ifr.ifr_nameEnji Cooper2017-01-041-3/+3
| | | | | | | | | | | to avoid buffer overflows MFC after: 1 week Reported by: Coverity CID: 1006735, 1006737, 1006738 Notes: svn path=/head/; revision=311290
* Fix the build by moving the initializers for len/nswapdev down below theEnji Cooper2016-12-281-2/+5
| | | | | | | | | | declarations MFC after: 3 days Pointyhat to: ngie Notes: svn path=/head/; revision=310675
* style(9): clean up whitespaceEnji Cooper2016-12-281-8/+8
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=310669
* style(9) fixes: clean up leading whitespaceEnji Cooper2016-12-281-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=310667
* style(9) fixesEnji Cooper2016-12-287-20/+20
| | | | | | | | | | - Clean up trailing whitespace - Fix variable type alignment in storage_OS_get_swap(..) MFC after: 3 days Notes: svn path=/head/; revision=310666
* Only build/install usr.sbin/bsnmpd/modules/snmp_hast if MK_HAST != noEnji Cooper2016-12-281-1/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=310665