]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lua bindings: complete knot_pkt_t
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 13 Apr 2018 16:09:31 +0000 (18:09 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 11 May 2018 15:18:42 +0000 (17:18 +0200)
We don't need the end, but I prefer to get rid of the exception,
as we now require libknot > 2.6 anyway and it only implies adding
a few more binding lines.

daemon/lua/kres-gen.lua
daemon/lua/kres-gen.sh

index 35d5bc640207849f7882b53d1ae09de57d254e92..023bbc6cda27a230514b9a028ced704f49868296 100644 (file)
@@ -33,6 +33,15 @@ typedef struct {
        uint16_t pos;
        uint16_t count;
 } knot_pktsection_t;
+struct knot_compr {
+       uint8_t *wire;
+       knot_rrinfo_t *rrinfo;
+       struct {
+               uint16_t pos;
+               uint8_t labels;
+       } suffix;
+};
+typedef struct knot_compr knot_compr_t;
 struct knot_pkt {
        uint8_t *wire;
        size_t size;
@@ -54,7 +63,7 @@ struct knot_pkt {
        knot_rrinfo_t *rr_info;
        knot_rrset_t *rr;
        knot_mm_t mm;
-       char _stub[]; /* TMP: do NOT replace yet (changed in libknot-2.6.0) */
+       knot_compr_t compr;
 };
 typedef struct knot_pkt knot_pkt_t;
 typedef struct {
index 117f3e9090a0340f6cadd0d75decaf2710c31919..8132430d4d13a26eff2727a3d8a1bd61b507b6a4 100755 (executable)
@@ -48,6 +48,8 @@ typedef void (*trace_callback_f)(struct kr_request *);
        struct knot_rdataset
        knot_rrset_t
        knot_pktsection_t
+       struct knot_compr
+       knot_compr_t
        struct knot_pkt
        knot_pkt_t
        # generics