diff options
Diffstat (limited to 'src/libs6dns')
-rw-r--r-- | src/libs6dns/deps-lib/s6dns | 1 | ||||
-rw-r--r-- | src/libs6dns/s6dns_engine_query.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/libs6dns/deps-lib/s6dns b/src/libs6dns/deps-lib/s6dns index 266b574..459dbcf 100644 --- a/src/libs6dns/deps-lib/s6dns +++ b/src/libs6dns/deps-lib/s6dns @@ -36,6 +36,7 @@ s6dns_engine_free.o s6dns_engine_freen.o s6dns_engine_here.o s6dns_engine_nextdeadline.o +s6dns_engine_query.o s6dns_engine_zero.o s6dns_finish.o s6dns_fmt_caa.o diff --git a/src/libs6dns/s6dns_engine_query.c b/src/libs6dns/s6dns_engine_query.c new file mode 100644 index 0000000..f672b44 --- /dev/null +++ b/src/libs6dns/s6dns_engine_query.c @@ -0,0 +1,14 @@ +/* ISC license. */ + +#include <skalibs/uint16.h> + +#include <s6-dns/s6dns-engine.h> + +void s6dns_engine_query (s6dns_engine_t const *dt, char **q, uint16_t *qlen, uint16_t *qtype) +{ + uint16_t len ; + uint16_unpack_big(dt->sa.s, &len) ; + *q = dt->sa.s + 14 ; + *qlen = len - 16 ; + uint16_unpack_big(dt->sa.s + len - 2, qtype) ; +} |