aboutsummaryrefslogtreecommitdiff
path: root/net.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-08 19:45:03 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-08 19:45:03 +0000
commit34b25ca74eab49cedf994193dc7727e3f2613219 (patch)
treec82bf6151d8ad08db96dbd5794bb82e440c77bbf /net.h
parent436e5e53c97d8fb469306b18a0c31dc60f5e546c (diff)
downloadqemu-34b25ca74eab49cedf994193dc7727e3f2613219.zip
qemu-34b25ca74eab49cedf994193dc7727e3f2613219.tar.gz
qemu-34b25ca74eab49cedf994193dc7727e3f2613219.tar.bz2
Allow devices be notified of link status change (Mark McLoughlin)
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6248 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'net.h')
-rw-r--r--net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net.h b/net.h
index 7854129..e79ee3d 100644
--- a/net.h
+++ b/net.h
@@ -9,12 +9,15 @@ typedef ssize_t (IOReadvHandler)(void *, const struct iovec *, int);
typedef struct VLANClientState VLANClientState;
+typedef void (LinkStatusChanged)(VLANClientState *);
+
struct VLANClientState {
IOReadHandler *fd_read;
IOReadvHandler *fd_readv;
/* Packets may still be sent if this returns zero. It's used to
rate-limit the slirp code. */
IOCanRWHandler *fd_can_read;
+ LinkStatusChanged *link_status_changed;
int link_down;
void *opaque;
struct VLANClientState *next;