History log of /freebsd-current/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 30dcd18b 03-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Swap parameters around with parse_syntax_strval(..) for consistency with
other parse_* APIs in bsnmp*

MFC after: 3 days
Noted by: bz


# 570afb92 31-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Call snmp_pdu_free on req/resp with a consistent, correct pattern

- snmp_pdu_free should be called before snmp_pdu_create is called
again
- snmp_pdu_free should be called on the resp to snmp_dialog when
successful

Tested with the following bsnmp commands:

% export SNMPUSER=bsnmp SNMPPASSWD=bsnmptest
% SNMP_ARGS="-A proto=sha -C context='' -K -P proto=des -v 3 -r 0"
% bsnmpset $SNMP_ARGS sysLocation="MyAgent"
% bsnmpget $SNMP_ARGS sysLocation
% bsnmpwalk $SNMP_ARGS

MFC after: 12 days
X-MFC with: r310729, r310892, r310894


# 1b135e4f 31-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

snmp_pdu_free the right object at the right time in snmptool_walk

r310892 was on the right track, but unfortunately it was resolving
the problem incorrectly and accidentally leaking memory in the
process.

- Call snmp_pdu_free on req before calling snmp_pdu_create on it
at the bottom of the outer while loop
- Call snmp_pdu_free on resp after calling snmpwalk_nextpdu_create
in the inner loop

MFC after: 12 days
X-MFC with: r310729, r310892
Reported by: valgrind


# bcf52557 31-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Don't call snmp_pdu_free(..) until finished with the pdu and when ready to
allocate a new one via snmp_pdu_create(..)

This fixes bsnmpwalk, so it no longer crashes after r310729

X-MFC with: r310729
MFC after: 12 days


# e1d581b2 27-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

style(9): clean up trailing whitespace

MFC after: 3 weeks


# 7c933da6 24-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Warning message cleanup

- Use warn instead of warnx + strerror(errno)
- Remove unnecessary trailing newline from a warnx call
- Add missing spaces following "," in syslog and warn* calls

MFC after: 2 weeks


# f16a380f 17-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Clean up parse_ip(..)

- Clean up trailing whitespace
- Fix variable alignment

MFC after: 1 week


# 19ffd5ec 14-May-2016 Enji Cooper <ngie@FreeBSD.org>

Mute sign compare warning by casting rc to u_int to match nbindings' type

rc cannot be negative -- that was already tested for earlier on in
the function

MFC after: 1 week
Reported by: clang, gcc
Sponsored by: EMC / Isilon Storage Division


# b9288caa 10-Jan-2012 Shteryana Shopova <syrinx@FreeBSD.org>

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


# 3df5ecac 30-Dec-2011 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for usr.sbin/


# a7398723 08-Dec-2010 Shteryana Shopova <syrinx@FreeBSD.org>

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@