util: Add virSocketAddrSetIPv[46]AddrNetOrder and use it
This allows setting the address in host and/or network order and makes
the naming consistent. Now you don't need to call [hn]to[nh]l()
functions as that is taken care of by these functions. Also, now
the *NetOrder take the address in network order, the other functions in
host order so the naming and usage is consistent. Some places were
having the address in network order and calling ntohl() just so the
original function can call htonl() again. This makes it nicer to read.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
Showing
想要评论请 注册 或 登录