net: add return value to packet receive handler

This allows us to handle queue full conditions rather than dropping
the packet on the floor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
This commit is contained in:
Mark McLoughlin 2009-05-18 13:40:55 +01:00
parent e3f5ec2b5e
commit 4f1c942b7f
18 changed files with 126 additions and 95 deletions

View file

@ -650,11 +650,11 @@ static void tap_cleanup(VLANClientState *vc)
qemu_free(s);
}
static void tap_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
static ssize_t tap_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
TAPState *s = opaque;
TAPState *s = vc->opaque;
tap_win32_write(s->handle, buf, size);
return tap_win32_write(s->handle, buf, size);
}
static void tap_win32_send(void *opaque)