]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
libknot: remove of unused static functions
authorJan Hák <jan.hak@nic.cz>
Wed, 10 May 2023 12:20:03 +0000 (14:20 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Tue, 23 May 2023 08:42:01 +0000 (10:42 +0200)
src/libknot/xdp/tcp_iobuf.c

index b1cc515c064fcf18c8e43f32f36448c73ed1f308..65342d0de32d8c8faae3a46b5647b3170cb2de6f 100644 (file)
@@ -39,12 +39,6 @@ static void iov_inc(struct iovec *iov, size_t shift)
        iov->iov_len -= shift;
 }
 
-/*! \brief Strip 2-byte length prefix from a payload. */
-static void iov_inc2(struct iovec *iov)
-{
-       iov_inc(iov, sizeof(uint16_t));
-}
-
 static size_t tcp_payload_len(const struct iovec *payload)
 {
        if (payload->iov_len < 2) {
@@ -53,35 +47,6 @@ static size_t tcp_payload_len(const struct iovec *payload)
        return knot_wire_read_u16(payload->iov_base);
 }
 
-static bool iov_inc_pf(struct iovec *iov)
-{
-       size_t shift = tcp_payload_len(iov);
-       if (iov->iov_len >= shift) {
-               iov_inc(iov, shift);
-               return true;
-       } else {
-               return false;
-       }
-}
-
-static size_t iov_count(const struct iovec *iov, size_t *out_data)
-{
-       size_t res = 0;
-       struct iovec tmp = *iov;
-       while (tmp.iov_len >= sizeof(uint16_t)) {
-               size_t shift = tcp_payload_len(iov);
-               if (tmp.iov_len < shift) {
-                       return res;
-               }
-               res++;
-               if (out_data != NULL) {
-                       *out_data += shift;
-               }
-               iov_inc(&tmp, shift);
-       }
-       return res;
-}
-
 static void iov_append(struct iovec *what, const struct iovec *with)
 {
        // NOTE: what->iov_base must be pre-allocated large enough