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

2
net.h
View file

@ -8,7 +8,7 @@
typedef struct VLANClientState VLANClientState;
typedef int (NetCanReceive)(VLANClientState *);
typedef void (NetReceive)(VLANClientState *, const uint8_t *, size_t);
typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t *, size_t);
typedef ssize_t (NetReceiveIOV)(VLANClientState *, const struct iovec *, int);
typedef void (NetCleanup) (VLANClientState *);
typedef void (LinkStatusChanged)(VLANClientState *);