Add some IP calculation helpers