Commit Graph

46971 Commits

Author SHA1 Message Date
Martin Mathieson 868f74d628 Also signal value of PDCP SN (only used if enabled by RLC preferences).
svn path=/trunk/; revision=50019
2013-06-18 21:44:48 +00:00
Evan Huus 8ec8f94db7 Resurrect wmem_memdup in its own misc. utilities group. Emem provides it, so we
need to provide an analogue at least for now.

svn path=/trunk/; revision=50018
2013-06-18 21:42:54 +00:00
Evan Huus d487bba75f Add wmem_alloc_array, wmem_strsplit, wmem_strconcat.
svn path=/trunk/; revision=50017
2013-06-18 21:25:37 +00:00
Martin Mathieson ece132a5ce Configure MAC LCID -> RLC channel settings from RRC.
svn path=/trunk/; revision=50016
2013-06-18 21:02:00 +00:00
Jakub Zawadzki f60dd85784 Pass hfinfo and not hfindex to internal proto functions.
svn path=/trunk/; revision=50015
2013-06-18 20:52:31 +00:00
Michael Mann a7043bf787 Update "TTL low or unexpected" coloring rule to ignore vrrp, carp and MulticastDNS all of which intentionally use TTL 255. Bug 5010 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5010)
Add carp to routing protocols while we're at it.

svn path=/trunk/; revision=50014
2013-06-18 20:48:42 +00:00
Evan Huus da6d99e2c9 Refactor insert32 to use lookup_or_insert32 with the right flags.
svn path=/trunk/; revision=50013
2013-06-18 19:55:29 +00:00
Evan Huus 4313d778f0 Refactor lookup_or_insert32 to remove a bunch of continue and break statements
as well as a confusing while(TRUE).

svn path=/trunk/; revision=50012
2013-06-18 19:43:18 +00:00
Evan Huus 8610601f60 Simplify node structure. Use a boolean for whether or not it's a subtree, and an
enum for the color (red/black). Don't use bitfields since they don't save us
much (if anything) in terms of space and don't nest the fields in their own
anonymous struct.

svn path=/trunk/; revision=50011
2013-06-18 19:32:40 +00:00
Evan Huus 02752f3161 Factor function for node creation out and use it in several places.
svn path=/trunk/; revision=50010
2013-06-18 19:19:21 +00:00
Evan Huus 881845a555 Scrap wmem_memdup, it's not actually as useful as I thought it would be.
svn path=/trunk/; revision=50009
2013-06-18 19:01:01 +00:00
Evan Huus 115eb9c727 Factor common code for red-black tree array lookups into a helper function and
use it for both direct lookups and less-than-or-equal-to lookups.

svn path=/trunk/; revision=50008
2013-06-18 18:57:28 +00:00
Evan Huus 7fd970ac45 Remove wmem_tree_create_subtree, it does nothing we can't do with
wmem_tree_new.

svn path=/trunk/; revision=50007
2013-06-18 17:48:04 +00:00
Evan Huus d0c1d89cd6 Factor string-packing code into a common function to use in both insert_string
and lookup_string.

svn path=/trunk/; revision=50006
2013-06-18 17:39:15 +00:00
Jörg Mayer 99e1ad5443 Fix compile error:
[ 79%] Building C object CMakeFiles/text2pcap.dir/text2pcap.c.o
In file included from /usr/include/glib-2.0/glib/galloca.h:34:0,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /home/jmayer/work/wireshark/svn/trunk/wsutil/file_util.h:34,
                 from /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:116:
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c: In function ‘write_current_packet’:
/usr/include/glib-2.0/glib/gtypes.h:186:22: error: declaration of ‘__v’ shadows a previous local [-Werror=shadow]
  ({ register guint16 __v, __x = ((guint16) (val)); \
                      ^
/usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
 #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                      ^
/usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                             ^
/usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
 #define g_htons(val) (GUINT16_TO_BE (val))
                       ^
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
             pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                   ^
/usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
 #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                      ^
/usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                             ^
/usr/include/glib-2.0/glib/gtypes.h:327:31: note: in expansion of macro ‘GUINT16_TO_BE’
 #define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
                               ^
/usr/include/glib-2.0/glib/gtypes.h:357:23: note: in expansion of macro ‘GUINT16_FROM_BE’
 #define g_ntohs(val) (GUINT16_FROM_BE (val))
                       ^
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:52: note: in expansion of macro ‘g_ntohs’
             pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                                    ^
/usr/include/glib-2.0/glib/gtypes.h:186:22: error: shadowed declaration is here [-Werror=shadow]
  ({ register guint16 __v, __x = ((guint16) (val)); \
                      ^
/usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
 #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                      ^
/usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                             ^
/usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
 #define g_htons(val) (GUINT16_TO_BE (val))
                       ^
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
             pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                   ^
/usr/include/glib-2.0/glib/gtypes.h:186:27: error: declaration of ‘__x’ shadows a previous local [-Werror=shadow]
  ({ register guint16 __v, __x = ((guint16) (val)); \
                           ^
/usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
 #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                      ^
/usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                             ^
/usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
 #define g_htons(val) (GUINT16_TO_BE (val))
                       ^
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
             pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                   ^
/usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
 #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                      ^
/usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                             ^
/usr/include/glib-2.0/glib/gtypes.h:327:31: note: in expansion of macro ‘GUINT16_TO_BE’
 #define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
                               ^
/usr/include/glib-2.0/glib/gtypes.h:357:23: note: in expansion of macro ‘GUINT16_FROM_BE’
 #define g_ntohs(val) (GUINT16_FROM_BE (val))
                       ^
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:52: note: in expansion of macro ‘g_ntohs’
             pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                                    ^
/usr/include/glib-2.0/glib/gtypes.h:186:27: error: shadowed declaration is here [-Werror=shadow]
  ({ register guint16 __v, __x = ((guint16) (val)); \
                           ^
/usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
 #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                      ^
/usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                             ^
/usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
 #define g_htons(val) (GUINT16_TO_BE (val))
                       ^
/home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
             pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                   ^
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/text2pcap.dir/text2pcap.c.o] Error 1


Feel free to choose a less offensive variable name

svn path=/trunk/; revision=50005
2013-06-18 12:22:40 +00:00
Evan Huus 701fb00afa Add test block for wmem_tree_lookup32_array_le(), fix other tests where certain
random seeds would cause collisions and false failures.

svn path=/trunk/; revision=50004
2013-06-18 06:22:47 +00:00
Evan Huus 54959c293d Wmem tree tests with non-trivial keys.
svn path=/trunk/; revision=50003
2013-06-18 05:41:16 +00:00
Evan Huus 7c99d55773 Re-port a bunch of the red-black tree code from wmem with fewer modifications,
and enable the tests.

Lesson: make it work, *then* refactor it into sanity.

svn path=/trunk/; revision=50002
2013-06-18 05:31:12 +00:00
Pascal Quantin 458dcb7ea2 Add ability to export decrypted SSL/DTLS PDUs
svn path=/trunk/; revision=50001
2013-06-18 01:13:07 +00:00
Jeff Morriss 3d1115c2bd From Anders:
Use integers intead of strings for hf_sync_timestamp
And hf_sync_packet_nr.
Ad ref. to specification.

svn path=/trunk/; revision=50000
2013-06-18 01:08:17 +00:00
Evan Huus 3f1f630570 Don't limit the on-the-wire length of packets to 64KB, there are larger packets
out there (especially over USB) and we should be able to load them as long as
they are snapped to a sane length.

Also validate that packets do not specify a snapshot length larger than the one
in the file header, though only make it a warning, as this is not necessarily a
fatally corrupt packet.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8808

svn path=/trunk/; revision=49999
2013-06-18 01:02:26 +00:00
Evan Huus b5c538ff81 Add tests for red-black tree array keys, if0-ed out until I can make them not
blow up. Not sure if the tests are wrong or if I broke something during the port
from wmem...

svn path=/trunk/; revision=49998
2013-06-18 00:21:32 +00:00
Luis Ontanon 2e45b0203a Yet another iteration
svn path=/trunk/; revision=49997
2013-06-17 23:45:42 +00:00
Guy Harris d7380efa6d Put the code to fill in the struct wtap_pkthdr and to read the packet
data into a common routine, and use it in both the read and seek-read
routines.

svn path=/trunk/; revision=49996
2013-06-17 23:43:55 +00:00
Gerald Combs aaa3e82bff From Dirk Jagdmann via bug 7525: macosx-setup.sh improvements.
svn path=/trunk/; revision=49995
2013-06-17 23:30:56 +00:00
Alexis La Goutte b381ca4f58 Fix qt make buildbot step
Qt make don't like cp ../../lib/lib{wireshark,wiretap,wsutil}.* .
cp: cannot stat `../../lib/lib{wireshark,wiretap,wsutil}.*': No such file or directory

svn path=/trunk/; revision=49994
2013-06-17 22:56:35 +00:00
Evan Huus 5c027c2590 Extract some common code for array lookups, and replace some DISSECTOR
assertions with regular glib assertions - there's no guarantee that wmem code
will always be run from within a dissector.

svn path=/trunk/; revision=49993
2013-06-17 22:51:50 +00:00
Evan Huus eba26b89a4 From Niels de Vos via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8810
Use value_string array names_nfs4_operation_ext for nfs.main_opname, just like
nfs.opname does.

svn path=/trunk/; revision=49992
2013-06-17 22:41:43 +00:00
Evan Huus 3398ae2aea Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8809
The LLRP Standard 1.0.1 defines the ProtocolID Parameter as 8 bit value (see
LLRP Standard 1.0.1 document, page 138, AccessSpecParameter) but Wireshark
treats it as 16 bit value and therefore doesn't recognize the
EPCGlobalClass1Gen2 protocol type and marks the whole packet afterwards as
invalid.

svn path=/trunk/; revision=49991
2013-06-17 22:22:17 +00:00
Guy Harris 9fb168b2cc Merge more of the read and seek-read code paths.
svn path=/trunk/; revision=49990
2013-06-17 22:18:24 +00:00
Pascal Quantin 24623bdff3 More PDU export work:
- add automatic export of port type when exporting a source / destination port
- add export of SCTP PPID (usefulness to be checked)
- fix some field size

svn path=/trunk/; revision=49989
2013-06-17 21:54:21 +00:00
Guy Harris 32b95570df Merge "read record header" and "read packet data" routines into a single
routine, used both by read and seek-read routines.

svn path=/trunk/; revision=49988
2013-06-17 21:18:47 +00:00
Pascal Quantin 20de5f1a9a Fix 7bit ASCII / IA5 SMS dissection broken in r49910
svn path=/trunk/; revision=49986
2013-06-17 19:52:01 +00:00
Evan Huus 3098636502 Ensure that the length parameter to dissect_per_length_determinant is
initialized even in cases where we error or otherwise fail to dissect.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8722

Thanks to Pascal for his help digging through this one.

svn path=/trunk/; revision=49985
2013-06-17 19:25:45 +00:00
Pascal Quantin eecfb7c423 Apply r49983 to other dissectors
svn path=/trunk/; revision=49984
2013-06-17 18:44:19 +00:00
Chris Maynard d3c38473b9 tvb_length_remaining() can return -1 so don't cast its return value to an unsigned type when performing integer comparisons. Instead, cast strlen()'s return value to a signed type and perform the comparison that way.
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=49983
2013-06-17 15:39:56 +00:00
Evan Huus b777bc825e Misc tweaks to packet-http-urlencoded.c
- add modelines
- convert emem to wmem
- add cast to satisfy my version of GCC

svn path=/trunk/; revision=49982
2013-06-17 14:18:23 +00:00
Luis Ontanon 68a8a3ced5 the Licence
svn path=/trunk/; revision=49981
2013-06-17 09:17:48 +00:00
Luis Ontanon b149fe141e Checking in as it compiles...
svn path=/trunk/; revision=49980
2013-06-17 09:11:30 +00:00
Michael Tüxen 42e31acad2 Fix typo.
svn path=/trunk/; revision=49979
2013-06-17 08:08:14 +00:00
Jakub Zawadzki f2f2f13db3 Fix for previous commit, don't use string if get_form_key_value() failed.
svn path=/trunk/; revision=49978
2013-06-17 07:41:48 +00:00
Jakub Zawadzki 6dd022f14f Add small dissector for application/x-www-form-urlencoded
svn path=/trunk/; revision=49977
2013-06-17 07:35:30 +00:00
Stig Bjørlykke 114657b0cb Added a missing CFRelease.
svn path=/trunk/; revision=49976
2013-06-17 07:20:54 +00:00
Stig Bjørlykke 632082e57d Added a missing CFRelease.
svn path=/trunk/; revision=49975
2013-06-17 07:20:23 +00:00
Pascal Quantin 17fa61c36e Use a more compact display for the status bitmap
svn path=/trunk/; revision=49974
2013-06-17 04:26:16 +00:00
Pascal Quantin 503f7daaa9 Remove preceding zeroes
svn path=/trunk/; revision=49973
2013-06-17 04:22:45 +00:00
Martin Kaiser cee4e923ae the dos2unix cygwin package is required for compiling on windows
svn path=/trunk/; revision=49972
2013-06-17 00:57:16 +00:00
Evan Huus 858cb85eb4 Fix the test to respect the new behaviour.
svn path=/trunk/; revision=49971
2013-06-17 00:45:44 +00:00
Evan Huus fd22c548f5 Much smarter handling of autoreset trees.
svn path=/trunk/; revision=49970
2013-06-17 00:08:44 +00:00
Evan Huus 55264582be More callback tweaks, to permit unregistering a callback from the same place
it was originally registered.

svn path=/trunk/; revision=49969
2013-06-16 22:37:55 +00:00