diff options
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -26,6 +26,16 @@ typedef struct NICConf { /* VLANs support */ +typedef enum { + NET_CLIENT_TYPE_NONE, + NET_CLIENT_TYPE_NIC, + NET_CLIENT_TYPE_SLIRP, + NET_CLIENT_TYPE_TAP, + NET_CLIENT_TYPE_SOCKET, + NET_CLIENT_TYPE_VDE, + NET_CLIENT_TYPE_DUMP +} net_client_type; + typedef int (NetCanReceive)(VLANClientState *); typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t *, size_t); typedef ssize_t (NetReceiveIOV)(VLANClientState *, const struct iovec *, int); @@ -33,6 +43,7 @@ typedef void (NetCleanup) (VLANClientState *); typedef void (LinkStatusChanged)(VLANClientState *); struct VLANClientState { + net_client_type type; NetReceive *receive; NetReceiveIOV *receive_iov; /* Packets may still be sent if this returns zero. It's used to |