ipcalc: modified previous iprange example to use library

TODO: Valgrinding