START usr.bin/snmp 2024-01-25T10:05:20Z ==== start ==== pkill -xf "/usr/sbin/snmpd -f /usr/src/regress/usr.bin/snmp/obj/snmpd.conf" *** Error 1 in target 'stop' (ignored) printf 'listen_addr="127.0.0.1"\n' > snmpd.conf printf 'listen6_addr="::1"\n\n' >> snmpd.conf printf '# Restrict daemon to listen on localhost only\n' >> snmpd.conf printf 'listen on $listen_addr snmpv1 snmpv2c snmpv3\n' >> snmpd.conf printf 'listen on tcp $listen_addr snmpv1 snmpv2c snmpv3\n' >> snmpd.conf printf 'listen on $listen6_addr snmpv1 snmpv2c snmpv3\n' >> snmpd.conf printf 'listen on tcp $listen6_addr snmpv1 snmpv2c snmpv3\n' >> snmpd.conf printf 'listen on $listen_addr notify snmpv1 snmpv2c snmpv3\n\n' >> snmpd.conf printf 'read-only community public\n' >> snmpd.conf printf 'read-write community private\n' >> snmpd.conf printf 'trap community public\n\n' >> snmpd.conf printf '# (ab)use sysContact for DisplayString (255a) testing\n' >> snmpd.conf printf 'system contact "Reyk Fl\303\266ter"\n' >> snmpd.conf printf 'system services 74\n\n' >> snmpd.conf printf '# Provide static user-defined SNMP OIDs\n' >> snmpd.conf printf 'oid 1.3.6.1.4.1.30155.42.3.1 name testStringValue read-only string "Test"\n' >> snmpd.conf printf 'oid 1.3.6.1.4.1.30155.42.3.2 name testStringValue read-only string "abcdefghijklmnopqrstuvwxyz"\n' >> snmpd.conf printf 'oid 1.3.6.1.4.1.30155.42.3.3 name testIntValue read-write string a\n' >> snmpd.conf printf 'oid 1.3.6.1.4.1.30155.42.3.4 name testIntValue read-write integer 1\n' >> snmpd.conf printf '# (ab)use usmUserName for SnmpAdminString (255t) tests\n' >> snmpd.conf printf 'oid 1.3.6.1.6.3.15.1.2.2.1.2.1 name testStringValue read-only string "Reyk Fl\303\266ter"\n' >> snmpd.conf printf 'oid 1.3.6.1.6.3.15.1.2.2.1.2.2 name testStringValue read-only string "Reyk Fl\303ter"\n' >> snmpd.conf printf "# 256 a's\n" >> snmpd.conf printf 'oid 1.3.6.1.6.3.15.1.2.2.1.2.3 name testStringValue read-only string "%s"\n' "$(jot -ba 256 | tr -d '\n')" >> snmpd.conf printf "# 254 a's + replacement character\n" >> snmpd.conf printf 'oid 1.3.6.1.6.3.15.1.2.2.1.2.4 name testStringValue read-only string "%s\357\277\275"\n\n' "$(jot -ba 254 | tr -d '\n')" >> snmpd.conf printf '# Enable SNMPv3 USM with authentication, encryption and two defined users\n' >> snmpd.conf printf 'seclevel none\n\n' >> snmpd.conf printf 'user md5_des authkey testtest auth hmac-md5 enckey testtest enc des\n' >> snmpd.conf printf 'user md5_aes authkey testtest auth hmac-md5 enckey testtest enc aes\n' >> snmpd.conf printf 'user sha1_des authkey testtest auth hmac-sha1 enckey testtest enc des\n' >> snmpd.conf printf 'user sha1_aes authkey testtest auth hmac-sha1 enckey testtest enc aes\n' >> snmpd.conf printf 'user sha224_des authkey testtest auth hmac-sha224 enckey testtest enc des\n' >> snmpd.conf printf 'user sha224_aes authkey testtest auth hmac-sha224 enckey testtest enc aes\n' >> snmpd.conf printf 'user sha256_des authkey testtest auth hmac-sha256 enckey testtest enc des\n' >> snmpd.conf printf 'user sha256_aes authkey testtest auth hmac-sha256 enckey testtest enc aes\n' >> snmpd.conf printf 'user sha384_des authkey testtest auth hmac-sha384 enckey testtest enc des\n' >> snmpd.conf printf 'user sha384_aes authkey testtest auth hmac-sha384 enckey testtest enc aes\n' >> snmpd.conf printf 'user sha512_des authkey testtest auth hmac-sha512 enckey testtest enc des\n' >> snmpd.conf printf 'user sha512_aes authkey testtest auth hmac-sha512 enckey testtest enc aes\n\n' >> snmpd.conf printf 'trap handle 1.3 "/usr/src/regress/usr.bin/snmp/obj/traphandle.sh"\n' >> snmpd.conf printf '#!/bin/sh\n\n' > traphandle.sh printf 'while read line; do\n' >> traphandle.sh printf '\tprintf "%%s\\n" "$line" >> /usr/src/regress/usr.bin/snmp/obj/trap_output\n' >> traphandle.sh printf 'done\n' >> traphandle.sh chmod +x traphandle.sh touch trap_output chmod a+rw trap_output /usr/sbin/snmpd -f /usr/src/regress/usr.bin/snmp/obj/snmpd.conf ==== agent_udp_v4 ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_v4.exp /usr/bin/snmp get -v2c -cpublic udp:127.0.0.1 sysServices.0 > agent_udp_v4.res diff -up agent_udp_v4.exp agent_udp_v4.res ==== agent_udp_v4_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_v4_port.exp /usr/bin/snmp get -v2c -cpublic udp:127.0.0.1:161 sysServices.0 > agent_udp_v4_port.res diff -up agent_udp_v4_port.exp agent_udp_v4_port.res ==== agent_udp_v4_service ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_v4_service.exp /usr/bin/snmp get -v2c -cpublic udp:127.0.0.1:snmp sysServices.0 > agent_udp_v4_service.res diff -up agent_udp_v4_service.exp agent_udp_v4_service.res ==== agent_v4_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_v4_port.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1:161 sysServices.0 > agent_v4_port.res diff -up agent_v4_port.exp agent_v4_port.res ==== agent_v4_service ==== printf "sysServices.0 = INTEGER: 74\n" > agent_v4_service.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1:snmp sysServices.0 > agent_v4_service.res diff -up agent_v4_service.exp agent_v4_service.res ==== agent_tcp_v4 ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_v4.exp /usr/bin/snmp get -v2c -cpublic tcp:127.0.0.1 sysServices.0 > agent_tcp_v4.res diff -up agent_tcp_v4.exp agent_tcp_v4.res ==== agent_tcp_v4_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_v4_port.exp /usr/bin/snmp get -v2c -cpublic tcp:127.0.0.1:161 sysServices.0 > agent_tcp_v4_port.res diff -up agent_tcp_v4_port.exp agent_tcp_v4_port.res ==== agent_udp_udp6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udp6plain.exp /usr/bin/snmp get -v2c -cpublic udp6:::1:snmp sysServices.0 > agent_udp_udp6plain.res diff -up agent_udp_udp6plain.exp agent_udp_udp6plain.res ==== agent_udp_udp6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udp6bracket.exp /usr/bin/snmp get -v2c -cpublic udp6:[::1] sysServices.0 > agent_udp_udp6bracket.res diff -up agent_udp_udp6bracket.exp agent_udp_udp6bracket.res ==== agent_udp_udp6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udp6bracket_port.exp /usr/bin/snmp get -v2c -cpublic udp6:[::1]:snmp sysServices.0 > agent_udp_udp6bracket_port.res diff -up agent_udp_udp6bracket_port.exp agent_udp_udp6bracket_port.res ==== agent_udp_UDP6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDP6plain.exp /usr/bin/snmp get -v2c -cpublic UDP6:::1:snmp sysServices.0 > agent_udp_UDP6plain.res diff -up agent_udp_UDP6plain.exp agent_udp_UDP6plain.res ==== agent_udp_UDP6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDP6bracket.exp /usr/bin/snmp get -v2c -cpublic UDP6:[::1] sysServices.0 > agent_udp_UDP6bracket.res diff -up agent_udp_UDP6bracket.exp agent_udp_UDP6bracket.res ==== agent_udp_UDP6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDP6bracket_port.exp /usr/bin/snmp get -v2c -cpublic UDP6:[::1]:snmp sysServices.0 > agent_udp_UDP6bracket_port.res diff -up agent_udp_UDP6bracket_port.exp agent_udp_UDP6bracket_port.res ==== agent_udp_udpv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udpv6plain.exp /usr/bin/snmp get -v2c -cpublic udpv6:::1:snmp sysServices.0 > agent_udp_udpv6plain.res diff -up agent_udp_udpv6plain.exp agent_udp_udpv6plain.res ==== agent_udp_udpv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udpv6bracket.exp /usr/bin/snmp get -v2c -cpublic udpv6:[::1] sysServices.0 > agent_udp_udpv6bracket.res diff -up agent_udp_udpv6bracket.exp agent_udp_udpv6bracket.res ==== agent_udp_udpv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udpv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic udpv6:[::1]:snmp sysServices.0 > agent_udp_udpv6bracket_port.res diff -up agent_udp_udpv6bracket_port.exp agent_udp_udpv6bracket_port.res ==== agent_udp_UDPv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDPv6plain.exp /usr/bin/snmp get -v2c -cpublic UDPv6:::1:snmp sysServices.0 > agent_udp_UDPv6plain.res diff -up agent_udp_UDPv6plain.exp agent_udp_UDPv6plain.res ==== agent_udp_UDPv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDPv6bracket.exp /usr/bin/snmp get -v2c -cpublic UDPv6:[::1] sysServices.0 > agent_udp_UDPv6bracket.res diff -up agent_udp_UDPv6bracket.exp agent_udp_UDPv6bracket.res ==== agent_udp_UDPv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDPv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic UDPv6:[::1]:snmp sysServices.0 > agent_udp_UDPv6bracket_port.res diff -up agent_udp_UDPv6bracket_port.exp agent_udp_UDPv6bracket_port.res ==== agent_udp_udpipv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udpipv6plain.exp /usr/bin/snmp get -v2c -cpublic udpipv6:::1:snmp sysServices.0 > agent_udp_udpipv6plain.res diff -up agent_udp_udpipv6plain.exp agent_udp_udpipv6plain.res ==== agent_udp_udpipv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udpipv6bracket.exp /usr/bin/snmp get -v2c -cpublic udpipv6:[::1] sysServices.0 > agent_udp_udpipv6bracket.res diff -up agent_udp_udpipv6bracket.exp agent_udp_udpipv6bracket.res ==== agent_udp_udpipv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_udpipv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic udpipv6:[::1]:snmp sysServices.0 > agent_udp_udpipv6bracket_port.res diff -up agent_udp_udpipv6bracket_port.exp agent_udp_udpipv6bracket_port.res ==== agent_udp_UDPIPv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDPIPv6plain.exp /usr/bin/snmp get -v2c -cpublic UDPIPv6:::1:snmp sysServices.0 > agent_udp_UDPIPv6plain.res diff -up agent_udp_UDPIPv6plain.exp agent_udp_UDPIPv6plain.res ==== agent_udp_UDPIPv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDPIPv6bracket.exp /usr/bin/snmp get -v2c -cpublic UDPIPv6:[::1] sysServices.0 > agent_udp_UDPIPv6bracket.res diff -up agent_udp_UDPIPv6bracket.exp agent_udp_UDPIPv6bracket.res ==== agent_udp_UDPIPv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_udp_UDPIPv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic UDPIPv6:[::1]:snmp sysServices.0 > agent_udp_UDPIPv6bracket_port.res diff -up agent_udp_UDPIPv6bracket_port.exp agent_udp_UDPIPv6bracket_port.res ==== agent_tcp_tcp6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcp6plain.exp /usr/bin/snmp get -v2c -cpublic tcp6:::1:161 sysServices.0 > agent_tcp_tcp6plain.res diff -up agent_tcp_tcp6plain.exp agent_tcp_tcp6plain.res ==== agent_tcp_tcp6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcp6bracket.exp /usr/bin/snmp get -v2c -cpublic tcp6:[::1] sysServices.0 > agent_tcp_tcp6bracket.res diff -up agent_tcp_tcp6bracket.exp agent_tcp_tcp6bracket.res ==== agent_tcp_tcp6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcp6bracket_port.exp /usr/bin/snmp get -v2c -cpublic tcp6:[::1]:161 sysServices.0 > agent_tcp_tcp6bracket_port.res diff -up agent_tcp_tcp6bracket_port.exp agent_tcp_tcp6bracket_port.res ==== agent_tcp_TCP6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCP6plain.exp /usr/bin/snmp get -v2c -cpublic TCP6:::1:161 sysServices.0 > agent_tcp_TCP6plain.res diff -up agent_tcp_TCP6plain.exp agent_tcp_TCP6plain.res ==== agent_tcp_TCP6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCP6bracket.exp /usr/bin/snmp get -v2c -cpublic TCP6:[::1] sysServices.0 > agent_tcp_TCP6bracket.res diff -up agent_tcp_TCP6bracket.exp agent_tcp_TCP6bracket.res ==== agent_tcp_TCP6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCP6bracket_port.exp /usr/bin/snmp get -v2c -cpublic TCP6:[::1]:161 sysServices.0 > agent_tcp_TCP6bracket_port.res diff -up agent_tcp_TCP6bracket_port.exp agent_tcp_TCP6bracket_port.res ==== agent_tcp_tcpv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcpv6plain.exp /usr/bin/snmp get -v2c -cpublic tcpv6:::1:161 sysServices.0 > agent_tcp_tcpv6plain.res diff -up agent_tcp_tcpv6plain.exp agent_tcp_tcpv6plain.res ==== agent_tcp_tcpv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcpv6bracket.exp /usr/bin/snmp get -v2c -cpublic tcpv6:[::1] sysServices.0 > agent_tcp_tcpv6bracket.res diff -up agent_tcp_tcpv6bracket.exp agent_tcp_tcpv6bracket.res ==== agent_tcp_tcpv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcpv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic tcpv6:[::1]:161 sysServices.0 > agent_tcp_tcpv6bracket_port.res diff -up agent_tcp_tcpv6bracket_port.exp agent_tcp_tcpv6bracket_port.res ==== agent_tcp_TCPv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPv6plain.exp /usr/bin/snmp get -v2c -cpublic TCPv6:::1:161 sysServices.0 > agent_tcp_TCPv6plain.res diff -up agent_tcp_TCPv6plain.exp agent_tcp_TCPv6plain.res ==== agent_tcp_TCPv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPv6bracket.exp /usr/bin/snmp get -v2c -cpublic TCPv6:[::1] sysServices.0 > agent_tcp_TCPv6bracket.res diff -up agent_tcp_TCPv6bracket.exp agent_tcp_TCPv6bracket.res ==== agent_tcp_TCPv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic TCPv6:[::1]:161 sysServices.0 > agent_tcp_TCPv6bracket_port.res diff -up agent_tcp_TCPv6bracket_port.exp agent_tcp_TCPv6bracket_port.res ==== agent_tcp_TCPv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic TCPv6:[::1]:161 sysServices.0 > agent_tcp_TCPv6bracket_port.res diff -up agent_tcp_TCPv6bracket_port.exp agent_tcp_TCPv6bracket_port.res ==== agent_tcp_tcpipv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcpipv6bracket.exp /usr/bin/snmp get -v2c -cpublic tcpipv6:[::1] sysServices.0 > agent_tcp_tcpipv6bracket.res diff -up agent_tcp_tcpipv6bracket.exp agent_tcp_tcpipv6bracket.res ==== agent_tcp_tcpipv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_tcpipv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic tcpipv6:[::1]:161 sysServices.0 > agent_tcp_tcpipv6bracket_port.res diff -up agent_tcp_tcpipv6bracket_port.exp agent_tcp_tcpipv6bracket_port.res ==== agent_tcp_TCPIPv6plain ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPIPv6plain.exp /usr/bin/snmp get -v2c -cpublic TCPIPv6:::1:161 sysServices.0 > agent_tcp_TCPIPv6plain.res diff -up agent_tcp_TCPIPv6plain.exp agent_tcp_TCPIPv6plain.res ==== agent_tcp_TCPIPv6bracket ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPIPv6bracket.exp /usr/bin/snmp get -v2c -cpublic TCPIPv6:[::1] sysServices.0 > agent_tcp_TCPIPv6bracket.res diff -u agent_tcp_TCPIPv6bracket.exp agent_tcp_TCPIPv6bracket.res ==== agent_tcp_TCPIPv6bracket_port ==== printf "sysServices.0 = INTEGER: 74\n" > agent_tcp_TCPIPv6bracket_port.exp /usr/bin/snmp get -v2c -cpublic TCPIPv6:[::1]:161 sysServices.0 > agent_tcp_TCPIPv6bracket_port.res diff -up agent_tcp_TCPIPv6bracket_port.exp agent_tcp_TCPIPv6bracket_port.res ==== usm_noauthnopriv ==== printf "sysServices.0 = INTEGER: 74\n" > usm_noauthnopriv.exp /usr/bin/snmp get -v3 -l noauthnopriv -u md5_des 127.0.0.1 sysServices.0 > usm_noauthnopriv.res diff -up usm_noauthnopriv.exp usm_noauthnopriv.res ==== usm_authnopriv_md5 ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authnopriv_md5.exp /usr/bin/snmp get -v3 -l authnopriv -u md5_des -a md5 -A testtest 127.0.0.1 sysServices.0 > usm_authnopriv_md5.res diff -up usm_authnopriv_md5.exp usm_authnopriv_md5.res ==== usm_authnopriv_sha1 ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authnopriv_sha1.exp /usr/bin/snmp get -v3 -l authnopriv -u sha1_des -a sha -A testtest 127.0.0.1 sysServices.0 > usm_authnopriv_sha1.res diff -up usm_authnopriv_sha1.exp usm_authnopriv_sha1.res ==== usm_authnopriv_sha224 ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authnopriv_sha224.exp /usr/bin/snmp get -v3 -l authnopriv -u sha224_des -a sha-224 -A testtest 127.0.0.1 sysServices.0 > usm_authnopriv_sha224.res diff -up usm_authnopriv_sha224.exp usm_authnopriv_sha224.res ==== usm_authnopriv_sha256 ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authnopriv_sha256.exp /usr/bin/snmp get -v3 -l authnopriv -u sha256_des -a sha-256 -A testtest 127.0.0.1 sysServices.0 > usm_authnopriv_sha256.res diff -up usm_authnopriv_sha256.exp usm_authnopriv_sha256.res ==== usm_authnopriv_sha384 ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authnopriv_sha384.exp /usr/bin/snmp get -v3 -l authnopriv -u sha384_des -a sha-384 -A testtest 127.0.0.1 sysServices.0 > usm_authnopriv_sha384.res diff -up usm_authnopriv_sha384.exp usm_authnopriv_sha384.res ==== usm_authnopriv_sha512 ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authnopriv_sha512.exp /usr/bin/snmp get -v3 -l authnopriv -u sha512_des -a sha-512 -A testtest 127.0.0.1 sysServices.0 > usm_authnopriv_sha512.res diff -up usm_authnopriv_sha512.exp usm_authnopriv_sha512.res ==== usm_authpriv_md5_des ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_md5_des.exp /usr/bin/snmp get -v3 -l authpriv -u md5_des -a md5 -A testtest -x des -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_md5_des.res diff -up usm_authpriv_md5_des.exp usm_authpriv_md5_des.res ==== usm_authpriv_md5_aes ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_md5_aes.exp /usr/bin/snmp get -v3 -l authpriv -u md5_aes -a md5 -A testtest -x aes -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_md5_aes.res diff -up usm_authpriv_md5_aes.exp usm_authpriv_md5_aes.res ==== usm_authpriv_sha1_des ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha1_des.exp /usr/bin/snmp get -v3 -l authpriv -u sha1_des -a sha -A testtest -x des -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha1_des.res diff -up usm_authpriv_sha1_des.exp usm_authpriv_sha1_des.res ==== usm_authpriv_sha1_aes ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha1_aes.exp /usr/bin/snmp get -v3 -l authpriv -u sha1_aes -a sha -A testtest -x aes -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha1_aes.res diff -up usm_authpriv_sha1_aes.exp usm_authpriv_sha1_aes.res ==== usm_authpriv_sha224_des ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha224_des.exp /usr/bin/snmp get -v3 -l authpriv -u sha224_des -a sha-224 -A testtest -x des -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha224_des.res diff -up usm_authpriv_sha224_des.exp usm_authpriv_sha224_des.res ==== usm_authpriv_sha224_aes ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha224_aes.exp /usr/bin/snmp get -v3 -l authpriv -u sha224_aes -a sha-224 -A testtest -x aes -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha224_aes.res diff -up usm_authpriv_sha224_aes.exp usm_authpriv_sha224_aes.res ==== usm_authpriv_sha256_des ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha256_des.exp /usr/bin/snmp get -v3 -l authpriv -u sha256_des -a sha-256 -A testtest -x des -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha256_des.res diff -up usm_authpriv_sha256_des.exp usm_authpriv_sha256_des.res ==== usm_authpriv_sha256_aes ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha256_aes.exp /usr/bin/snmp get -v3 -l authpriv -u sha256_aes -a sha-256 -A testtest -x aes -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha256_aes.res diff -up usm_authpriv_sha256_aes.exp usm_authpriv_sha256_aes.res ==== usm_authpriv_sha384_des ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha384_des.exp /usr/bin/snmp get -v3 -l authpriv -u sha384_des -a sha-384 -A testtest -x des -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha384_des.res diff -up usm_authpriv_sha384_des.exp usm_authpriv_sha384_des.res ==== usm_authpriv_sha384_aes ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha384_aes.exp /usr/bin/snmp get -v3 -l authpriv -u sha384_aes -a sha-384 -A testtest -x aes -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha384_aes.res diff -up usm_authpriv_sha384_aes.exp usm_authpriv_sha384_aes.res ==== usm_authpriv_sha512_des ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha512_des.exp /usr/bin/snmp get -v3 -l authpriv -u sha512_des -a sha-512 -A testtest -x des -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha512_des.res diff -up usm_authpriv_sha512_des.exp usm_authpriv_sha512_des.res ==== usm_authpriv_sha512_aes ==== printf "sysServices.0 = INTEGER: 74\n" > usm_authpriv_sha512_aes.exp /usr/bin/snmp get -v3 -l authpriv -u sha512_aes -a sha-512 -A testtest -x aes -X testtest 127.0.0.1 sysServices.0 > usm_authpriv_sha512_aes.res diff -up usm_authpriv_sha512_aes.exp usm_authpriv_sha512_aes.res ==== output_string ==== printf "sysDescr.0 = STRING: %s\n" "$(uname -a)" > output_string.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysDescr.0 > output_string.res diff -up output_string.exp output_string.res ==== output_integer ==== printf "sysServices.0 = INTEGER: 74\n" > output_integer.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysServices.0 > output_integer.res diff -up output_integer.exp output_integer.res ==== output_oid ==== printf "sysObjectID.0 = OID: localSystem.1\n" > output_oid.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysObjectID.0 > output_oid.res diff -up output_oid.exp output_oid.res ==== output_hexstring ==== printf "ifPhysAddress.%d = Hex-STRING: %s\n" "1" "00 30 48 62 B3 F4" > output_hexstring.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1 ifPhysAddress.1 > output_hexstring.res diff -up output_hexstring.exp output_hexstring.res ==== output_ipstring ==== printf "ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1\n" > output_ipstring.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1 ipAdEntAddr.127.0.0.1 > output_ipstring.res diff -up output_ipstring.exp output_ipstring.res ==== output_quiettype_string ==== printf "sysDescr.0 = %s\n" "$(uname -a)" > output_quiettype_string.exp /usr/bin/snmp get -v2c -cpublic -OQ 127.0.0.1 sysDescr.0 > output_quiettype_string.res diff -up output_quiettype_string.exp output_quiettype_string.res ==== output_quiettype_integer ==== printf "sysServices.0 = 74\n" > output_quiettype_integer.exp /usr/bin/snmp get -v2c -cpublic -OQ 127.0.0.1 sysServices.0 > output_quiettype_integer.res diff -up output_quiettype_integer.exp output_quiettype_integer.res ==== output_quiettype_oid ==== printf "sysObjectID.0 = localSystem.1\n" > output_quiettype_oid.exp /usr/bin/snmp get -v2c -cpublic -OQ 127.0.0.1 sysObjectID.0 > output_quiettype_oid.res diff -up output_quiettype_oid.exp output_quiettype_oid.res ==== output_quiettype_ipstring ==== printf "ipAdEntAddr.127.0.0.1 = 127.0.0.1\n" > output_quiettype_ipstring.exp /usr/bin/snmp get -v2c -cpublic -OQ 127.0.0.1 ipAdEntAddr.127.0.0.1 > output_quiettype_ipstring.res diff -up output_quiettype_ipstring.exp output_quiettype_ipstring.res ==== output_quiettype_hexstring ==== printf "ifPhysAddress.%d = %s\n" "1" "00 30 48 62 B3 F4" > output_quiettype_hexstring.exp /usr/bin/snmp get -v2c -cpublic -OQ 127.0.0.1 ifPhysAddress.1 > output_quiettype_hexstring.res diff -up output_quiettype_hexstring.exp output_quiettype_hexstring.res ==== output_varbind_string ==== printf "STRING: %s\n" "$(uname -a)" > output_varbind_string.exp /usr/bin/snmp get -v2c -cpublic -Ov 127.0.0.1 sysDescr.0 > output_varbind_string.res diff -up output_varbind_string.exp output_varbind_string.res ==== output_varbind_integer ==== printf "INTEGER: 74\n" > output_varbind_integer.exp /usr/bin/snmp get -v2c -cpublic -Ov 127.0.0.1 sysServices.0 > output_varbind_integer.res diff -up output_varbind_integer.exp output_varbind_integer.res ==== output_varbind_oid ==== printf "OID: localSystem.1\n" > output_varbind_oid.exp /usr/bin/snmp get -v2c -cpublic -Ov 127.0.0.1 sysObjectID.0 > output_varbind_oid.res diff -up output_varbind_oid.exp output_varbind_oid.res ==== output_varbind_ipstring ==== printf "IpAddress: 127.0.0.1\n" > output_varbind_ipstring.exp /usr/bin/snmp get -v2c -cpublic -Ov 127.0.0.1 ipAdEntAddr.127.0.0.1 > output_varbind_ipstring.res diff -up output_varbind_ipstring.exp output_varbind_ipstring.res ==== output_varbind_hexstring ==== printf "Hex-STRING: %s\n" "00 30 48 62 B3 F4" > output_varbind_hexstring.exp /usr/bin/snmp get -v2c -cpublic -Ov 127.0.0.1 ifPhysAddress.1 > output_varbind_hexstring.res diff -up output_varbind_hexstring.exp output_varbind_hexstring.res ==== output_quiettype_varbind ==== uname -a > output_quiettype_varbind.exp /usr/bin/snmp get -v2c -cpublic -OvQ 127.0.0.1 sysDescr.0 > output_quiettype_varbind.res diff -up output_quiettype_varbind.exp output_quiettype_varbind.res ==== output_ascii ==== printf 'ifPhysAddress.%d = STRING: "' "1" > output_ascii.exp printf "%s\n" "00 30 48 62 B3 F4" | tr ' ' '\n' | while read byte; do printf "\x${byte}" | tr -c '[:print:]' '.'; done >> output_ascii.exp printf '"\n' >> output_ascii.exp /usr/bin/snmp get -v2c -cpublic -Oa 127.0.0.1 ifPhysAddress.1 > output_ascii.res diff -up output_ascii.exp output_ascii.res ==== output_fulloid_mib ==== printf ".iso.org.dod.internet.mgmt.mib_2.system.sysDescr.0 = STRING: %s\n" "$(uname -a)" > output_fulloid_mib.exp /usr/bin/snmp get -v2c -cpublic -Of 127.0.0.1 sysDescr.0 > output_fulloid_mib.res diff -up output_fulloid_mib.exp output_fulloid_mib.res ==== output_fulloid_varbind ==== printf ".iso.org.dod.internet.mgmt.mib_2.system.sysObjectID.0 = OID: .iso.org.dod.internet.private.enterprises.openBSD.localSystem.1\n" > output_fulloid_varbind.exp /usr/bin/snmp get -v2c -cpublic -Of 127.0.0.1 sysObjectID.0 > output_fulloid_varbind.res diff -up output_fulloid_varbind.exp output_fulloid_varbind.res ==== output_numoid_mib ==== printf ".1.3.6.1.2.1.1.1.0 = STRING: %s\n" "$(uname -a)" > output_numoid_mib.exp /usr/bin/snmp get -v2c -cpublic -On 127.0.0.1 sysDescr.0 > output_numoid_mib.res diff -up output_numoid_mib.exp output_numoid_mib.res ==== output_numoid_varbind ==== printf ".1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.30155.23.1\n" > output_numoid_varbind.exp /usr/bin/snmp get -v2c -cpublic -On 127.0.0.1 sysObjectID.0 > output_numoid_varbind.res diff -up output_numoid_varbind.exp output_numoid_varbind.res ==== output_quiet_string ==== printf "sysDescr.0 %s\n" "$(uname -a)" > output_quiet_string.exp /usr/bin/snmp get -v2c -cpublic -Oq 127.0.0.1 sysDescr.0 > output_quiet_string.res diff -up output_quiet_string.exp output_quiet_string.res ==== output_quiet_integer ==== printf "sysServices.0 74\n" > output_quiet_integer.exp /usr/bin/snmp get -v2c -cpublic -Oq 127.0.0.1 sysServices.0 > output_quiet_integer.res diff -up output_quiet_integer.exp output_quiet_integer.res ==== output_quiet_oid ==== printf "sysObjectID.0 localSystem.1\n" > output_quiet_oid.exp /usr/bin/snmp get -v2c -cpublic -Oq 127.0.0.1 sysObjectID.0 > output_quiet_oid.res diff -up output_quiet_oid.exp output_quiet_oid.res ==== output_quiet_ipstring ==== printf "ipAdEntAddr.127.0.0.1 127.0.0.1\n" > output_quiet_ipstring.exp /usr/bin/snmp get -v2c -cpublic -Oq 127.0.0.1 ipAdEntAddr.127.0.0.1 > output_quiet_ipstring.res diff -up output_quiet_ipstring.exp output_quiet_ipstring.res ==== output_quiet_hexstring ==== printf "ifPhysAddress.%d %s\n" "1" "00 30 48 62 B3 F4" > output_quiet_hexstring.exp /usr/bin/snmp get -v2c -cpublic -Oq 127.0.0.1 ifPhysAddress.1 > output_quiet_hexstring.res diff -up output_quiet_hexstring.exp output_quiet_hexstring.res ==== output_hex ==== printf "localTest.3.2.0 = Hex-STRING: " > output_hex.exp printf "abcdefghijklmnopqrstuvwxyz" | od -An -tx1 | sed 's/^ *//;s/ / /g;s/ *$//' | tr '[:lower:]' '[:upper:]' >> output_hex.exp /usr/bin/snmp get -v2c -cpublic -Ox 127.0.0.1 1.3.6.1.4.1.30155.42.3.2.0 > output_hex.res diff -up output_hex.exp output_hex.res ==== output_displayhint_255t_utf8 ==== printf "STRING: Reyk Flöter\n" > output_displayhint_255t_utf8.exp LC_ALL=en_US.UTF-8 /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.1.0 > output_displayhint_255t_utf8.res diff -up output_displayhint_255t_utf8.exp output_displayhint_255t_utf8.res --- output_displayhint_255t_utf8.exp Thu Jan 25 11:05:33 2024 +++ output_displayhint_255t_utf8.res Thu Jan 25 11:05:33 2024 @@ -1 +1 @@ -STRING: Reyk Flöter +No Such Object available on this agent at this OID *** Error 1 in . (Makefile:759 'output_displayhint_255t_utf8') EXPECTED_FAIL ==== output_displayhint_255t_ascii ==== printf "STRING: Reyk Fl.ter\n" > output_displayhint_255t_ascii.exp LC_ALL=C /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.1.0 > output_displayhint_255t_ascii.res diff -up output_displayhint_255t_ascii.exp output_displayhint_255t_ascii.res --- output_displayhint_255t_ascii.exp Thu Jan 25 11:05:33 2024 +++ output_displayhint_255t_ascii.res Thu Jan 25 11:05:33 2024 @@ -1 +1 @@ -STRING: Reyk Fl.ter +No Such Object available on this agent at this OID *** Error 1 in . (Makefile:768 'output_displayhint_255t_ascii') EXPECTED_FAIL ==== output_displayhint_255t_invalchar_utf8 ==== printf "STRING: Reyk Fl�ter\n" > output_displayhint_255t_invalchar_utf8.exp LC_ALL=en_US.UTF-8 /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.2.0 > output_displayhint_255t_invalchar_utf8.res diff -up output_displayhint_255t_invalchar_utf8.exp output_displayhint_255t_invalchar_utf8.res --- output_displayhint_255t_invalchar_utf8.exp Thu Jan 25 11:05:33 2024 +++ output_displayhint_255t_invalchar_utf8.res Thu Jan 25 11:05:33 2024 @@ -1 +1 @@ -STRING: Reyk Fl�ter +No Such Object available on this agent at this OID *** Error 1 in . (Makefile:777 'output_displayhint_255t_invalchar_utf8') EXPECTED_FAIL ==== output_displayhint_255t_invalchar_ascii ==== printf "STRING: Reyk Fl?ter\n" > output_displayhint_255t_invalchar_ascii.exp LC_ALL=C /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.2.0 > output_displayhint_255t_invalchar_ascii.res diff -up output_displayhint_255t_invalchar_ascii.exp output_displayhint_255t_invalchar_ascii.res --- output_displayhint_255t_invalchar_ascii.exp Thu Jan 25 11:05:33 2024 +++ output_displayhint_255t_invalchar_ascii.res Thu Jan 25 11:05:33 2024 @@ -1 +1 @@ -STRING: Reyk Fl?ter +No Such Object available on this agent at this OID *** Error 1 in . (Makefile:786 'output_displayhint_255t_invalchar_ascii') EXPECTED_FAIL ==== output_displayhint_255t_truncatefull ==== printf "STRING: %s\n" "$(jot -ba 255 | tr -d '\n')" > output_displayhint_255t_truncatefull.exp LC_ALL=en_US.UTF-8 /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.3.0 > output_displayhint_255t_truncatefull.res diff -up output_displayhint_255t_truncatefull.exp output_displayhint_255t_truncatefull.res --- output_displayhint_255t_truncatefull.exp Thu Jan 25 11:05:33 2024 +++ output_displayhint_255t_truncatefull.res Thu Jan 25 11:05:33 2024 @@ -1 +1 @@ -STRING: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No Such Object available on this agent at this OID *** Error 1 in . (Makefile:795 'output_displayhint_255t_truncatefull') EXPECTED_FAIL ==== output_displayhint_255t_truncatehalf ==== printf "STRING: %s\n" "$(jot -ba 254 | tr -d '\n')" > output_displayhint_255t_truncatehalf.exp LC_ALL=en_US.UTF-8 /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.6.3.15.1.2.2.1.2.4.0 > output_displayhint_255t_truncatehalf.res diff -up output_displayhint_255t_truncatehalf.exp output_displayhint_255t_truncatehalf.res --- output_displayhint_255t_truncatehalf.exp Thu Jan 25 11:05:33 2024 +++ output_displayhint_255t_truncatehalf.res Thu Jan 25 11:05:33 2024 @@ -1 +1 @@ -STRING: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +No Such Object available on this agent at this OID *** Error 1 in . (Makefile:804 'output_displayhint_255t_truncatehalf') EXPECTED_FAIL ==== output_displayhint_255a_utf8 ==== printf "STRING: Reyk Fl��ter\n" > output_displayhint_255a_utf8.exp LC_ALL=en_US.UTF-8 /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.2.1.1.4.0 > output_displayhint_255a_utf8.res diff -up output_displayhint_255a_utf8.exp output_displayhint_255a_utf8.res ==== output_displayhint_255a_ascii ==== printf "STRING: Reyk Fl??ter\n" > output_displayhint_255a_ascii.exp LC_ALL=C-8 /usr/bin/snmp get -Ov -v2c -cpublic 127.0.0.1 1.3.6.1.2.1.1.4.0 > output_displayhint_255a_ascii.res diff -up output_displayhint_255a_ascii.exp output_displayhint_255a_ascii.res ==== output_displayhint_precedence ==== printf "sysDescr.0 = STRING: %s\n" "$(uname -a)" > output_displayhint_precedence.exp /usr/bin/snmp get -Ox -v2c -cpublic 127.0.0.1 sysDescr.0 > output_displayhint_precedence.res diff -up output_displayhint_precedence.exp output_displayhint_precedence.res ==== get_multiple ==== printf "sysServices.0 = INTEGER: 74\nsysDescr.0 = STRING: %s\n" "$(uname -a)" > get_multiple.exp /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysServices.0 sysDescr.0 > get_multiple.res diff -up get_multiple.exp get_multiple.res ==== getnext_simple ==== printf "sysDescr.0 = STRING: %s\n" "$(uname -a)" > getnext_simple.exp /usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 system > getnext_simple.res diff -up getnext_simple.exp getnext_simple.res ==== getnext_multiple ==== printf "sysServices.0 = INTEGER: 74\nsysDescr.0 = STRING: %s\n" "$(uname -a)" > getnext_multiple.exp /usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 sysLocation.0 system > getnext_multiple.res diff -up getnext_multiple.exp getnext_multiple.res ==== bulkget_simple ==== IDX=1; while [ $IDX -le 4 ]; do /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysORDescr.$IDX; IDX=$((IDX+1)); done > bulkget_simple.exp /usr/bin/snmp bulkget -v2c -cpublic -Cr4 127.0.0.1 sysORDescr > bulkget_simple.res diff -up bulkget_simple.exp bulkget_simple.res --- bulkget_simple.exp Thu Jan 25 11:05:34 2024 +++ bulkget_simple.res Thu Jan 25 11:05:34 2024 @@ -1,4 +1,4 @@ -sysORDescr.1 = No Such Instance currently exists at this OID -sysORDescr.2 = No Such Instance currently exists at this OID -sysORDescr.3 = No Such Instance currently exists at this OID -sysORDescr.4 = No Such Instance currently exists at this OID +ifNumber.0 = INTEGER: 9 +ifIndex.1 = INTEGER: 1 +ifIndex.2 = INTEGER: 2 +ifIndex.3 = INTEGER: 3 *** Error 1 in . (Makefile:864 'bulkget_simple') EXPECTED_FAIL ==== bulkget_multi ==== > bulkget_multi.exp IDX=1; while [ $IDX -le 4 ]; do /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysORDescr.$IDX sysORID.$IDX; IDX=$((IDX+1)); done >> bulkget_multi.exp /usr/bin/snmp bulkget -v2c -cpublic -Cr4 127.0.0.1 sysORDescr sysORID > bulkget_multi.res diff -up bulkget_multi.exp bulkget_multi.res --- bulkget_multi.exp Thu Jan 25 11:05:34 2024 +++ bulkget_multi.res Thu Jan 25 11:05:34 2024 @@ -1,8 +1,8 @@ -sysORDescr.1 = No Such Instance currently exists at this OID -sysORID.1 = No Such Instance currently exists at this OID -sysORDescr.2 = No Such Instance currently exists at this OID -sysORID.2 = No Such Instance currently exists at this OID -sysORDescr.3 = No Such Instance currently exists at this OID -sysORID.3 = No Such Instance currently exists at this OID -sysORDescr.4 = No Such Instance currently exists at this OID -sysORID.4 = No Such Instance currently exists at this OID +ifNumber.0 = INTEGER: 9 +ifNumber.0 = INTEGER: 9 +ifIndex.1 = INTEGER: 1 +ifIndex.1 = INTEGER: 1 +ifIndex.2 = INTEGER: 2 +ifIndex.2 = INTEGER: 2 +ifIndex.3 = INTEGER: 3 +ifIndex.3 = INTEGER: 3 *** Error 1 in . (Makefile:874 'bulkget_multi') EXPECTED_FAIL ==== bulkget_nonrep ==== /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysDescr.0 > bulkget_nonrep.exp IDX=1; while [ $IDX -le 4 ]; do /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysORDescr.$IDX; IDX=$((IDX+1)); done >> bulkget_nonrep.exp /usr/bin/snmp bulkget -v2c -cpublic -Cn1 -Cr4 127.0.0.1 sysDescr sysORDescr > bulkget_nonrep.res diff -up bulkget_nonrep.exp bulkget_nonrep.res --- bulkget_nonrep.exp Thu Jan 25 11:05:35 2024 +++ bulkget_nonrep.res Thu Jan 25 11:05:35 2024 @@ -1,5 +1,5 @@ sysDescr.0 = STRING: OpenBSD ot6.obsd-lab.genua.de 7.4 GENERIC.MP#1623 amd64 -sysORDescr.1 = No Such Instance currently exists at this OID -sysORDescr.2 = No Such Instance currently exists at this OID -sysORDescr.3 = No Such Instance currently exists at this OID -sysORDescr.4 = No Such Instance currently exists at this OID +ifNumber.0 = INTEGER: 9 +ifIndex.1 = INTEGER: 1 +ifIndex.2 = INTEGER: 2 +ifIndex.3 = INTEGER: 3 *** Error 1 in . (Makefile:884 'bulkget_nonrep') EXPECTED_FAIL ==== bulkget_maxrep ==== IDX=1; while [ $IDX -le 4 ]; do /usr/bin/snmp get -v2c -cpublic 127.0.0.1 sysORDescr.$IDX; IDX=$((IDX+1)); done > bulkget_maxrep.exp /usr/bin/snmp bulkget -v2c -cpublic -Cr4 127.0.0.1 sysORDescr > bulkget_maxrep.res diff -up bulkget_maxrep.exp bulkget_maxrep.res --- bulkget_maxrep.exp Thu Jan 25 11:05:35 2024 +++ bulkget_maxrep.res Thu Jan 25 11:05:35 2024 @@ -1,4 +1,4 @@ -sysORDescr.1 = No Such Instance currently exists at this OID -sysORDescr.2 = No Such Instance currently exists at this OID -sysORDescr.3 = No Such Instance currently exists at this OID -sysORDescr.4 = No Such Instance currently exists at this OID +ifNumber.0 = INTEGER: 9 +ifIndex.1 = INTEGER: 1 +ifIndex.2 = INTEGER: 2 +ifIndex.3 = INTEGER: 3 *** Error 1 in . (Makefile:893 'bulkget_maxrep') EXPECTED_FAIL ==== walk_simple ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ -n "${OID%sys*}" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > walk_simple.exp /usr/bin/snmp walk -v2c -cpublic 127.0.0.1 system | grep -v ^sysUpTime.0 > walk_simple.res diff -up walk_simple.exp walk_simple.res ==== walk_end ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ "${OID%% *}" == "sysServices.0" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > walk_end.exp /usr/bin/snmp walk -v2c -cpublic -CE sysServices 127.0.0.1 system | grep -v ^sysUpTime.0 > walk_end.res diff -up walk_end.exp walk_end.res ==== walk_includeoid ==== printf "sysServices.0 = INTEGER: 74\n" > walk_includeoid.exp /usr/bin/snmp walk -v2c -cpublic 127.0.0.1 sysServices.0 > walk_includeoid.res diff -up walk_includeoid.exp walk_includeoid.res ==== walk_excludeoid ==== > walk_excludeoid.exp /usr/bin/snmp walk -v2c -cpublic -CI 127.0.0.1 sysServices.0 > walk_excludeoid.res diff -up walk_excludeoid.exp walk_excludeoid.res ==== walk_summary ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ -n "${OID%sys*}" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > walk_summary.exp wc -l walk_summary.exp | awk '{printf("Variables found: %d\n", $1 + 1)}' >> walk_summary.exp /usr/bin/snmp walk -v2c -cpublic -Cp 127.0.0.1 system | grep -v ^sysUpTime.0 > walk_summary.res diff -up walk_summary.exp walk_summary.res ==== walk_skip ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ -n "${OID%sys*}" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > walk_skip.exp /usr/bin/snmp walk -v2c -cpublic -Cs sysUpTime 127.0.0.1 system > walk_skip.res diff -up walk_skip.exp walk_skip.res ==== bulkwalk_simple ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ -n "${OID%sys*}" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > bulkwalk_simple.exp /usr/bin/snmp bulkwalk -v2c -cpublic 127.0.0.1 system | grep -v ^sysUpTime.0 > bulkwalk_simple.res diff -up bulkwalk_simple.exp bulkwalk_simple.res ==== bulkwalk_includeoid ==== printf "sysServices.0 = INTEGER: 74\n" > bulkwalk_includeoid.exp /usr/bin/snmp bulkwalk -v2c -cpublic 127.0.0.1 sysServices.0 > bulkwalk_includeoid.res diff -up bulkwalk_includeoid.exp bulkwalk_includeoid.res ==== bulkwalk_summary ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ -n "${OID%sys*}" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > bulkwalk_summary.exp wc -l bulkwalk_summary.exp | awk '{printf("Variables found: %d\n", $1 + 1)}' >> bulkwalk_summary.exp /usr/bin/snmp bulkwalk -v2c -cpublic -Cp 127.0.0.1 system | grep -v ^sysUpTime.0 > bulkwalk_summary.res diff -up bulkwalk_summary.exp bulkwalk_summary.res ==== bulkwalk_skip ==== OID=system; while true; do OID="$(/usr/bin/snmp getnext -v2c -cpublic 127.0.0.1 "$OID")"; [ -n "${OID%sys*}" ] && break; printf "%s\n" "${OID}"; OID="${OID%% *}"; done | grep -v ^sysUpTime.0 > bulkwalk_skip.exp /usr/bin/snmp bulkwalk -v2c -cpublic -Cs sysUpTime 127.0.0.1 system > bulkwalk_skip.res diff -up bulkwalk_skip.exp bulkwalk_skip.res ==== set_string ==== /usr/bin/snmp get -v2c -cpublic -Oqv 127.0.0.1 1.3.6.1.4.1.30155.42.3.3.0 | awk '{ printf("%sa\n", $1) }' > set_string.exp /usr/bin/snmp set -v2c -cprivate -Oqv 127.0.0.1 1.3.6.1.4.1.30155.42.3.3.0 s $(cat set_string.exp) > set_string.res snmp: Can't parse oid 1.3.6.1.4.1.30155.42.3.3.0: Not writable *** Error 1 in . (Makefile:981 'set_string') EXPECTED_FAIL ==== set_integer ==== /usr/bin/snmp get -v2c -cpublic -Oqv 127.0.0.1 1.3.6.1.4.1.30155.42.3.4.0 | awk '{ print $1 + 1 }' > set_integer.exp /usr/bin/snmp set -v2c -cprivate -Oqv 127.0.0.1 1.3.6.1.4.1.30155.42.3.4.0 i $(cat set_integer.exp) > set_integer.res snmp: Can't parse oid 1.3.6.1.4.1.30155.42.3.4.0: Not writable *** Error 1 in . (Makefile:989 'set_integer') EXPECTED_FAIL ==== set_string_integer ==== /usr/bin/snmp get -v2c -cpublic -Oqv 127.0.0.1 1.3.6.1.4.1.30155.42.3.3.0 1.3.6.1.4.1.30155.42.3.4.0 | awk 'NR == 1 { printf("%sa\n", $1) } NR == 2 { print $1 + 1 }' > set_string_integer.exp /usr/bin/snmp set -v2c -cprivate -Oqv 127.0.0.1 1.3.6.1.4.1.30155.42.3.3.0 s $(head -1 set_string_integer.exp) 1.3.6.1.4.1.30155.42.3.4.0 i $(tail -1 set_string_integer.exp) > set_string_integer.res snmp: Can't parse oid 1.3.6.1.4.1.30155.42.3.3.0: Not writable *** Error 1 in . (Makefile:998 'set_string_integer') EXPECTED_FAIL ==== trap_simple ==== SKIPPED ==== trap_ip ==== SKIPPED ==== trap_bitstring ==== SKIPPED ==== trap_counter32 ==== SKIPPED ==== trap_decimal ==== SKIPPED ==== trap_integer ==== SKIPPED ==== trap_null ==== SKIPPED ==== trap_oid ==== SKIPPED ==== trap_string ==== SKIPPED ==== trap_timeticks ==== SKIPPED ==== trap_unsigned ==== SKIPPED ==== trap_hex ==== SKIPPED ==== trap_multi ==== SKIPPED ==== stop ==== pkill -xf "/usr/sbin/snmpd -f /usr/src/regress/usr.bin/snmp/obj/snmpd.conf" SKIP usr.bin/snmp Test skipped itself