aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/qemu-devel/files/pcap-patch
blob: c8b3c9d00689a5e28fcdfffba48e0f09ddd467ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -ruN net/clients.h net/clients.h
--- net/clients.h   2015-12-17 04:04:50.000000000 +0600
+++ net/clients.h   2015-12-25 01:32:09.000000000 +0600
@@ -47,6 +47,11 @@
 int net_init_bridge(const NetClientOptions *opts, const char *name,
                     NetClientState *peer, Error **errp);
 
+#ifdef CONFIG_PCAP
+int net_init_pcap(const NetClientOptions *opts, const char *name,
+                  NetClientState *peer, Error **errp);
+#endif
+
 int net_init_l2tpv3(const NetClientOptions *opts, const char *name,
                     NetClientState *peer, Error **errp);
 #ifdef CONFIG_VDE
diff -ruN net/hub.c net/hub.c
--- net/hub.c   2015-12-17 04:04:50.000000000 +0600
+++ net/hub.c   2015-12-25 01:32:09.000000000 +0600
@@ -322,6 +322,7 @@
             case NET_CLIENT_OPTIONS_KIND_SOCKET:
             case NET_CLIENT_OPTIONS_KIND_VDE:
             case NET_CLIENT_OPTIONS_KIND_VHOST_USER:
+            case NET_CLIENT_OPTIONS_KIND_PCAP:
                 has_host_dev = 1;
                 break;
             default:
diff -ruN qapi-schema.json qapi-schema.json
--- qapi-schema.json    2015-12-17 04:04:50.000000000 +0600
+++ qapi-schema.json    2015-12-25 01:32:09.000000000 +0600
@@ -2538,6 +2538,10 @@
     '*br':     'str',
     '*helper': 'str' } }
 
+{ 'struct': 'NetdevPcapOptions',
+  'data': {
+    '*ifname':     'str' } }
+
 ##
 # @NetdevHubPortOptions
 #
@@ -2608,6 +2612,7 @@
     'nic':      'NetLegacyNicOptions',
     'user':     'NetdevUserOptions',
     'tap':      'NetdevTapOptions',
+    'pcap':     'NetdevPcapOptions',
     'l2tpv3':   'NetdevL2TPv3Options',
     'socket':   'NetdevSocketOptions',
     'vde':      'NetdevVdeOptions',