[ovs-dev] [packet_in 05/13] ofp-print: Remove tcpdump from ofp_packet_to_string().

Ethan Jackson ethan at nicira.com
Thu Dec 29 19:00:24 UTC 2011


Sounds good. Here is an incremental.

---
 INSTALL.Linux      |    5 -----
 lib/ofp-print.c    |    5 +----
 tests/ofp-print.at |    6 +-----
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/INSTALL.Linux b/INSTALL.Linux
index 7a55ccd..8ef2315 100644
--- a/INSTALL.Linux
+++ b/INSTALL.Linux
@@ -117,11 +117,6 @@ following software:
       iproute2 (part of all major distributions and available at
       http://www.linux-foundation.org/en/Net:Iproute2).
 
-    - For debugging purposes, Open vSwitch expects that "tcpdump" is
-      installed as /usr/sbin/tcpdump.  If tcpdump is not installed, or
-      if it is installed in a different location, then some Open
-      vSwitch log messages will not be as detailed.
-
 You should ensure that /dev/urandom exists.  To support TAP devices,
 you must also ensure that /dev/net/tun exists.
 
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 0417e9d..fe4af4c 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -1541,10 +1541,7 @@ ofp_print(FILE *stream, const void *oh, size_t len, int verbosity)
 }
 
 /* Dumps the contents of the Ethernet frame in the 'len' bytes starting at
- * 'data' to 'stream' using tcpdump.  'total_len' specifies the full length of
- * the Ethernet frame (of which 'len' bytes were captured).
- *
- * This starts and kills a tcpdump subprocess so it's quite expensive. */
+ * 'data' to 'stream'. */
 void
 ofp_print_packet(FILE *stream, const void *data, size_t len)
 {
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index 3f764a4..5734174 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -225,17 +225,13 @@ AT_CLEANUP
 
 AT_SETUP([OFPT_PACKET_IN])
 AT_KEYWORDS([ofp-print])
-AT_SKIP_IF([test ! -x /usr/sbin/tcpdump])
 AT_CHECK([ovs-ofctl ofp-print "\
 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
 50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
-"], [0], [stdout])
-dnl The tcpdump output format differs slightly from one version to another,
-dnl so trim off the end of the line where differences appear.
-AT_CHECK([cat stdout], [0], [dnl
+"], [0], [dnl
 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 data_len=60 buffer=0x00000111
 priority:0,tunnel:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:06) type:0800 proto:6 tos:0 ttl:64 ip(192.168.0.1->192.168.0.2) port(10031->0)
 ])
-- 
1.7.7.1




More information about the dev mailing list