aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Hongyang <yanghy@cn.fujitsu.com>2015-10-07 11:52:20 +0800
committerJason Wang <jasowang@redhat.com>2015-10-12 13:31:18 +0800
commitb68c7f76926dee3f234ccee88f3167b640d9318e (patch)
tree400d818d74aa5530861e75f4a7e750a94434dc9b
parenta4960f52e7f402a4b7402ace204283de7b9d4879 (diff)
downloadqemu-b68c7f76926dee3f234ccee88f3167b640d9318e.zip
qemu-b68c7f76926dee3f234ccee88f3167b640d9318e.tar.gz
qemu-b68c7f76926dee3f234ccee88f3167b640d9318e.tar.bz2
net/queue: export qemu_net_queue_append_iov
This will be used by buffer filter implementation later to queue packets. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r--include/net/queue.h7
-rw-r--r--net/queue.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/include/net/queue.h b/include/net/queue.h
index b4a7183..5469fdb 100644
--- a/include/net/queue.h
+++ b/include/net/queue.h
@@ -47,6 +47,13 @@ typedef ssize_t (NetQueueDeliverFunc)(NetClientState *sender,
NetQueue *qemu_new_net_queue(NetQueueDeliverFunc *deliver, void *opaque);
+void qemu_net_queue_append_iov(NetQueue *queue,
+ NetClientState *sender,
+ unsigned flags,
+ const struct iovec *iov,
+ int iovcnt,
+ NetPacketSent *sent_cb);
+
void qemu_del_net_queue(NetQueue *queue);
ssize_t qemu_net_queue_send(NetQueue *queue,
diff --git a/net/queue.c b/net/queue.c
index 16dddf0..de8b9d3 100644
--- a/net/queue.c
+++ b/net/queue.c
@@ -112,12 +112,12 @@ static void qemu_net_queue_append(NetQueue *queue,
QTAILQ_INSERT_TAIL(&queue->packets, packet, entry);
}
-static void qemu_net_queue_append_iov(NetQueue *queue,
- NetClientState *sender,
- unsigned flags,
- const struct iovec *iov,
- int iovcnt,
- NetPacketSent *sent_cb)
+void qemu_net_queue_append_iov(NetQueue *queue,
+ NetClientState *sender,
+ unsigned flags,
+ const struct iovec *iov,
+ int iovcnt,
+ NetPacketSent *sent_cb)
{
NetPacket *packet;
size_t max_len = 0;