@@ -2025,6 +2025,14 @@ static int net_raw_init(Monitor *mon, VLANState *vlan, const char *model,
return 0;
}
+int raw_get_fd(VLANClientState *vc)
+{
+ RAWState *s = vc->opaque;
+ if (vc->receive != raw_receive)
+ return -1;
+ return s->fd;
+}
+
#if defined(CONFIG_VDE)
typedef struct VDEState {
VLANClientState *vc;
@@ -94,6 +94,8 @@ int tap_get_fd(VLANClientState *vc);
int tap_has_vnet_hdr(void *opaque);
void tap_using_vnet_hdr(void *opaque, int using_vnet_hdr);
+int raw_get_fd(VLANClientState *vc);
+
/* NIC info */
#define MAX_NICS 8