]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: rename/move iptablesFormatNetwork to virSocketAddrFormatWithPrefix
authorLaine Stump <laine@redhat.com>
Sun, 14 Nov 2021 18:09:47 +0000 (13:09 -0500)
committerLaine Stump <laine@redhat.com>
Mon, 13 Dec 2021 18:37:31 +0000 (13:37 -0500)
commit426afc0082f1d28449380a5c9260d64ed7183e38
treed04d633cfccc513abfa934116ff2ccf75b51914c
parentb44960319243923d9d4f2501a6aff929ceb40002
util: rename/move iptablesFormatNetwork to virSocketAddrFormatWithPrefix

This function formats an address + prefix as, e.g. 192.168.122.0/24,
which is useful in places other than iptables. Move it to
virsocketaddr.c and make it public so that others can use it. While
moving, the bit that masks off the host bits of the address is made
optional, so that the function is more generally useful.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/viriptables.c
src/util/virsocketaddr.c
src/util/virsocketaddr.h