In the monitoring plugins 2.2 release, the "check_snmp --help" output says this:
-4, --use-ipv4 Use IPv4 connection -6, --use-ipv6 Use IPv6 connection but the code says otherwise about how the long options are named: {"ipv4", no_argument, 0, '4'}, {"ipv6", no_argument, 0, '6'}, This discrepancy can cause a lot of confusion. Looking around at the other plugins that have similar arguments: check_by_ssh check_dig check_fping check_http check_ldap check_ntp check_ntp_peer check_ntp_time check_ping check_smtp check_ssh check_tcp their code all supports the full --use-ipv4 and --use-ipv6 arguments, and not the --ipv4 and --ipv6 forms. So for the sake of consistency, the code in check_snmp.c should be modified to support what the help message says. Perhaps for backward compatibility, it might also be useful to continue supporting the --ipv4 and --ipv6 forms with check_snmp, but I will leave that for others to decide.