lib: ip address presentation convert helper methods

Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>