simple ipv4 pred and such functions

needed to manage ip ranges.