summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-07-24 16:35:17 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-08-01 13:32:11 +0100
commit86a77c3858610a36f1409c657b1768727693d25b (patch)
treee2efb48dff91569fad46bd24ccb19da7082d4fff /net.c
parent1a8595931ac6ffb76c2e10675ba3a39e807f02fd (diff)
net: cleanup deliver/deliver_iov func pointers
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'net.c')
-rw-r--r--net.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/net.c b/net.c
index 7edb52b5c..98109e53b 100644
--- a/net.c
+++ b/net.c
@@ -184,17 +184,6 @@ static char *assign_name(NetClientState *nc1, const char *model)
return g_strdup(buf);
}
-static ssize_t qemu_deliver_packet(NetClientState *sender,
- unsigned flags,
- const uint8_t *data,
- size_t size,
- void *opaque);
-static ssize_t qemu_deliver_packet_iov(NetClientState *sender,
- unsigned flags,
- const struct iovec *iov,
- int iovcnt,
- void *opaque);
-
NetClientState *qemu_new_net_client(NetClientInfo *info,
NetClientState *peer,
const char *model,
@@ -221,9 +210,7 @@ NetClientState *qemu_new_net_client(NetClientInfo *info,
}
QTAILQ_INSERT_TAIL(&net_clients, nc, next);
- nc->send_queue = qemu_new_net_queue(qemu_deliver_packet,
- qemu_deliver_packet_iov,
- nc);
+ nc->send_queue = qemu_new_net_queue(nc);
return nc;
}
@@ -327,11 +314,11 @@ int qemu_can_send_packet(NetClientState *sender)
return 1;
}
-static ssize_t qemu_deliver_packet(NetClientState *sender,
- unsigned flags,
- const uint8_t *data,
- size_t size,
- void *opaque)
+ssize_t qemu_deliver_packet(NetClientState *sender,
+ unsigned flags,
+ const uint8_t *data,
+ size_t size,
+ void *opaque)
{
NetClientState *nc = opaque;
ssize_t ret;
@@ -424,11 +411,11 @@ static ssize_t nc_sendv_compat(NetClientState *nc, const struct iovec *iov,
return nc->info->receive(nc, buffer, offset);
}
-static ssize_t qemu_deliver_packet_iov(NetClientState *sender,
- unsigned flags,
- const struct iovec *iov,
- int iovcnt,
- void *opaque)
+ssize_t qemu_deliver_packet_iov(NetClientState *sender,
+ unsigned flags,
+ const struct iovec *iov,
+ int iovcnt,
+ void *opaque)
{
NetClientState *nc = opaque;