Patchwork [RFC,1/4] net/dump: Make pcap structures public

login
register
mail settings
Submitter Miguel Di Ciurcio Filho
Date July 15, 2010, 8:22 p.m.
Message ID <1279225380-28790-2-git-send-email-miguel.filho@gmail.com>
Download mbox | patch
Permalink /patch/59041/
State New
Headers show

Comments

Miguel Di Ciurcio Filho - July 15, 2010, 8:22 p.m.
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
 net/dump.c |   21 ---------------------
 net/dump.h |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 21 deletions(-)

Patch

diff --git a/net/dump.c b/net/dump.c
index 6db7ecf..8eebacd 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -34,27 +34,6 @@  typedef struct DumpState {
     int pcap_caplen;
 } DumpState;
 
-#define PCAP_MAGIC 0xa1b2c3d4
-
-struct pcap_file_hdr {
-    uint32_t magic;
-    uint16_t version_major;
-    uint16_t version_minor;
-    int32_t thiszone;
-    uint32_t sigfigs;
-    uint32_t snaplen;
-    uint32_t linktype;
-};
-
-struct pcap_sf_pkthdr {
-    struct {
-        int32_t tv_sec;
-        int32_t tv_usec;
-    } ts;
-    uint32_t caplen;
-    uint32_t len;
-};
-
 static ssize_t dump_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
 {
     DumpState *s = DO_UPCAST(DumpState, nc, nc);
diff --git a/net/dump.h b/net/dump.h
index fdc91ad..e9133da 100644
--- a/net/dump.h
+++ b/net/dump.h
@@ -27,6 +27,27 @@ 
 #include "net.h"
 #include "qemu-common.h"
 
+#define PCAP_MAGIC 0xa1b2c3d4
+
+struct pcap_file_hdr {
+    uint32_t magic;
+    uint16_t version_major;
+    uint16_t version_minor;
+    int32_t thiszone;
+    uint32_t sigfigs;
+    uint32_t snaplen;
+    uint32_t linktype;
+};
+
+struct pcap_sf_pkthdr {
+    struct {
+        int32_t tv_sec;
+        int32_t tv_usec;
+    } ts;
+    uint32_t caplen;
+    uint32_t len;
+};
+
 int net_init_dump(QemuOpts *opts, Monitor *mon,
                   const char *name, VLANState *vlan);