3 2c6743b8 2022-09-24 mischa # Copyright (c) 2019-2022 Mischa Peters <mischa @ openbsd.amsterdam>
5 0bede696 2021-04-24 mischa # Permission to use, copy, modify, and distribute this software for any
6 0bede696 2021-04-24 mischa # purpose with or without fee is hereby granted, provided that the above
7 0bede696 2021-04-24 mischa # copyright notice and this permission notice appear in all copies.
9 0bede696 2021-04-24 mischa # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 0bede696 2021-04-24 mischa # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 0bede696 2021-04-24 mischa # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 0bede696 2021-04-24 mischa # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 0bede696 2021-04-24 mischa # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 0bede696 2021-04-24 mischa # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 0bede696 2021-04-24 mischa # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 2c6743b8 2022-09-24 mischa # Get list of interfaces with: snmp walk -A <authpass> -l authPriv -u <user> -X <privpass> <host> ifDescr
19 0bede696 2021-04-24 mischa test -n "$1" || exit 1
21 2c6743b8 2022-09-24 mischa AUTHPASS="tropic shark reefs"
22 2c6743b8 2022-09-24 mischa USER="random"
23 2c6743b8 2022-09-24 mischa PRIVPASS="equ5xerhiffid7klevuk"
25 2c6743b8 2022-09-24 mischa snmp walk -A "${AUTHPASS}" -l authPriv -u ${USER} -X "${PRIVPASS}" ${HOST} ifDescr