Age | Commit message (Collapse) | Author | Files | Lines |
|
lseek returns an off_t type which is system-dependent. Use ws_lseek64 in
favor of lseek as that supports 64-bit quanities.
Use ws_fstat64 instead of stat to support 64-bit file sizes on Windows.
For the majority of the changes, this makes no difference as they do not
apply to Windows ("ifndef _WIN32"; availability of st_blksize).
There are no other users of "struct stat" besides the portability code
in wsutil. Forbid the use of fstat and lseek in checkAPIs.
Change-Id: I17b930ab9543f21a9d3100f3795d250c9b9ae459
Reviewed-on: https://code.wireshark.org/review/3198
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I649c69cbf545a8de32d9142c1156db6adb076b63
Reviewed-on: https://code.wireshark.org/review/3078
Reviewed-by: Evan Huus <eapache@gmail.com>
|
|
Change-Id: I787ae2651a8083bc3082e5cb85dbd849823a16ca
Reviewed-on: https://code.wireshark.org/review/2638
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
|
|
Change-Id: Icd817a950331a2e7416a28c3d4a5a004d297e6f9
Reviewed-on: https://code.wireshark.org/review/1845
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
|
|
or RVALS().
Change-Id: I85021b1cba151c16bf0a2d30169cf3dec77780f5
Reviewed-on: https://code.wireshark.org/review/1540
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.
Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
This should significantly reduce memory usage, without increasing the
CPU time required to process a capture file in TShark or Wireshark.
As a result, se_address_to_str() is no longer used; eliminate it.
Fixes bug #9949.
Change-Id: I65a112a426c82cc73a957b81384c765c3d14f2c3
Reviewed-on: https://code.wireshark.org/review/1213
Reviewed-by: Evan Huus <eapache@gmail.com>
|
|
This commit adds tvb_get_string_time and proto_tree_add_time_item routines for
getting nstime fields from the tvb when they are encoded in ASCII string form.
The proto_tree_add_time_item routine is also usable for normal
big/little-endian encoded time_t, and has the advantage of retrieving
the value even if there's no proto tree.
It also exposes the routines to Lua, both so that a Lua script can take
advantage of this, but also so I can write a testsuite to test the functions.
Change-Id: I955da10f68f2680e3da3a5be5ad8fdce7ed6808c
Reviewed-on: https://code.wireshark.org/review/1084
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
the dissectors'
I recently made a change to packet-rtp.c and inappropriately included
g_error() in it, which the builbots caught during their run of checkAPIs.pl.
But checkAPIs.pl is supposed to catch such things for us before we submit, by
being invoked in the git pre-commit hook.
Apparently though, buildbots call checkAPIs.pl with extra arguments for
different cases... and for packet dissectors it calls it with a '-g abort'
argument, which is how it caught the g_error.
So the "bug" is that the pre-commit hook should invoke checAPIs.pl with that
argument too, for epan/dissectors/packet-*.c files.
Change-Id: Ie8f9dcc55f2248918208dea85a04f67e6bf9829a
Reviewed-on: https://code.wireshark.org/review/953
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
|
|
Change-Id: I7061ad312df5079924c927ca95a8fa111c756012
Reviewed-on: https://code.wireshark.org/review/498
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
|
|
In epan/proto.c in function proto_tree_add_split_bits_crumb, the
proto_tree_add_text function is called with one of its arguments
using ENC_BIG_ENDIAN, but it's not an argument for proto_tree_add_text
itself but instead a function being called inside it. checkAPIs.pl
tries to avoid this in check_proto_tree_add_XXX_encoding, by removing
parenthesis arguments, but in this acse there are newlines between
the arguments, causing the regex to not catch them. This commit
fixes the regex.
Change-Id: I70ef79d5436ba2ec04ffdc3d9939c7aa2cdf6a1f
Reviewed-on: https://code.wireshark.org/review/902
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Some strings contain semicolons, which meant g36db2df was terminating
our REs too early. Try terminating them with '}' followed by ';'.
Change-Id: I97f63351ef35c91e3123d9abd47576d47fea4b2b
Reviewed-on: https://code.wireshark.org/review/638
Reviewed-by: Gerald Combs <gerald@wireshark.org>
|
|
Update checkAPIs.pl to look for newlines in value_strings and
enum_val_t's. We now have to perform the check before we strip quoted
strings. Hopefully that won't cause a problem. Rename the check since
we do more than check for NULL termination.
Add modelines.
Fixes bug 9878.
Change-Id: I39dd910db60c7028ea4bdb58e8cfdb239c094748
Reviewed-on: https://code.wireshark.org/review/628
Reviewed-by: Gerald Combs <gerald@wireshark.org>
|
|
Do with tvb_get_stringz() what was done with tvb_get_string().
Redo the comments for the string get routines to try to give more detail
in a fashion that's a bit less hard to read.
Warn, in comments, of the problems with using
tvb_get_string()/tvb_get_stringz() (i.e., if your strings are non-ASCII,
all bytes with the 8th bit set are going be replaced by the Unicode
REPLACEMENT CHARACTER, and displayed as such).
Warn, in a comment, of the problems with tvb_get_const_stringz() (i.e.,
it gives you raw bytes, rather than guaranteed-to-be-valid UTF-8).
Update documentation and release notes appropriately.
Change-Id: Ibd3efb92a203861f507ce71bc8d04d19d9d38a93
Reviewed-on: https://code.wireshark.org/review/327
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
- rename tvb_length and similar to tvb_captured_length and similar; leave
#defines in place for backwards-compat, but mark them clearly as deprecated in
code comments and in checkAPI
- remove tvb_get_string as C code and just leave a #define in place for
backwards-compat; mark it clearly as deprecated in code comment and checkAPI
- update READMEs and sample dissector for all of the above
- while in the neighbourhood, make checkAPI skip (and warn) for missing files
instead of bailing on the whole check, so subsequent files still get checked
Change-Id: I32fc437896ca86ca73e9b49d5f50400adf8ec5ad
Reviewed-on: https://code.wireshark.org/review/311
Reviewed-by: Evan Huus <eapache@gmail.com>
|
|
$Id$ is pretty useless in git so don't enforce it in our source code.
Change-Id: Ie8b1b9627aabbca72c9c1dd93a9a76901e6967eb
Reviewed-on: https://code.wireshark.org/review/203
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
sure they get counted in the proto_tree_add_text percentage.
Makes a few dissectors look a little better.
svn path=/trunk/; revision=54236
|
|
except it takes a wmem scope instead. Add the two emem equivalents to checkAPI
as (weakly) deprecated.
svn path=/trunk/; revision=53528
|
|
Disabled by default, but used when I want to go on an add filterability spree. convert_proto_tree_add_text.pl makes these easier to fix, so why not be pickier about the percentages that dissectors use.
svn path=/trunk/; revision=52392
|
|
a file. Warn about the "wrong" filetype and continue
svn path=/trunk/; revision=52105
|
|
(like a #define) at the beginning of a line before a value_string no longer
matches so a #define that includes the beginning of a value_string doesn't
confuse the script.
svn path=/trunk/; revision=52089
|
|
List options one by one
svn path=/trunk/; revision=52068
|
|
svn path=/trunk/; revision=52061
|
|
svn path=/trunk/; revision=52016
|
|
svn path=/trunk/; revision=52015
|
|
Add --check-addtext/--nocheck-addtext, --check-hf/--nocheck-hf and --debug to the usage output and format the usage output a little better.
svn path=/trunk/; revision=52006
|
|
svn path=/trunk/; revision=51782
|
|
proto_tree_add_text()s. I believe the intent was to ignore "small" dissectors that didn't have enough fields to qualify, but the previous logic ignored dissectors that were (almost) all proto_tree_add_text and no proto_tree_add_xxx.
I'm flexible on the definition of "small" (20 "fields"), but I think checkAPIs should flag the "all proto_tree_add_text" dissectors.
svn path=/trunk/; revision=50385
|
|
svn path=/trunk/; revision=48340
|
|
- Remove comments from the input string before checking hf[] entries;
- Remove code under '#if 0' before doing API checks.
svn path=/trunk/; revision=47447
|
|
proto_tree_add_item().
svn path=/trunk/; revision=46598
|
|
uncomment the code) check for being called with tvb_get_ptr().
svn path=/trunk/; revision=46326
|
|
Also check that they are all const.
svn path=/trunk/; revision=46294
|
|
for deprecated dissector add/remmove/... functions.
svn path=/trunk/; revision=45000
|
|
Also: improve error message slightly in the case of a missing NULL termination.
svn path=/trunk/; revision=44826
|
|
Also, remove some tabs.
svn path=/trunk/; revision=44824
|
|
svn path=/trunk/; revision=43939
|
|
return it, and use the return value.
svn path=/trunk/; revision=43818
|
|
calls an error.
Fix one case where we weren't counting an error (unregistered ett
variables).
svn path=/trunk/; revision=43817
|
|
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7429#c4 :
Add checks for calls to proto_tree_add_XXX (where XXX != item and a few other
functions) with an encoding (ENC_*) argument.
Also add a comment to checkAddTextCalls() about why 3 loops are used.
svn path=/trunk/; revision=43563
|
|
svn path=/trunk/; revision=43538
|
|
Replace tabs with spaces (for consistency).
svn path=/trunk/; revision=43213
|
|
svn path=/trunk/; revision=43040
|
|
that has the string "strlen" somewhere after a call to snprintf()).
svn path=/trunk/; revision=42950
|
|
there's a good chance we're doing something wrong.
svn path=/trunk/; revision=42947
|
|
Also: identify problematic fields by hf_variable_name instead of name or
abbreviation (the variable name is sure to be unique).
svn path=/trunk/; revision=42826
|
|
from makefiles (and thus from the buildbot).
The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.
As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.
svn path=/trunk/; revision=41943
|
|
and with BASE_... in the 'display' field.
svn path=/trunk/; revision=41399
|
|
(Commented out until all the incorrect usages in Wireshark have been fixed).
svn path=/trunk/; revision=41380
|
|
Prohibit using FT_BOOLEANS with value_strings.
svn path=/trunk/; revision=41364
|