]> xenbits.xensource.com Git - libvirt.git/commit
util: Introduce virSocketAddrPTRDomain
authorJiri Denemark <jdenemar@redhat.com>
Thu, 8 Dec 2016 21:21:39 +0000 (22:21 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 19 Dec 2016 08:03:29 +0000 (09:03 +0100)
commitacd547dc9510224250a6237545f28e5b290f45f3
treef10e60e3f67dd03404e19d371598de96abf3d941
parent770b1d2b56d979202302a7dfd9ad38fd4825ac6c
util: Introduce virSocketAddrPTRDomain

The API creates PTR domain which corresponds to a given addr/prefix.
Both IPv4 and IPv6 addresses are supported, but the prefix must be
divisible by 8 for IPv4 and divisible by 4 for IPv6.

The generated PTR domain has the following format

IPv4: 1.2.3.4.in-addr.arpa
IPv6: 0.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.0.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.ip6.arpa

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/libvirt_private.syms
src/util/virsocketaddr.c
src/util/virsocketaddr.h