573c41a util: Add virSocketAddrSetIPv[46]AddrNetOrder and use it

Authored and Committed by mkletzan 8 years ago
    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: Martin Kletzander <mkletzan@redhat.com>
    
        
file modified
+2 -0
file modified
+39 -6
file modified
+2 -0
file modified
+3 -4