From 5dfd0adb1ff1dd1e751b828598c4eb06b9f3d70d Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Sun, 6 Oct 2013 19:05:31 +0000 Subject: Add license text to dftestlib files, and point to the capture files that someone renamed from *.cap to *.pcap. svn path=/trunk/; revision=52414 --- tools/dftestlib/__init__.py | 18 ++++++++++++++++++ tools/dftestlib/bytes_ether.py | 18 +++++++++++++++++- tools/dftestlib/bytes_ipv6.py | 18 +++++++++++++++++- tools/dftestlib/bytes_type.py | 19 ++++++++++++++++++- tools/dftestlib/dftest.py | 17 +++++++++++++++++ tools/dftestlib/double.py | 19 ++++++++++++++++++- tools/dftestlib/integer.py | 19 ++++++++++++++++++- tools/dftestlib/integer_1byte.py | 19 ++++++++++++++++++- tools/dftestlib/ipv4.py | 19 ++++++++++++++++++- tools/dftestlib/range_method.py | 19 ++++++++++++++++++- tools/dftestlib/scanner.py | 19 ++++++++++++++++++- tools/dftestlib/string_type.py | 19 ++++++++++++++++++- tools/dftestlib/stringz.py | 19 ++++++++++++++++++- tools/dftestlib/time_relative.py | 19 ++++++++++++++++++- tools/dftestlib/time_type.py | 19 ++++++++++++++++++- tools/dftestlib/tvb.py | 19 ++++++++++++++++++- tools/dftestlib/uint64.py | 19 ++++++++++++++++++- tools/dftestlib/util.py | 17 +++++++++++++++++ 18 files changed, 320 insertions(+), 15 deletions(-) diff --git a/tools/dftestlib/__init__.py b/tools/dftestlib/__init__.py index e69de29bb2..b683f7ca23 100644 --- a/tools/dftestlib/__init__.py +++ b/tools/dftestlib/__init__.py @@ -0,0 +1,18 @@ +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# Copyright (C) 2013 by Gilbert Ramirez +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/tools/dftestlib/bytes_ether.py b/tools/dftestlib/bytes_ether.py index 849e6ac209..f7476bcea2 100644 --- a/tools/dftestlib/bytes_ether.py +++ b/tools/dftestlib/bytes_ether.py @@ -1,9 +1,25 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from dftestlib import dftest class testBytesEther(dftest.DFTest): - trace_file = "ipx_rip.cap" + trace_file = "ipx_rip.pcap" ### Note: Bytes test does not yet test FT_INT64. diff --git a/tools/dftestlib/bytes_ipv6.py b/tools/dftestlib/bytes_ipv6.py index 4736051b9e..ca7eda3d0d 100644 --- a/tools/dftestlib/bytes_ipv6.py +++ b/tools/dftestlib/bytes_ipv6.py @@ -1,9 +1,25 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from dftestlib import dftest class testBytesIPv6(dftest.DFTest): - trace_file = "ipv6.cap" + trace_file = "ipv6.pcap" def test_ipv6_1(self): dfilter = "ipv6.dst == ff05::9999" diff --git a/tools/dftestlib/bytes_type.py b/tools/dftestlib/bytes_type.py index e17c9a14f0..03f8f9195e 100644 --- a/tools/dftestlib/bytes_type.py +++ b/tools/dftestlib/bytes_type.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testBytes(dftest.DFTest): - trace_file = "arp.cap" + trace_file = "arp.pcap" def test_bytes_1(self): dfilter = "arp.dst.hw == 00:64" diff --git a/tools/dftestlib/dftest.py b/tools/dftestlib/dftest.py index 2fa44eec8c..efddc24a53 100644 --- a/tools/dftestlib/dftest.py +++ b/tools/dftestlib/dftest.py @@ -1,4 +1,21 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + import os import tempfile diff --git a/tools/dftestlib/double.py b/tools/dftestlib/double.py index 9b84a25c79..362c49f72c 100644 --- a/tools/dftestlib/double.py +++ b/tools/dftestlib/double.py @@ -1,10 +1,27 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testDouble(dftest.DFTest): - trace_file = "ntp.cap" + trace_file = "ntp.pcap" def test_eq_1(self): dfilter = "ntp.rootdelay == 0.0626983642578125" diff --git a/tools/dftestlib/integer.py b/tools/dftestlib/integer.py index 327b68daa1..57e20f52be 100644 --- a/tools/dftestlib/integer.py +++ b/tools/dftestlib/integer.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testInteger(dftest.DFTest): - trace_file = "ntp.cap" + trace_file = "ntp.pcap" def test_eq_1(self): dfilter = "ip.version == 4" diff --git a/tools/dftestlib/integer_1byte.py b/tools/dftestlib/integer_1byte.py index 4c869a37af..1956555055 100644 --- a/tools/dftestlib/integer_1byte.py +++ b/tools/dftestlib/integer_1byte.py @@ -1,10 +1,27 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testInteger1Byte(dftest.DFTest): - trace_file = "ipx_rip.cap" + trace_file = "ipx_rip.pcap" def test_ipx_1(self): dfilter = "ipx.src.net == 0x28" diff --git a/tools/dftestlib/ipv4.py b/tools/dftestlib/ipv4.py index dc028a1897..45da634336 100644 --- a/tools/dftestlib/ipv4.py +++ b/tools/dftestlib/ipv4.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testIPv4(dftest.DFTest): - trace_file = "nfs.cap" + trace_file = "nfs.pcap" def test_uint64_1(self): dfilter = "nfs.fattr3.size == 264032" diff --git a/tools/dftestlib/range_method.py b/tools/dftestlib/range_method.py index 06be80b576..529c72eb73 100644 --- a/tools/dftestlib/range_method.py +++ b/tools/dftestlib/range_method.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testRange(dftest.DFTest): - trace_file = "ipx_rip.cap" + trace_file = "ipx_rip.pcap" def test_slice_1_pos(self): dfilter = "ipx.src.node[1] == aa" diff --git a/tools/dftestlib/scanner.py b/tools/dftestlib/scanner.py index bca1f1924e..e2d155142c 100644 --- a/tools/dftestlib/scanner.py +++ b/tools/dftestlib/scanner.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testScanner(dftest.DFTest): - trace_file = "http.cap" + trace_file = "http.pcap" def test_dquote_1(self): dfilter = 'http.request.method == "HEAD"' diff --git a/tools/dftestlib/string_type.py b/tools/dftestlib/string_type.py index fcc6e76f9e..011dfa5357 100644 --- a/tools/dftestlib/string_type.py +++ b/tools/dftestlib/string_type.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testString(dftest.DFTest): - trace_file = "http.cap" + trace_file = "http.pcap" def test_eq_1(self): dfilter = 'http.request.method == "HEAD"' diff --git a/tools/dftestlib/stringz.py b/tools/dftestlib/stringz.py index c3e85ea52a..fe1220b6ea 100644 --- a/tools/dftestlib/stringz.py +++ b/tools/dftestlib/stringz.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testStringz(dftest.DFTest): - trace_file = "tftp.cap" + trace_file = "tftp.pcap" def test_stringz_1(self): dfilter = 'tftp.type == octet' diff --git a/tools/dftestlib/time_relative.py b/tools/dftestlib/time_relative.py index 68abae511d..d62d315a10 100644 --- a/tools/dftestlib/time_relative.py +++ b/tools/dftestlib/time_relative.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testTimeRelative(dftest.DFTest): - trace_file = "nfs.cap" + trace_file = "nfs.pcap" def test_relative_time_1(self): dfilter = "frame.time_delta == 0.7" diff --git a/tools/dftestlib/time_type.py b/tools/dftestlib/time_type.py index 41982cb126..d1529b26ed 100644 --- a/tools/dftestlib/time_type.py +++ b/tools/dftestlib/time_type.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testTime(dftest.DFTest): - trace_file = "http.cap" + trace_file = "http.pcap" def test_eq_1(self): dfilter = 'frame.time == "Dec 31, 2002 07:55:31.3"' diff --git a/tools/dftestlib/tvb.py b/tools/dftestlib/tvb.py index 872f56e9c4..04b47c98c1 100644 --- a/tools/dftestlib/tvb.py +++ b/tools/dftestlib/tvb.py @@ -1,10 +1,27 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + import unittest from dftestlib import dftest class testTVB(dftest.DFTest): - trace_file = "http.cap" + trace_file = "http.pcap" def test_eq_1(self): # We expect 0 because even though this byte diff --git a/tools/dftestlib/uint64.py b/tools/dftestlib/uint64.py index c6cf82b040..32528d6c58 100644 --- a/tools/dftestlib/uint64.py +++ b/tools/dftestlib/uint64.py @@ -1,9 +1,26 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from dftestlib import dftest class testUINT64(dftest.DFTest): - trace_file = "nfs.cap" + trace_file = "nfs.pcap" def test_uint64_1(self): dfilter = "nfs.fattr3.size == 264032" diff --git a/tools/dftestlib/util.py b/tools/dftestlib/util.py index 7c66385907..20731a588b 100644 --- a/tools/dftestlib/util.py +++ b/tools/dftestlib/util.py @@ -1,4 +1,21 @@ # Copyright (c) 2013 by Gilbert Ramirez +# +# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + import subprocess -- cgit v1.2.3