This isn't super-fancy, but it runs a simple protocol dissector and verifies the tshark output
matches what it expects. Things like Proto, ProtoField, Field, Tvb, TvbRange, etc., are used
in an example dissector script - it dissects DNS... partially. Enough to make sure things
aren't fundamentally broken. This provides something to add on top of later as well.
Change-Id: Icf3c8e9534944bcf4c4f6150f02a9a43f999cd75
Reviewed-on: https://code.wireshark.org/review/126
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
OK, in all fairness this does a bit more than just fix that bug. It also
adds a 'Int64()' and 'UInt64()' __call metamethods. I generally dislike
using __call metamethods, because they're often unintuitive (for example
the wireshark Field and FielInfo use this in a bizarre fashion). But this
happens to be a perfect use for it, and very natural, imho. Another change
is to make the metatables of classes visible to scripts. There was never
really a good reason not to make them visible, and they have to be visible
to do things like use __call on a plain table... not to mention I need them
to be visible to run test scripts verifying evrything is kosher.
I also updated the test suite to test for the div/mod by zero.
Change-Id: Ia4c594c8f59d4e799090716bd032ba2815df032f
Reviewed-on: https://code.wireshark.org/review/149
Reviewed-by: Evan Huus <eapache@gmail.com>
The libgcrypt library has several deprecated functions exported, that we don't use.
Unfortunately the GCC compiler warns about these deprecated functions regardless,
which is quite annoying. This commit makes clang/gcc ignore the deprecated attribute,
for gcrypt.h only. The danger with this is if gcrypt ever deprecates a function
we actually *use*, then we won't see the warning. So I'm not sure if it's a good or
bad idea to do this change, but it's really annoying to see the warnings and makes
finding real warnings difficult.
Change-Id: I03e80a6e7e4833ce0f709088c9ab4af98193db3d
Reviewed-on: https://code.wireshark.org/review/128
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Spawned from https://www.wireshark.org/lists/wireshark-dev/201402/msg00024.html
Add some ignore rules for files that can't/shouldn't include a license header.
Reorganize some ignore rules to group rules with similar motivations.
Add a header to autogen.sh and attribute it to just "The Wireshark Authors"
since while Gilbert wrote the original version it's gone through so many changes
over the years that sorting out proper authorship is unnecessarily complex.
Add headers to Graeme Hewson's two files as verified by private email, and
update his address in the AUTHORS file per his request.
Add header to one of Ulf Lamping's files, as verified by private email.
Only remaining problem is the reedsolomon code.
Change-Id: Ifb7de8c4b4d79012553e29d459a0145d39f51df5
Reviewed-on: https://code.wireshark.org/review/145
Reviewed-by: Evan Huus <eapache@gmail.com>
The fix for bug 9712, which involved changing the make-init-lua.pl perl script
to handle the new C-code define names for filetypes in release 1.11,
unfortunately also stopped matching against the timestamp define names.
Arguably the timestamp ones should never have been matched to begin with, at
least not by the same regex function, because they're not "filetypes". But
they've been matched and exported into the Lua table forever, so we'll break
backward-compat if we don't keep doing it. Ugh.
The good news is I caught this bug using a new test script I wrote which
verifies previous release's Lua stuff didn't disappear. I'll submit that
separately when I get a chance to clean it up, hopefully next week.
Change-Id: Ibf1d1da0dc4ed62cc1bacf345742dccf8ec40e30
Reviewed-on: https://code.wireshark.org/review/143
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Combine the check for whether the field is within the packet data and
the swapping of the field into macros that do both, and use them.
Change-Id: I1db4c5fd76172edd44abc9fb111d79a2537c6c9d
Reviewed-on: https://code.wireshark.org/review/130
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
A recent fix (made by me) for bug 9707, in Change-Id:
If4ee1906aa60dd37366cf2ef9bc4168e0ea024b6, made the perl regex grab too much
of the menu name. It changed MENU_STAT_CONVERSATION, MENU_STAT_RESPONSE, and
MENU_ANALYZE_CONVERSATION's key names into their longer C-code names. Ugh.
The fix for this is a bit brittle, but I think it's impractical to avoid it
being brittle, due to needing to support legacy Lua scripts. I put comments
in stat_menu.h to warn of the danger.
Change-Id: I41408e9d4f5b5bd73e2871fccabff81c7cbd242d
Reviewed-on: https://code.wireshark.org/review/140
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.
Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Similar to bug 9725 and ProtoField.new(), the way the VALUESTRING argument is being checked
in the code for ProtoField.bool() ends up making it non-optional. This patch fixes that,
along with some minor API documentation fixes (text).
Change-Id: Iadb9a8ace9c5514fc623d882301fe16b637fe4ce
Reviewed-on: https://code.wireshark.org/review/125
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
From Anders Broman: parse security mechanism as specified in RFC 3329
Change-Id: I37300aa45740a11679149550943b3a1614ac8423
Reviewed-on: https://code.wireshark.org/review/138
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Anders Broman <a.broman58@gmail.com>
To quote
62feb088a3:dist/changes-5.2.1
"****************************************************************************
* Platform Specific Changes
*
****************************************************************************
...
OS X
----
- [QTBUG-34411] Implemented QMainWindow::setUnifiedTitleAndToolBarOnMac."
Also get rid of a commented-out setting of QT_VERSION to 5.1.1 while
we're at it.
Change-Id: I957fdfecb70954723cfd3160f40758f722dc56c8
Reviewed-on: https://code.wireshark.org/review/136
Reviewed-by: Guy Harris <guy@alum.mit.edu>
For some routines that take multiple arguments that come from a struct
wtap_pkthdr, pass a pointer to the struct wtap_pkthdr in question,
rather than the separate arguments. Do this even if we're passing
expressions that were earlier assigned to the struct wtap_pkthdr fields
in question. This simplifies the calling sequences and ensures that the
right values are picked up by the called routine; in at least one case
we were *not* passing the right values (the code to handle Simple Packet
Blocks in pcap-ng files).
Also, call the byte-swapping routines for pseudo-header fields only if
we need to do byte-swapping.
Change-Id: I3a8badfcfeb0237dfc1d1014185a67f18c0f2ebe
Reviewed-on: https://code.wireshark.org/review/119
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
make-version.pl wasn't using the right source dir for git commands when not compiling from inside source tree.
add --git-dir=$srcdir/.git parameter.
Change-Id: I45ca4874d96abaed1c559c022d0ace66239652c8
Reviewed-on: https://code.wireshark.org/review/122
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
- packet-bencode.c had the wrong FSF address
- wslua_int64.c had the license as a footer instead of a header
Change-Id: I71204b36a1034af72874d6fe87929c31c9ff03df
Reviewed-on: https://code.wireshark.org/review/123
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
There is no public spec, based only on analyze of packet
It is more easy to found the address IP of Intant AP
Change-Id: I3baf205c5e4ad699b954f4a9fbf4b9e65f82cb36
Reviewed-on: https://code.wireshark.org/review/121
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Using ProtoField.new() is dicey. Many of the optional arguments don't properly check the lua stack - they call lua_isnil() for their index number, instead of lua_gettop() to see the stack size. lua_isnil() may return false in such cases.
Change-Id: I83ca1e5fc34e71ec35899adbedabcee69571b9fe
Reviewed-on: https://code.wireshark.org/review/118
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
The fix in commit 28e028ddd5 missed the module
name, which was only grabbing alphabetic characters not numbers. This fixes
that oversight.
Change-Id: I65a87279024a81b33a8deb83b7a3573ea6eaf139
Reviewed-on: https://code.wireshark.org/review/117
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
In Lua 5.2 the bitop library is missing - it's not getting loaded into
the lua global table as "bit", or anything else for that matter. Lua
5.2 has its own bit-operations library ("bit32") which is there, but
that one's not as good as bitop and would break back/forward
compatibility for lua scripts anyway.
Change-Id: I94b7d45bbeb2f637d1c76b0b5c9d8472eebfcaea
Reviewed-on: https://code.wireshark.org/review/100
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Specification: "If the TxAdd or RxAdd fields are not
defined as used in a given PDU then they shall be considered
Reserved for Future Use."
Change-Id: I767c0df0366afe789624046cda2d49c9875ffe60
Reviewed-on: https://code.wireshark.org/review/103
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Linux USB Header should be in Host Endian.
Also add ENC_HOST_ENDIAN to simplify code.
Change-Id: I95e7d97014633e8fc1d7739d0728780d70c60442
Reviewed-on: https://code.wireshark.org/review/15
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
usefulness, working around bug #9162 until Lua 5.3 is released.
The existing Int64 and UInt64 classes provide virtually no
usefullness, other than for creating a string of their value. While
one could then write Lua code to convert the string to Lua numbers and
such, ultimately Lua has no native 64-bit integer support, making such
a task difficult to handle in Lua. This change adds a host of
functions and operators to the existing Int64 (gint64) and UInt64
(guint64) classes, to enable true 64-bit integer support on par with
native Lua numbers.
A test script is also provided, which tests the functions/operators.
Change-Id: I4c5f8f5219b9a88198902283bd32ddf24c346bbe
Reviewed-on: https://code.wireshark.org/review/83
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
/bin/sh in Solaris 10, for example, doesn't understand "${OS#Windows}",
so using /bin/sh broke the Solaris build on the buildbot. Use a case
statement instead.
Change-Id: Icdec74599c339e19ef6ffc7728f4ae2d5cf98999
Reviewed-on: https://code.wireshark.org/review/96
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Guy Harris <guy@alum.mit.edu>
If the string doesn't end with a null-terminator in the given length it causes a
read-overflow. Should fix bug #9717.
Change-Id: I44647ef8ecb856e07d1175777ed603736ec63553
Reviewed-on: https://code.wireshark.org/review/90
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Apparently very recent gcc versions *do* complain about the cast from gint to
enum, despite the comment to the contrary.
Change-Id: I422df9950f1c7c46ca8ea37a0e3abd7aa8fc1c7d
Reviewed-on: https://code.wireshark.org/review/89
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>