]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-dns-domain.c
shared: dns-name - introduce dns_label_unescape_suffix()
authorTom Gundersen <teg@jklm.no>
Mon, 20 Jul 2015 14:01:03 +0000 (16:01 +0200)
committerTom Gundersen <teg@jklm.no>
Mon, 27 Jul 2015 22:07:31 +0000 (00:07 +0200)
commit642900d3fa479c01d29ebe8268746d06d1c63703
tree2f112bf1234f9cd05b24b652cbb181c721cb07d5
parent37d54b938faeefd0a5a74f9197a33d78bbb8d6bf
shared: dns-name - introduce dns_label_unescape_suffix()

Intended to be called repeatedly, and returns then successive unescaped labels
from the most to the least significant (left to right).

This is slightly inefficient as it scans the string three times (two would be
sufficient): once to find the end of the string, once to find the beginning
of each label and lastly once to do the actual unescaping. The latter two
could be done in one go, but that seemed unnecessarily convoluted.
src/shared/dns-domain.c
src/shared/dns-domain.h
src/test/test-dns-domain.c