core: use const in some ip_addr functions