Commit Graph

212 Commits

Author SHA1 Message Date
Pascal Quantin eff5e0b286 PDCP LTE: upgrade dissector to v13.1.0
Change-Id: I4a778b816a7675ef9e5ac38f241c5587eeb0c436
Reviewed-on: https://code.wireshark.org/review/14785
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-04-02 17:36:13 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.

There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.

Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 17:38:03 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector.  Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector.
"data" dissector was not considered to be a dependency.

Change-Id: I15d0d77301306587ef8e7af5876e74231816890d
Reviewed-on: https://code.wireshark.org/review/14509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 12:48:48 +00:00
Pascal Quantin 2d1b5167ce PDCP LTE: upgrade dissector to v13.0.0
Change-Id: Iae4a38ac7b80978d1ad02168e79c0fe0bffd8d2e
Reviewed-on: https://code.wireshark.org/review/13549
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-01-26 15:55:02 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-08 20:04:56 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:38:06 +00:00
Michael Mann 57e18b0034 register_dissector -> new_register_dissector
Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9
Reviewed-on: https://code.wireshark.org/review/12073
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-23 17:36:39 +00:00
Pascal Quantin 332b9cef51 PDCP LTE: fix dissection of signalling PDUs sent on common control channels
For those crazy enough to try to decode PDUs sent in transparent mode ;)

Change-Id: Iab0a1325a6764846e23d8f04bd3147625b970638
Reviewed-on: https://code.wireshark.org/review/11498
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-02 21:29:22 +00:00
Martin Kaiser 1c5b3c3783 wsgcrypt.h checks internally if we HAVE_LIBGCRYPT
we can #include <wsutils/wsgcrypt.h> without doing the check ourselves

Change-Id: I248431bdb6cfa1bd85b794ec04ce1e4fcd3a7d2d
Reviewed-on: https://code.wireshark.org/review/11483
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-02 11:42:00 +00:00
Michael Mann beb5c0b765 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I1e6bf52fad1b1fffefc174a557ff836f400e8fd7
Reviewed-on: https://code.wireshark.org/review/9996
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-13 04:19:48 +00:00
Pascal Quantin b9a4babf67 PDCP LTE: fix dissection when only header is captured but full PDU length is reported
Change-Id: I62c89a49f3cf2ed566e16a978b2ed237f09d466e
Reviewed-on: https://code.wireshark.org/review/9775
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-24 19:41:16 +00:00
Michael Mann 21e5a950ad Remove all preferences related to enabling/disabling heuristic dissectors.
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.

Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.

Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17 17:12:22 +00:00
Michael Mann be7d295fbf Add "user presentable" and "unique string ids" to heuristic table entries.
This allows better presentation of heuristic dissectors to the end user.

Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6
Reviewed-on: https://code.wireshark.org/review/9602
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12 03:14:38 +00:00
Peter Wu 126e02cd58 Call reassembly_table_destroy and move g_hash_table_destroy
This patch moves g_hash_table_destroy calls from the init routine to
the cleanup routine. Besides that, the conditional check for the hash
table has been removed, assuming that init is always paired with a
cleanup call.

If reassembly_table_init is found, a reassembly_table_destroy call is
prepended to the cleanup function as well.

Comments have been removed from the init function as well as these did
not seem to have additional value ("destroy hash table" is clear from
the context).

The changes were automatically generated using
https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4d11f07180d9c115eb14bd860e9a47d82d3d1dcd
Manually edited files (for assignment auditing): dvbci, ositp, sccp,
tcp.

Other files that needed special attention due to the use of
register_postseq_cleanup_routine:

 - ipx: keep call, do not add another cleanup routine.
 - ncp: remove empty mncp_postseq_cleanup. mncp_hash_lookup is used
   even if a frame is visited before (see dissect_ncp_common), hence
   the hash table cannot be destroyed here. Do it in cleanup instead.
 - ndps: add cleanup routine to kill reassembly table, but do not
   destroy the hash table as it is already done in ndps_postseq_cleanup.

Change-Id: I95a72b3df2978b2c13fefff6bd6821442193d0ed
Reviewed-on: https://code.wireshark.org/review/9223
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:35:14 +00:00
Guy Harris 859511db14 Make UAT record update callbacks return a success/failure indication.
Have them return TRUE on success and FALSE on failure.  Check the return
value rather than whether the error string pointer is null or not.

Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c
Reviewed-on: https://code.wireshark.org/review/7222
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18 00:41:09 +00:00
Guy Harris bc23f79729 UAT error string pointers should not be const pointers.
UAT error strings are usually allocated by g_strdup() or
g_strdup_printf(), and must ultimately be freed by the caller.

Make the pointer-to-error-string-pointer arguments to various functions
be "char **", not "const char **".

Fix cases that finds where a raw string was being used, as that won't
work if you try to free it; g_strdup() it instead.

Add a missing free of an error string.

Remove some no-longer-necessary casts.

Remove some unnecessary g_strdup()s (the string being handed to it was
already g_malloc()ated).

Change some variable declarations to match.

Put in XXX comments for some cases where the error string is just freed,
without being shown to the user.

Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0
Reviewed-on: https://code.wireshark.org/review/6525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 20:20:03 +00:00
Martin Mathieson 7e8a4b0927 Deleting unnecessary #includes from dissectors.
Fourth batch (packet-mac-lte.c -> packet-rtp.c).

Will look at cleaning up and committing script afterwards.

Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644
Reviewed-on: https://code.wireshark.org/review/6023
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 17:16:40 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Martin Mathieson 5d6eb80c14 Use g_direct_ functions for hash tables where possible
Change-Id: Ie364cbdcf500d7a04e64d7adcdd03bd1926dda86
Reviewed-on: https://code.wireshark.org/review/5736
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-13 00:17:23 +00:00
Michael Mann 6fad7d19e7 Eliminate proto_tree_add_text from some dissectors.
Some other related cleanup.

Change-Id: I45f54032aa8318858f4ee784945b6f2ed163b6ea
Reviewed-on: https://code.wireshark.org/review/4328
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-27 15:44:53 +00:00
Graham Bloice 560762044d Fix buildbot issues with commit f8f3239bb0
from change 3016.

Change-Id: I67363462f1c4e1ca69695573892692c458c620c6
Reviewed-on: https://code.wireshark.org/review/3040
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-14 14:02:29 +00:00
Martin Mathieson f8f3239bb0 Add default ciphering and integrity algorithms to use for when control messages are not available, e.g. when handing in to a target cell.
Change-Id: I35830fe04df5e5778c15cdb782982b2fbcda67ea
Reviewed-on: https://code.wireshark.org/review/3016
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-14 12:30:47 +00:00
Bill Meier 9ed99d5c4e Strip some trailing whitespace; Fix some indentation; Add editor-modelines as needed.
Change-Id: I943153e28f468070d86535abad7be032e1386118
Reviewed-on: https://code.wireshark.org/review/2994
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-11 03:20:54 +00:00
Pascal Quantin 666127f5f9 PDCP LTE: do not try to decipher PDCP control messages (like ROHC feedback)
Change-Id: I4a1596fd45bbc78ed8e90accf69ac048e7053161
Reviewed-on: https://code.wireshark.org/review/2366
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 06:17:54 +00:00
Pascal Quantin ad7b5381ac Upgrade Windows builds to GnuTLS 3.1.22 and Gcrypt 1.6.0
Change-Id: I7650a3ec31120ac5e7954f4c1ca985ad55d189b4
Reviewed-on: https://code.wireshark.org/review/1978
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-06 15:33:01 +00:00
Pascal Quantin 398c81a299 PDCP LTE: add identification of ZUC based security algorithms
Change-Id: I63a66bc5822ac04f1a2bccd3a15adac30b65e397
Reviewed-on: https://code.wireshark.org/review/1541
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-06 21:43:35 +00:00
Pascal Quantin 542b4e6742 MAC/RLC/PDCP LTE: replace obsolete APIs
Change-Id: I5368cc7b1986c6a87cb70a3fd3cb5e589d73f870
Reviewed-on: https://code.wireshark.org/review/1520
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-05 21:26:46 +00:00
Michael Mann 9606ec5954 Remove enabling HAVE_SNOW3G by default
Change-Id: Ie1af436b763ec762a41af0bdfc1f3ec6adea2bc1
Reviewed-on: https://code.wireshark.org/review/1486
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-04 01:13:07 +00:00
Martin Mathieson 32e3e410ae Update TODO comments
Change-Id: I4ea940be5b65c041bdd330bfc2bdbe9a00360d00
Reviewed-on: https://code.wireshark.org/review/1475
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-03 21:38:36 +00:00
Martin Mathieson 616d4c9c1b Change preferences - always want to try to decrypt signalling PDUs
Change-Id: Ib34f12b5f8dd276612aed2fe0192c94e847858f2
Reviewed-on: https://code.wireshark.org/review/1377
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-04-26 22:33:32 +00:00
Martin Mathieson 784808ca86 PDCP LTE: various fixes related to security handling
- fixes the wrap multiplier (for COUNT) for 12-bit sequence numbers
- fixes dissection of non-ciphered IP payloads
- adds a way for private protocols to set keys. The ueid->key lookup is now broken out into a separate function, and these settings are used in preference to the UAT ones

Change-Id: I723307df3ee20425897b82beb9b431a0860075cf
Reviewed-on: https://code.wireshark.org/review/583
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-10 13:12:46 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier 93fe4d53e2 Remove trailing whitespace.
Change-Id: Ia03a1cd4590aceda30ead4aa93ad413d90c6aea6
Reviewed-on: https://code.wireshark.org/review/372
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 16:36:38 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Martin Mathieson 9416835735 Revert part of previous change
svn path=/trunk/; revision=54979
2014-01-27 12:54:34 +00:00
Martin Mathieson f903141d65 Send news of SecurityModeFailure to PDCP dissector, which will attempt to roll back to previous setting
svn path=/trunk/; revision=54978
2014-01-27 12:06:46 +00:00
Martin Mathieson 62249477b6 Remove #include and make the situation with snow3g clearer in a comment. May need further removal, depending upon concensus on wireshark-dev
svn path=/trunk/; revision=54827
2014-01-16 12:02:30 +00:00
Alexis La Goutte 85ab202c08 Fix -Wsometimes-uninitialized found by Clang
packet-pdcp-lte.c:1397:9: error: variable 'decrypted_data' is used uninitialized whenever 'if' condition is false
packet-pdcp-lte.c:1469:50: note: uninitialized use occurs here
    decrypted_tvb = tvb_new_child_real_data(tvb, decrypted_data, payload_length, payload_length);
packet-pdcp-lte.c:1353:27: note: initialize the variable 'decrypted_data' to silence this warning

packet-pdcp-lte.c:1397:9: error: variable 'payload_length' is used uninitialized whenever 'if' condition is false
packet-pdcp-lte.c:1469:66: note: uninitialized use occurs here
    decrypted_tvb = tvb_new_child_real_data(tvb, decrypted_data, payload_length, payload_length);
packet-pdcp-lte.c:1354:24: note: initialize the variable 'payload_length' to silence this warning

svn path=/trunk/; revision=54791
2014-01-14 17:44:21 +00:00
Pascal Quantin 330654baf8 SNOW3G is not available on default Wireshark
svn path=/trunk/; revision=54788
2014-01-14 16:48:43 +00:00
Martin Mathieson 293f8ca247 Make sure we allocate bytes for snow3g at least rounded up to next 4 byte boundary
svn path=/trunk/; revision=54786
2014-01-14 16:22:44 +00:00
Martin Mathieson b948c75dfe Update a comment
svn path=/trunk/; revision=54785
2014-01-14 15:11:35 +00:00
Martin Mathieson 58e8800136 Add snow3g integrity (not quite working for me), but rework how integrity and ciphering functions and conditional compilation is done
svn path=/trunk/; revision=54784
2014-01-14 15:07:20 +00:00
Martin Mathieson b01a99c385 Provide hook for calling EEA1 implementation (Snow3G). Implementation not supplied due to licensing conditions. TODO: EIA1.
svn path=/trunk/; revision=54782
2014-01-14 11:09:47 +00:00
Guy Harris 547efd4dc9 Cast away constness.
svn path=/trunk/; revision=54763
2014-01-14 05:17:06 +00:00
Martin Mathieson 830509b7dc Update a comment and fix some indentation
svn path=/trunk/; revision=54692
2014-01-10 17:56:55 +00:00
Martin Mathieson f026d8a807 Call deciphering and integrity checking appropriately for
SecurityModeCommand and SecurityModeResponse.

Also show when integrity has been checked and found to be correct.

svn path=/trunk/; revision=54620
2014-01-06 18:18:04 +00:00
Martin Mathieson f6bf6285ef Do EEA2 deciphering in-place, from Pascal
svn path=/trunk/; revision=54615
2014-01-06 11:28:20 +00:00
Pascal Quantin 3fb89feca6 EIA2 is now functional
svn path=/trunk/; revision=54579
2014-01-03 12:21:26 +00:00