]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Improve virSocketAddrMask[ByPrefix] API
authorLaine Stump <laine@laine.org>
Fri, 31 Dec 2010 11:20:43 +0000 (06:20 -0500)
committerLaine Stump <laine@laine.org>
Fri, 31 Dec 2010 16:34:35 +0000 (11:34 -0500)
commit77094eaf3a0f7b271b9b94e8712ebc85b75dd84f
tree2e9177197be53e60ec75b7f7a6b5c2fd05c7603f
parent2eeeb60152ade471331ac83660bddb482935cae5
Improve virSocketAddrMask[ByPrefix] API

The original version of these functions would modify the address sent
in, meaning that the caller would usually need to copy the address
first. This change makes the original a const, and puts the resulting
masked address into a new arg (which could point to the same
virSocketAddr as the original, if the caller really wants to modify
it).

This also makes the API consistent with virSocketAddrBroadcast[ByPrefix].
src/util/iptables.c
src/util/network.c
src/util/network.h