Add license text to dftestlib files, and point to the
capture files that someone renamed from *.cap to *.pcap. svn path=/trunk/; revision=52414
This commit is contained in:
parent
004c706715
commit
5dfd0adb1f
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# $Id: dfilter-test.py 52136 2013-09-18 05:07:46Z gram $
|
||||
#
|
||||
# Copyright (C) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# 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.
|
|
@ -1,9 +1,25 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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.
|
||||
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"'
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"'
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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'
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"'
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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"
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
# Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
#
|
||||
# $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
|
||||
|
||||
|
|
Loading…
Reference in New Issue