Simple tool for displaying current interfaces IP-addresses
showip [-h] [-46gltTu] [interface]
Current options/filters are:
- -h display help
- -4 display IPv4 addresses
- -6 display IPv6 addresses (Same as -glut)
- -g display GUAs (Global Unicast Addresses)
- -l display LLAs (Link Local Addresses
- -t display temporary addresses
- -T filter temporary addresses out
- -u display ULAs (Unique Local Addresses)
- interface display results for interface only
Just run your preferred compiler:
gcc -Wall -o showip main.c
clang -Wall -o showip main.c
To compile the tests, cmocka must be present.
gcc -Wall -o runtest test.c `pkg-config --cflags --libs cmocka` && ./runtest
clang -Weverything -o runtest test.c `pkg-config --cflags --libs cmocka` && ./runtest
Copy the binary to some directory in your $PATH
or make an alias/function in your shell.
- Arch Linux (29.12.2020)
- Arch Linux ARM (29.12.2020 on Raspberry Pi 3)
- Scientific Linux 7.8
- Ubuntu 18.04.5
- Ubuntu 20.04.1