summaryrefslogtreecommitdiff
path: root/usr.bin/snmp
AgeCommit message (Collapse)Author
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-03-10tansformed -> transformedJonathan Gray
2022-01-05Add error checking for EVP_Digest*() to snmp(1).Theo Buehler
ok martijn
2022-01-05Straightforward conversion to EVP_* on the heap.Theo Buehler
ok martijn
2021-10-21Sync ober_oid_cmp with ax_oid_cmp from libagentx.Martijn van Duren
This flips the returned signedness and adds the weight of 2 for parent-child relationship in both direction. This makes ober_oid_cmp consistent with the rest of the *_cmp based functions. OK tb@
2021-08-11Change default version to -v3 and remove the default community.Martijn van Duren
Similar to what happend in snmpd(8). OK sthen@
2021-08-11On usage for commands without the common flags (mibtree) make sure there'sMartijn van Duren
a space between the subcommand and the flags. OK sthen@
2021-08-08Switch default snmpd and snmp auth back to hmac-sha1.Stuart Henderson
Practical experience on several machines after updates suggests the snmp world isn't really ready for hmac-sha2-256, and the HMAC construction doesn't require collision resistance (which is the weakness of MD5/SHA1; see e.g. "New proofs for NMAC and HMAC: Security without collision-resistance", Bellare 2014). Feedback from martijn@ (who would prefer to keep using the sha2 hmac), deraadt@, tb@.
2021-06-20Change the authentication protocol (-a) default to SHA-256 and the privacyMartijn van Duren
protocol (-x) default to AES. The old defaults are just not sane anymore. OK sthen@
2021-03-23Fix some ranges and type handling.Martijn van Duren
OK sthen@
2021-03-23Add DisplayString/SnmpAdminString in accordance with recent OPENBSD-PF-MIBMartijn van Duren
changes. OK sthen@
2021-03-12spellingJonathan Gray
2021-03-03remove unreachable and unneeded codeJonathan Gray
ok martijn@
2021-01-04Remove BER_TYPE_BOOLEAN, it's not part of the spec and I haven't seen itMartijn van Duren
used anywhere. OK jan@
2020-12-14Implement displaying SMI enums as text.Martijn van Duren
For now limit to TruthValue implemented on ifPromiscuousMode and ifConnectorPresent. OK jan@
2020-12-02Add argc check for snmp trap and drop to usage if we're short.Martijn van Duren
OK deraadt@
2020-09-14Allow snmp mibtree to take one or more arguments who will be converted toMartijn van Duren
an output format of your choosing. OK deraadt@ jan@
2020-09-12Let snmp df make use of the new displayhint code, so we don't print randomMartijn van Duren
garbage to the description column if the server gives us that. OK jan@
2020-08-08Reorder SNMPv2-MIB to match order with original document.Martijn van Duren
Some minor touchups while here.
2020-08-08Reorganize SNMPv2-MIB so that all it's elements are together and in orderMartijn van Duren
of the original definition, for better comparability. While here rename snmpProxies to snmpProxys, since that's what it's called. Also add the zeroDotZero object.
2020-08-08Clean up smi_mibtree.Martijn van Duren
It checks on o_oid[0] for 0, which prevents us from adding the ccitt oid and its zeroDotZero subsidiary. Change this to check for o_name, which is always set, because mibtree is filled by MIBDECL().
2020-08-08Implement SNMP-USM-AES-MIB and SNMP-USM-HMAC-SHA2-MIBMartijn van Duren
2020-08-08Polish up SNMP-USER-BASED-SM-MIB and SNMP-FRAMEWORK-MIB.Martijn van Duren
This changes a couple of object names, but this makes them comply with the actual MIB definition.
2020-08-08Somewhere during working on UTF-8 support I thought it was a good idea toMartijn van Duren
use sysContact as a testcase, because it's readily available in snmpd, but forgetting it's actual textual convention as time went by, which is DisplayString (which is ASCII). Add support for the DisplayString textual convention, which is similar to having no textual convention, except that invalid bytes (value 128 and up) are printed as UTF-8 replacement characters, or question mark, depending on LC_CTYPE. Feedback and OK schwarze@
2020-08-08Document UTF-8 support in snmp.Martijn van Duren
Lots of feedback and OK schwarze@
2020-08-03Add support for UTF-8 DISPLAY-HINTs with octet length. For now onlyMartijn van Duren
sysContact is supported with SnmpAdminString, but more shall follow soon(tm). Note that this will change output even in the C locale: Previously every unprintable byte would be tranformed to a '.', with this diff a valid UTF-8 multibyte or unprintable character will be squished into a single dot to give a better understanding of the intention of the original message. Invalid bytes will now be printed as question marks. Lot's of help and back and forth with schwarze@ who also kindly offered to walk away when I mentioned looking through MIB files for more objects to convert to this new code, which is understandable. OK schwarze@
2020-08-02missing {} identified by clang10Theo de Raadt
ok martijn
2020-06-30Fix two minor issues in snmpc_parseagent.Martijn van Duren
2020-05-31Fix an of by one when printing the oid of the error index.Martijn van Duren
2020-05-31OIDs are unsigned. Reflect this when printing them.Martijn van Duren
2020-05-19Shave of some leftovers from snmpd's MIB initialization that are not neededMartijn van Duren
for snmp. Minus 503 LoC and about 200KB on binary size. OK denis@
2020-05-10Initialize a couple of variables to shut up gcc, which apparently isn'tMartijn van Duren
smart enough to see that there is a proper check in place to prevent uninitialized usage. OK deraadt@
2020-05-08Fix obvious copy-past-O in calculation of maximum length of "Available"Martijn van Duren
column for df subcommand. Fixes misalignment in some cases.
2020-04-23 ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread;Jason McIntyre
2020-03-24When doing a loop inside a loop for input validation make sure that theMartijn van Duren
continue statement for the outer loop is executed in the outer loop. Found the hard way by breaking snmpd(8) in my local tree.
2020-03-22Fix agent address parsing:Martijn van Duren
- Allow IPv6 addresses to be used based on format. - Allow IPv6 addresses without brackets skip the port if it results in a nonsensical address. This allows us to use ::1 - Try to connect to the address immediately instead of only trying the socket. - Add pledge unix so we can actually create a unix socket. Feedback, additional testing and OK jan@
2020-01-25Remove a sleep call that I used for some testing that slipped in duringMartijn van Duren
the import of the df subcommand.
2020-01-21remove trailing whitespace;Jason McIntyre
2020-01-17Some minor usage() bits omitted in the original diffs.Martijn van Duren
2020-01-17Implement a df subcommand, this outputs disk and memory information in aMartijn van Duren
df(1) format. OK jan@ General positive sounds from the hackroom and Michael W Lucas
2020-01-17Add better support for exception contexts.Martijn van Duren
Now we can see proper nosuchinstance and endofmibtree messages. OK jan@
2020-01-17Implement a -Cs option for snmp walk and bulkwalk.Martijn van Duren
This option allows you to skip subsections of a tree and allows for faster walking with less (undesired) clutter on screen. OK florian@ jan@ Happy sounds from Michael W. Lucas
2019-10-26Remove common from "common options" in usage to be closer to SYNOPSIS.Martijn van Duren
Discussed with jmc@
2019-10-26Shorten the SYNOPSIS greatly.Martijn van Duren
While here also fix some wrong definitions. With help from jmc@ Requested by and OK deraadt@
2019-10-24The ber_* namespace is used by liblber since time immemorial,Theo Buehler
so move our BER API to the unused ober_* prefix to avoid some breakage in ports. Problem diagnosed by jmatthew with ber_free() in samba, but there are many others as pointed out by sthen. tests & ok rob ok sthen (who had an almost identical diff for libutil) "go head hit it" deraadt
2019-10-11don't use sizeof(pointer) to represent buffer sizeJonathan Gray
ok martijn@ deraadt@
2019-10-09Use snprintf instead of sprintf.Martijn van Duren
Requested by and OK deraadt@
2019-10-08Free the "e" element in ber_printf_elements if it fails, since there's noMartijn van Duren
chance that it's part of the new ber structure. Feedback and OK claudio@
2019-10-08Don't rely on the pdu returning the correct errorindex.Martijn van Duren
Noticed by semarie@ Feedback and OK claudio@
2019-10-07If optstring is NULL and usecommonopt is true, optstr was prependedAlexander Bluhm
by uninitialized garbage. Crash in snmp(1) found by regress/usr.sbin/snmpd. OK martijn@