summaryrefslogtreecommitdiffstats
path: root/server/vd_interface.h
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-10-16 00:21:43 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-10-18 17:42:37 +0200
commitef213c66c19d265140e9a55519b174d34ff1f16b (patch)
tree0a8e58217f5757881d4d4798d1316dbb3809f37a /server/vd_interface.h
parent308e4545cbf8d26d5d47ad6ab9f2c6e6e6648003 (diff)
downloadspice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.gz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.xz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.zip
tunnel
Diffstat (limited to 'server/vd_interface.h')
-rw-r--r--server/vd_interface.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/vd_interface.h b/server/vd_interface.h
index 932c0b13..12dbd5ff 100644
--- a/server/vd_interface.h
+++ b/server/vd_interface.h
@@ -330,5 +330,23 @@ struct VDIPortInterface {
int (*read)(VDIPortInterface *port, VDObjectRef plug, uint8_t *buf, int len);
};
+#define VD_INTERFACE_NET_WIRE "net_wire"
+#define VD_INTERFACE_NET_WIRE_MAJOR 1
+#define VD_INTERFACE_NET_WIRE_MINOR 1
+
+typedef struct NetWireInterface NetWireInterface;
+typedef void (*net_wire_packet_route_proc_t)(void *opaque, const uint8_t *pkt, int pkt_len);
+
+struct NetWireInterface {
+ VDInterface base;
+
+ struct in_addr (*get_ip)(NetWireInterface *vlan);
+ int (*can_send_packet)(NetWireInterface *vlan);
+ void (*send_packet)(NetWireInterface *vlan, const uint8_t *buf, int size);
+ VDObjectRef (*register_route_packet)(NetWireInterface *vlan, net_wire_packet_route_proc_t proc,
+ void *opaque);
+ void (*unregister_route_packet)(NetWireInterface *vlan, VDObjectRef proc);
+};
+
#endif