On Fri, May 27, 2016 at 2:02 PM, Aaron Conole <acon...@redhat.com> wrote:
> Russell Bryant <russ...@ovn.org> writes: > > > On Tue, May 24, 2016 at 4:35 PM, Aaron Conole <acon...@redhat.com> > wrote: > > > > > > Currently, there is some documentation which describes setting up and > > using port mirrors for bridges. This documentation is helpful to setup > > a packet capture for specific ports. > > > > However, a utility to do such packet capture would be valuable, both > > as an exercise in documenting the steps an additional time, and as a way > > of providing an out-of-the-box experience for running a capture. > > > > This commit adds a tcpdump-wrapper utility for such purpose. It uses the > > Open vSwitch python library to add/remove ports and mirrors to/from the > > Open vSwitch database. It will create a tcpdump instance listening on > > the mirror port (allowing the user to specify additional arguments), and > > dump data to the screen (or otherwise). > > > > Signed-off-by: Aaron Conole <acon...@redhat.com> > > --- > > NEWS | 2 + > > utilities/automake.mk | 5 + > > utilities/ovs-tcpdump.8.in | 38 +++++ > > utilities/ovs-tcpdump.in | 398 > > +++++++++++++++++++++++++++++++++++++++++++++ > > 4 files changed, 443 insertions(+) > > create mode 100644 utilities/ovs-tcpdump.8.in > > create mode 100755 utilities/ovs-tcpdump.in > > > > diff --git a/NEWS b/NEWS > > index 4e81cad..a32350c 100644 > > --- a/NEWS > > +++ b/NEWS > > @@ -54,6 +54,8 @@ Post-v2.5.0 > > * Flow based tunnel match and action can be used for IPv6 address using > > tun_ipv6_src, tun_ipv6_dst fields. > > * Added support for IPv6 tunnels to native tunneling. > > + - A wrapper script, 'ovs-tcpdump', to easily port-mirror an OVS port > and > > + watch with tcpdump > > > > v2.5.0 - 26 Feb 2016 > > --------------------- > > diff --git a/utilities/automake.mk b/utilities/automake.mk > > index 1cc66b6..f236ec4 100644 > > --- a/utilities/automake.mk > > +++ b/utilities/automake.mk > > @@ -12,6 +12,7 @@ bin_SCRIPTS += \ > > utilities/ovs-l3ping \ > > utilities/ovs-parse-backtrace \ > > utilities/ovs-pcap \ > > + utilities/ovs-tcpdump \ > > utilities/ovs-tcpundump \ > > utilities/ovs-test \ > > utilities/ovs-vlan-test > > @@ -52,6 +53,7 @@ EXTRA_DIST += \ > > utilities/ovs-pipegen.py \ > > utilities/ovs-pki.in \ > > utilities/ovs-save \ > > + utilities/ovs-tcpdump.in \ > > utilities/ovs-tcpundump.in \ > > utilities/ovs-test.in \ > > utilities/ovs-vlan-test.in \ > > @@ -69,6 +71,7 @@ MAN_ROOTS += \ > > utilities/ovs-parse-backtrace.8 \ > > utilities/ovs-pcap.1.in \ > > utilities/ovs-pki.8.in \ > > + utilities/ovs-tcpdump.8.in \ > > utilities/ovs-tcpundump.1.in \ > > utilities/ovs-vlan-bug-workaround.8.in \ > > utilities/ovs-test.8.in \ > > @@ -94,6 +97,8 @@ DISTCLEANFILES += \ > > utilities/ovs-pki.8 \ > > utilities/ovs-sim \ > > utilities/ovs-sim.1 \ > > + utilities/ovs-tcpdump \ > > + utilities/ovs-tcpdump.8 \ > > utilities/ovs-tcpundump \ > > utilities/ovs-tcpundump.1 \ > > utilities/ovs-test \ > > > > > > Can you add the new utility to FLAKE8_PYFILES, as well? I expect that > will require some minor > > changes in the code, like making the print calls python 3 compatible. > > Done! I didn't get a complaint from a call to `make flake8-check`. > Should I expect it to be complaining? > There's a warning about the print() issue, but it comes from an optional flake8 plugin called "hacking". You could try installing it (pip install hacking). I'll add a note about that to the docs. -- Russell Bryant _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev