1*41ce3b17Snaddy.\" $OpenBSD: snmp.1,v 1.22 2022/03/31 17:27:27 naddy Exp $ 2442e4f4fSmartijn.\" 3442e4f4fSmartijn.\" Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org> 4442e4f4fSmartijn.\" 5442e4f4fSmartijn.\" Permission to use, copy, modify, and distribute this software for any 6442e4f4fSmartijn.\" purpose with or without fee is hereby granted, provided that the above 7442e4f4fSmartijn.\" copyright notice and this permission notice appear in all copies. 8442e4f4fSmartijn.\" 9442e4f4fSmartijn.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10442e4f4fSmartijn.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11442e4f4fSmartijn.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12442e4f4fSmartijn.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13442e4f4fSmartijn.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14442e4f4fSmartijn.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15442e4f4fSmartijn.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16442e4f4fSmartijn.\" 17*41ce3b17Snaddy.Dd $Mdocdate: March 31 2022 $ 18442e4f4fSmartijn.Dt SNMP 1 19442e4f4fSmartijn.Os 20442e4f4fSmartijn.Sh NAME 21442e4f4fSmartijn.Nm snmp 22442e4f4fSmartijn.Nd simple SNMP client 23442e4f4fSmartijn.Sh SYNOPSIS 24442e4f4fSmartijn.Nm 25991f73f5Smartijn.Cm get | getnext | bulkget 26991f73f5Smartijn.Op Ar options 27442e4f4fSmartijn.Ar agent 28442e4f4fSmartijn.Ar oid ... 29442e4f4fSmartijn.Nm 30991f73f5Smartijn.Cm walk | bulkwalk 31991f73f5Smartijn.Op Ar options 32442e4f4fSmartijn.Ar agent 33442e4f4fSmartijn.Op Ar oid 34442e4f4fSmartijn.Nm 35ecb1f8acSmartijn.Cm set 36991f73f5Smartijn.Op Ar options 37ecb1f8acSmartijn.Ar agent 38ecb1f8acSmartijn.Ar varoid type value 39ecb1f8acSmartijn.Oo Ar varoid type value Oc ... 40ecb1f8acSmartijn.Nm 41442e4f4fSmartijn.Cm trap 42991f73f5Smartijn.Op Ar options 43442e4f4fSmartijn.Ar agent uptime trapoid 44442e4f4fSmartijn.Oo Ar varoid type value Oc ... 45442e4f4fSmartijn.Nm 466659eda6Smartijn.Cm df 476659eda6Smartijn.Op Ar options 486659eda6Smartijn.Ar agent 496659eda6Smartijn.Nm 50442e4f4fSmartijn.Cm mibtree 51991f73f5Smartijn.Op Fl O Ar fns 52f938cef3Smartijn.Op Ar oid ... 53442e4f4fSmartijn.Sh DESCRIPTION 54442e4f4fSmartijnThe 55442e4f4fSmartijn.Nm 56442e4f4fSmartijnutility is a simple SNMP client. 57442e4f4fSmartijn.Pp 58442e4f4fSmartijnThe subcommands are as follows: 59991f73f5Smartijn.Bl -tag -width Ds 60991f73f5Smartijn.It Xo 61991f73f5Smartijn.Nm snmp 62991f73f5Smartijn.Cm get 63991f73f5Smartijn.Op Ar options 64991f73f5Smartijn.Ar agent oid ... 65991f73f5Smartijn.Xc 66991f73f5SmartijnRetrieve the varbind for 67442e4f4fSmartijn.Ar oid 68442e4f4fSmartijnfrom the 69442e4f4fSmartijn.Ar agent . 70442e4f4fSmartijnIf more than one 71442e4f4fSmartijn.Ar oid 72991f73f5Smartijnis specified, retrieve the varbind for each one. 73991f73f5Smartijn.It Xo 74991f73f5Smartijn.Nm snmp 75991f73f5Smartijn.Cm getnext 76991f73f5Smartijn.Op Ar options 77991f73f5Smartijn.Ar agent oid ... 78991f73f5Smartijn.Xc 79991f73f5SmartijnRetrieve the varbind that follows 80442e4f4fSmartijn.Ar oid 81442e4f4fSmartijnfrom the 82442e4f4fSmartijn.Ar agent . 83442e4f4fSmartijnIf more than one 84442e4f4fSmartijn.Ar oid 85991f73f5Smartijnis specified, retrieve the varbind following each one of them. 86991f73f5Smartijn.It Nm snmp Cm walk Oo Ar options Oc Ar agent Op Ar oid 87991f73f5SmartijnRetrieve all the varbinds that are branches of 88442e4f4fSmartijn.Ar oid 89442e4f4fSmartijnfrom the 90442e4f4fSmartijn.Ar agent . 91442e4f4fSmartijnThis uses the 92442e4f4fSmartijn.Cm getnext 93991f73f5Smartijnsubcommand internally and requests a single varbind at a time. 94991f73f5SmartijnIf no 95991f73f5Smartijn.Ar oid 96*41ce3b17Snaddyis specified, it defaults to mib-2 97442e4f4fSmartijn.Pq .1.3.6.1.2.1 . 98991f73f5Smartijn.It Xo 99991f73f5Smartijn.Nm snmp 100991f73f5Smartijn.Cm bulkget 101991f73f5Smartijn.Op Ar options 10248c01a1fSjmc.Ar agent oid ... 103991f73f5Smartijn.Xc 104991f73f5SmartijnRetrieve the next 10 varbinds following each 105442e4f4fSmartijn.Ar oid 106442e4f4fSmartijnfrom the 107442e4f4fSmartijn.Ar agent . 108442e4f4fSmartijnThis command is not available for 109442e4f4fSmartijn.Fl v Cm 1 . 110991f73f5Smartijn.It Xo 111991f73f5Smartijn.Nm snmp 112991f73f5Smartijn.Cm bulkwalk 113991f73f5Smartijn.Op Ar options 114991f73f5Smartijn.Ar agent 115991f73f5Smartijn.Op Ar oid 116991f73f5Smartijn.Xc 117991f73f5SmartijnRetrieve all the varbinds from the 118442e4f4fSmartijn.Ar agent 119442e4f4fSmartijnthat are branches of 120442e4f4fSmartijn.Ar oid . 121442e4f4fSmartijnThis uses the 122442e4f4fSmartijn.Cm bulkget 123991f73f5Smartijnsubcommand internally to retrieve multiple varbinds at a time. 124442e4f4fSmartijnThis command is not available for 125442e4f4fSmartijn.Fl v Cm 1 . 126991f73f5Smartijn.It Xo 127991f73f5Smartijn.Nm snmp 128991f73f5Smartijn.Cm set 129991f73f5Smartijn.Op Ar options 130991f73f5Smartijn.Ar agent varoid type value ... 131991f73f5Smartijn.Xc 132991f73f5SmartijnSet one or more 133991f73f5Smartijn.Ar varoid to a new 134991f73f5Smartijn.Ar value . 135991f73f5SmartijnThe format of the 136991f73f5Smartijn.Ar varoid type value 137991f73f5Smartijntriple is described in 138991f73f5Smartijn.Sx Data types , 139991f73f5Smartijnbelow. 140991f73f5Smartijn.It Xo 141991f73f5Smartijn.Nm snmp 142991f73f5Smartijn.Cm trap 143991f73f5Smartijn.Op Ar options 144991f73f5Smartijn.Ar agent uptime trapoid 145991f73f5Smartijn.Op Ar varoid type value ... 146991f73f5Smartijn.Xc 147442e4f4fSmartijnSend a trap message to the 148442e4f4fSmartijn.Ar agent . 149442e4f4fSmartijnThe 150442e4f4fSmartijn.Ar uptime 151442e4f4fSmartijnis specified in timeticks 152442e4f4fSmartijn.Pq centiseconds 153442e4f4fSmartijnor defaults to the system uptime if an empty string is given. 154442e4f4fSmartijnThe 155442e4f4fSmartijn.Ar trapoid 156442e4f4fSmartijnis the identification OID used by the trap handler to determine its action. 157442e4f4fSmartijnThis command is not available for 158442e4f4fSmartijn.Fl v Cm 1 . 1596659eda6Smartijn.It Xo 1606659eda6Smartijn.Nm 1616659eda6Smartijn.Cm df 1626659eda6Smartijn.Op Ar options 1636659eda6Smartijn.Ar agent 1646659eda6Smartijn.Xc 1656659eda6SmartijnAn SNMP based version of the 1666659eda6Smartijn.Xr df 1 1676659eda6Smartijncommand. 168*41ce3b17SnaddyIf no size suffix is shown, the sizes are in kilobytes. 169f938cef3Smartijn.It Nm Cm mibtree Oo Fl O Ar fnS Oc Op Ar oid ... 170442e4f4fSmartijnDump the tree of compiled-in MIB objects. 171f938cef3SmartijnIf 172f938cef3Smartijn.Ar oid 173c5d247d8Sjsgis specified it will print the objects in the requested output format if 174f938cef3Smartijnavailable, or print a warning if the object can't be found. 175442e4f4fSmartijn.El 176442e4f4fSmartijn.Pp 177991f73f5SmartijnThe 178991f73f5Smartijn.Ar options 179991f73f5Smartijnare as follows: 180442e4f4fSmartijn.Bl -tag -width Ds 1814f098f75Smartijn.It Fl A Ar authpass 1824f098f75SmartijnThe authentication password for the user. 1834f098f75SmartijnThis will be transformed to 1844f098f75Smartijn.Ar localauth . 1854f098f75SmartijnThis option is only used by 1864f098f75Smartijn.Fl v Cm 3 . 1874f098f75Smartijn.It Fl a Ar digest 1884f098f75SmartijnSet the digest 1894f098f75Smartijn.Pq authentication 1904f098f75Smartijnprotocol. 1914f098f75SmartijnOptions are 1924f098f75Smartijn.Cm MD5 , 1934f098f75Smartijn.Cm SHA , 1944f098f75Smartijn.Cm SHA-224 , 1954f098f75Smartijn.Cm SHA-256 , 1964f098f75Smartijn.Cm SHA-384 1974f098f75Smartijnor 1984f098f75Smartijn.Cm SHA-512 . 1994f098f75SmartijnThis option defaults to 200808130e6Ssthen.Cm SHA . 2014f098f75SmartijnThis option is only used by 2024f098f75Smartijn.Fl v Cm 3 . 203442e4f4fSmartijn.It Fl C Ar appopt 204991f73f5SmartijnFor the 205991f73f5Smartijn.Cm bulkget , 206991f73f5Smartijn.Cm bulkwalk , 207a154891cSmartijn.Cm df , 208991f73f5Smartijnand 209991f73f5Smartijn.Cm walk 210991f73f5Smartijnsubcommands, set the application specific 211442e4f4fSmartijn.Ar appopt 212442e4f4fSmartijnoptions by supplying a string of one or more 213442e4f4fSmartijnof the following modifier letters: 214442e4f4fSmartijn.Bl -tag -width Ds 215442e4f4fSmartijn.It Cm c 216991f73f5SmartijnFor 217442e4f4fSmartijn.Cm walk 218991f73f5Smartijnand 219442e4f4fSmartijn.Cm bulkwalk , 220442e4f4fSmartijndisable checking the order of MIBs. 221442e4f4fSmartijnOn some devices that return MIBs out of order, 222442e4f4fSmartijnthis may cause an infinite loop. 223442e4f4fSmartijn.It Cm E Ar endoid 224991f73f5SmartijnFor 225991f73f5Smartijn.Cm walk , 226991f73f5Smartijnwalk the tree up to but excluding 227442e4f4fSmartijn.Ar endoid . 228caf959a3SschwarzeThe blank before 229caf959a3Sschwarze.Ar endoid 230caf959a3Sschwarzeis mandatory. 2316659eda6Smartijn.It Cm h 2326659eda6SmartijnFor 2336659eda6Smartijn.Cm df 2346659eda6Smartijnprint the output in 2356659eda6Smartijn.Dq human-readable 2366659eda6Smartijnformat. 237442e4f4fSmartijn.It Cm I 238991f73f5SmartijnFor 239442e4f4fSmartijn.Cm walk , 240442e4f4fSmartijndo not fall back to returning the original MIB via a 241442e4f4fSmartijn.Cm get 242442e4f4fSmartijnrequest. 243442e4f4fSmartijn.It Cm i 244991f73f5SmartijnFor 245442e4f4fSmartijn.Cm walk 246991f73f5Smartijnand 247442e4f4fSmartijn.Cm bulkwalk , 248442e4f4fSmartijnalways do a 249442e4f4fSmartijn.Cm get 250442e4f4fSmartijnrequest on the specified 251442e4f4fSmartijn.Ar oid 252442e4f4fSmartijnfirst. 253442e4f4fSmartijn.It Cm n Ns Ar nonrep 254991f73f5SmartijnFor 255991f73f5Smartijn.Cm bulkget 256991f73f5Smartijnand 257991f73f5Smartijn.Cm bulkwalk , 258442e4f4fSmartijnSet the non-repeaters field in the request to the non-negative integer 259442e4f4fSmartijn.Ar nonrep . 260442e4f4fSmartijnThis causes the first 261442e4f4fSmartijn.Ar nonrep 262442e4f4fSmartijn.Ar oid 263442e4f4fSmartijnarguments to only return a single MIB instead of 264442e4f4fSmartijn.Ar maxrep . 265442e4f4fSmartijnThis value defaults to 0. 266caf959a3SschwarzeNo blank is allowed before 267caf959a3Sschwarze.Ar nonrep . 268442e4f4fSmartijn.It Cm p 269991f73f5SmartijnFor 270442e4f4fSmartijn.Cm walk 271442e4f4fSmartijnor 272442e4f4fSmartijn.Cm bulkwalk , 273991f73f5Smartijnalso show a summary of the total variables received. 274442e4f4fSmartijn.It Cm r Ns Ar maxrep 275442e4f4fSmartijnFor 2766659eda6Smartijn.Cm bulkget , 2776659eda6Smartijn.Cm bulkwalk 278991f73f5Smartijnand 2796659eda6Smartijn.Cm df , 280991f73f5Smartijnset the max-repetitions field in the request to the positive integer 281991f73f5Smartijn.Ar maxrep . 282991f73f5SmartijnThis determines the amount of MIBs to return for each specified OID. 283442e4f4fSmartijnThis value defaults to 10. 284caf959a3SschwarzeNo blank is allowed before 285caf959a3Sschwarze.Ar maxrep . 286bf54189fSmartijn.It Cm s Ar skipoid 287bf54189fSmartijnFor 288bf54189fSmartijn.Cm walk 289bf54189fSmartijnor 290bf54189fSmartijn.Cm bulkwalk 291bf54189fSmartijndon't include 292bf54189fSmartijn.Ar skipoid 293bf54189fSmartijnor its children in the walk output. 294bf54189fSmartijnThe blank before 295bf54189fSmartijn.Ar skipoid 296bf54189fSmartijnis mandatory. 297442e4f4fSmartijn.It Cm t 298991f73f5SmartijnFor 299991f73f5Smartijn.Cm walk , 300991f73f5SmartijnShow how long it took to walk the entire tree. 301442e4f4fSmartijn.El 302442e4f4fSmartijn.It Fl c Ar community 303442e4f4fSmartijnSet the 304442e4f4fSmartijn.Ar community 305442e4f4fSmartijnstring. 306b89ba26fSmartijnThis option is only used by 307b89ba26fSmartijn.Fl v Cm 1 308b89ba26fSmartijnand 30912022910Smartijn.Fl v Cm 2c 31012022910Smartijnand has no default. 311b89ba26fSmartijn.It Fl e Ar secengineid 312b89ba26fSmartijnThe USM security engine id. 313b89ba26fSmartijnUnder normal circumstances this value is discovered via snmpv3 discovery and 314b89ba26fSmartijndoes not need to be specified. 315b89ba26fSmartijnThis option is only used by 316b89ba26fSmartijn.Fl v Cm 3 . 317b89ba26fSmartijn.It Fl E Ar ctxengineid 318b89ba26fSmartijnThe snmpv3 context engine id. 319b89ba26fSmartijnMost of the time this value can be safely ignored. 320b89ba26fSmartijnThis option is only used by 321b89ba26fSmartijn.Fl v Cm 3 . 322f5e30c24Smartijn.It Fl K Ar localpriv 323f5e30c24SmartijnThe localized privacy password for the user in hexadecimal format 324f5e30c24Smartijn.Po 325f5e30c24Smartijnoptionally prefixed with a 326f5e30c24Smartijn.Cm 0x 327f5e30c24Smartijn.Pc . 328f5e30c24SmartijnThis option is only used by 329f5e30c24Smartijn.Fl v Cm 3 . 3304f098f75Smartijn.It Fl k Ar localauth 3314f098f75SmartijnThe localized authentication password for the user in hexadecimal format 3324f098f75Smartijn.Po 3334f098f75Smartijnoptionally prefixed with a 3344f098f75Smartijn.Cm 0x 3354f098f75Smartijn.Pc . 3364f098f75SmartijnThis option is only used by 3374f098f75Smartijn.Fl v Cm 3 . 3384f098f75Smartijn.It Fl l Ar seclevel 3394f098f75SmartijnThe security level. 3404f098f75SmartijnValues can be 341f5e30c24Smartijn.Cm noAuthNoPriv Pq default , 3424f098f75Smartijn.Cm authNoPriv 3434f098f75Smartijn.Po 3444f098f75Smartijnrequires either 3454f098f75Smartijn.Fl A 3464f098f75Smartijnor 3474f098f75Smartijn.Fl k 348f5e30c24Smartijn.Pc 349f5e30c24Smartijnor 350f5e30c24Smartijn.Cm authPriv 351f5e30c24Smartijn.Po 352f5e30c24Smartijnrequires either 353f5e30c24Smartijn.Fl X 354f5e30c24Smartijnor 355f5e30c24Smartijn.Fl K 356f5e30c24Smartijnin addition to the 357f5e30c24Smartijn.Cm authNoPriv 358f5e30c24Smartijnrequirements 3594f098f75Smartijn.Pc . 3604f098f75SmartijnThis option is only used by 3614f098f75Smartijn.Fl v Cm 3 . 362b89ba26fSmartijn.It Fl n Ar ctxname 363b89ba26fSmartijnSets the context name. 364b89ba26fSmartijnDefaults to an empty string. 365b89ba26fSmartijnThis option is only used by 366b89ba26fSmartijn.Fl v Cm 3 . 367442e4f4fSmartijn.It Fl O Ar output 368442e4f4fSmartijnSet the 369442e4f4fSmartijn.Ar output 370442e4f4fSmartijnoptions by supplying a string of one or more 371442e4f4fSmartijnof the following modifier letters: 372442e4f4fSmartijn.Bl -tag -width 1n 373442e4f4fSmartijn.It Cm a 374442e4f4fSmartijnPrint the varbind string unchanged 375442e4f4fSmartijnrather than replacing non-printable bytes with dots. 376442e4f4fSmartijn.It Cm f 377442e4f4fSmartijnWhen displaying an OID, include the full list of MIB objects. 378442e4f4fSmartijnBy default only the last textual MIB object is shown. 379442e4f4fSmartijn.It Cm n 380442e4f4fSmartijnDisplay the OID numerically. 381442e4f4fSmartijn.It Cm Q 382442e4f4fSmartijnRemove the type information. 383442e4f4fSmartijn.It Cm q 384442e4f4fSmartijnRemove the type information and the equal sign. 385442e4f4fSmartijn.It Cm S 386442e4f4fSmartijnDisplay the MIB name and the type information. 387442e4f4fSmartijnThis is the default behaviour. 388442e4f4fSmartijn.It Cm v 389442e4f4fSmartijnOnly display the varbind value, removing the OID. 390442e4f4fSmartijn.It Cm x 391442e4f4fSmartijnDisplay the varbind string values as hexadecimal strings. 392442e4f4fSmartijn.El 393991f73f5Smartijn.Pp 394991f73f5SmartijnThe 395991f73f5Smartijn.Cm mibtree 396991f73f5Smartijnsubcommand may only use the 397991f73f5Smartijn.Op Fl fnS 398991f73f5Smartijnoutput options; 399991f73f5Smartijnno output options are available for 400991f73f5Smartijn.Cm trap . 401442e4f4fSmartijn.It Fl r Ar retries 402442e4f4fSmartijnSet the number of 403442e4f4fSmartijn.Ar retries 404442e4f4fSmartijnin case of packet loss. 405442e4f4fSmartijnDefaults to 5. 406442e4f4fSmartijn.It Fl t Ar timeout 407442e4f4fSmartijnSet the 408442e4f4fSmartijn.Ar timeout 409442e4f4fSmartijnto wait for a reply, in seconds. 410442e4f4fSmartijnDefaults to 1. 411b89ba26fSmartijn.It Fl u Ar user 412b89ba26fSmartijnSets the username. 413b89ba26fSmartijnIf 414b89ba26fSmartijn.Fl v Cm 3 415*41ce3b17Snaddyis used, this option is required. 416b89ba26fSmartijnThis option is only used by 417b89ba26fSmartijn.Fl v Cm 3 . 418442e4f4fSmartijn.It Fl v Ar version 419442e4f4fSmartijnSet the snmp protocol 420442e4f4fSmartijn.Ar version 421442e4f4fSmartijnto either 422b89ba26fSmartijn.Cm 1 , 423b89ba26fSmartijn.Cm 2c 424442e4f4fSmartijnor 425b89ba26fSmartijn.Cm 3 . 426442e4f4fSmartijnCurrently defaults to 42712022910Smartijn.Cm 3 . 428f5e30c24Smartijn.It Fl X Ar privpass 429f5e30c24SmartijnThe privacy password for the user. 4300e0d916aSjsgThis will be transformed to 431f5e30c24Smartijn.Ar localpriv . 432f5e30c24SmartijnThis option is only used by 433f5e30c24Smartijn.Fl v Cm 3 . 434f5e30c24Smartijn.It Fl x Ar cipher 435f5e30c24SmartijnSets the cipher 436f5e30c24Smartijn.Pq privacy 437f5e30c24Smartijnprotocol. 438f5e30c24SmartijnOptions are 439f5e30c24Smartijn.Cm DES 440f5e30c24Smartijnand 441f5e30c24Smartijn.Cm AES . 4427b1c74a6SmartijnThis option defaults to 4437b1c74a6Smartijn.Cm AES . 444f5e30c24SmartijnThis option is only used by 445f5e30c24Smartijn.Fl v Cm 3 . 446b89ba26fSmartijn.It Fl Z Ar boots , Ns Ar time 447b89ba26fSmartijnSet the engine boots and engine time. 448b89ba26fSmartijnUnder normal circumstances this value is discovered via snmpv3 discovery and 449b89ba26fSmartijndoes not need to be specified. 450b89ba26fSmartijnThis option is only used by 451b89ba26fSmartijn.Fl v Cm 3 . 452442e4f4fSmartijn.El 453442e4f4fSmartijn.Pp 454442e4f4fSmartijnThe syntax for the 455442e4f4fSmartijn.Ar agent 456442e4f4fSmartijnargument is 457991f73f5Smartijn.Oo Ar protocol : Oc Ns Ar address , 458991f73f5Smartijnwith the following format: 459442e4f4fSmartijn.Bl -column udp6XXXtcp6X address -offset indent 460442e4f4fSmartijn.It Ar protocol Ta Ar address 461442e4f4fSmartijn.It Cm udp | tcp Ta Ar hostname Ns Oo Pf : Ar port Oc | 462442e4f4fSmartijn.Ar IPv4-address Ns Op Pf : Ar port 463442e4f4fSmartijn.It Cm udp6 | tcp6 Ta Ar hostname Ns Oo Pf : Ar port Oc | 464442e4f4fSmartijn.Cm \&[ Ns Ar IPv6-address Ns Cm \&] Ns Oo Pf : Ar port Oc | 465442e4f4fSmartijn.Ar IPv6-address Ns Pf : Ar port 466442e4f4fSmartijn.It Cm unix Ta Ar pathname 467442e4f4fSmartijn.El 468442e4f4fSmartijn.Pp 469442e4f4fSmartijnThe default 470442e4f4fSmartijn.Ar protocol 471442e4f4fSmartijnis 472442e4f4fSmartijn.Cm udp 473442e4f4fSmartijnand the default 474442e4f4fSmartijn.Ar port 475991f73f5Smartijnis 161, except for the 476991f73f5Smartijn.Cm trap 477991f73f5Smartijnsubcommand, which uses 162. 478442e4f4fSmartijn.Cm udpv6 479442e4f4fSmartijnand 480442e4f4fSmartijn.Cm udpipv6 481442e4f4fSmartijnare aliases for 482442e4f4fSmartijn.Cm udp6 ; 483442e4f4fSmartijn.Cm tcpv6 484442e4f4fSmartijnand 485442e4f4fSmartijn.Cm tcpipv6 486442e4f4fSmartijnfor 487442e4f4fSmartijn.Cm tcp6 . 488442e4f4fSmartijnTo specify an IPv6-address without a 489442e4f4fSmartijn.Ar port , 490442e4f4fSmartijnthe 491442e4f4fSmartijn.Ar IPv6-address 492442e4f4fSmartijnmust be enclosed in square brackets. 493442e4f4fSmartijnIf the square brackets are omitted, 494442e4f4fSmartijnthe value after the last colon is always interpreted as a 495442e4f4fSmartijn.Ar port . 496442e4f4fSmartijn.Ss Data types 497442e4f4fSmartijnAdditional data sent to the server is formatted by specifying one or more 498442e4f4fSmartijntriples of 499442e4f4fSmartijn.Ar varoid , 500442e4f4fSmartijn.Ar type , 501442e4f4fSmartijnand 502442e4f4fSmartijn.Ar value . 503442e4f4fSmartijnSupported types are: 504991f73f5Smartijn.Bl -tag -width 1n -offset indent 505442e4f4fSmartijn.It Cm a 506442e4f4fSmartijnAn IPv4 Address. 507442e4f4fSmartijn.It Cm b 508442e4f4fSmartijnA bitstring. 509442e4f4fSmartijnA list of individual bit offsets separated by comma, space or tab. 510442e4f4fSmartijnMust be supplied as a single argument. 511442e4f4fSmartijn.It Cm c 512442e4f4fSmartijnA counter32. 513442e4f4fSmartijn.It Cm d 514442e4f4fSmartijnA decimal string. 515442e4f4fSmartijnA list of individual bytes in decimal form separated by space or tab. 516442e4f4fSmartijn.It Cm i 517442e4f4fSmartijnAn integer. 518442e4f4fSmartijn.It Cm n 519442e4f4fSmartijnA null object. 520442e4f4fSmartijn.It Cm o 521442e4f4fSmartijnAn OID. 522442e4f4fSmartijn.It Cm s 523442e4f4fSmartijnA regular string. 524442e4f4fSmartijn.It Cm t 525442e4f4fSmartijnTimeticks in centiseconds. 526442e4f4fSmartijn.It Cm u 527442e4f4fSmartijnUnsigned integer. 528442e4f4fSmartijn.It Cm x 529442e4f4fSmartijnA hex string. 530442e4f4fSmartijnSimilar to a decimal string, but in hexadecimal format. 531442e4f4fSmartijn.El 532f35e0348Smartijn.Sh ENVIRONMENT 533f35e0348Smartijn.Bl -tag -width LC_CTYPE 534f35e0348Smartijn.It Ev LC_CTYPE 535f35e0348SmartijnThe character encoding 536f35e0348Smartijn.Xr locale 1 537f35e0348Smartijnused for output. 538f35e0348SmartijnIt decides whether objects having a display format of UTF-8 are printed as 539f35e0348SmartijnUTF-8, and whether each byte invalid according to the object's display format is 540f35e0348Smartijnprinted as a UTF-8 replacement character 541f35e0348Smartijn.Pq Sq \[uFFFD] . 542f35e0348Smartijn.Pp 543f35e0348SmartijnIf unset or set to 544f35e0348Smartijn.Qq C , 545f35e0348Smartijn.Qq POSIX , 546f35e0348Smartijnor an unsupported value, for objects having a display format of UTF-8, each 547f35e0348Smartijn.Em printable 548f35e0348Smartijnnon-ASCII character is replaced with a single dot 549f35e0348Smartijn.Pq Sq \&. . 550f35e0348SmartijnEach byte invalid according to the object's display format is printed as a 551f35e0348Smartijnquestion mark 552f35e0348Smartijn.Pq Sq \&? . 553f35e0348Smartijn.Pp 554f35e0348SmartijnEach non-printable character is always replaced with a single dot 555f35e0348Smartijn.Pq Sq \&. . 556f35e0348Smartijn.El 557442e4f4fSmartijn.Sh SEE ALSO 558442e4f4fSmartijn.Xr snmpd 8 559442e4f4fSmartijn.Sh HISTORY 560442e4f4fSmartijnThe 561442e4f4fSmartijn.Nm 562442e4f4fSmartijnprogram first appeared in 563442e4f4fSmartijn.Ox 6.6 . 564442e4f4fSmartijn.Sh AUTHORS 565442e4f4fSmartijnThe 566442e4f4fSmartijn.Nm 567442e4f4fSmartijnprogram was written by 568442e4f4fSmartijn.An Martijn van Duren Aq Mt martijn@openbsd.org . 569