aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pdcp-lte.c
AgeCommit message (Collapse)AuthorFilesLines
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu1-19/+10
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-02-18Make UAT record update callbacks return a success/failure indication.Guy Harris1-1/+3
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-01-13UAT error string pointers should not be const pointers.Guy Harris1-1/+1
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>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
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-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
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-13Use g_direct_ functions for hash tables where possibleMartin Mathieson1-15/+1
Change-Id: Ie364cbdcf500d7a04e64d7adcdd03bd1926dda86 Reviewed-on: https://code.wireshark.org/review/5736 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-27Eliminate proto_tree_add_text from some dissectors.Michael Mann1-1/+2
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-07-14Fix buildbot issues with commit f8f3239bb03487de1844ab0f6df0ba693322ce4bGraham Bloice1-2/+2
from change 3016. Change-Id: I67363462f1c4e1ca69695573892692c458c620c6 Reviewed-on: https://code.wireshark.org/review/3040 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-14Add default ciphering and integrity algorithms to use for when control ↵Martin Mathieson1-3/+46
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-11Strip some trailing whitespace; Fix some indentation; Add editor-modelines ↵Bill Meier1-1/+1
as needed. Change-Id: I943153e28f468070d86535abad7be032e1386118 Reviewed-on: https://code.wireshark.org/review/2994 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-18PDCP LTE: do not try to decipher PDCP control messages (like ROHC feedback)Pascal Quantin1-3/+6
Change-Id: I4a1596fd45bbc78ed8e90accf69ac048e7053161 Reviewed-on: https://code.wireshark.org/review/2366 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-06Upgrade Windows builds to GnuTLS 3.1.22 and Gcrypt 1.6.0Pascal Quantin1-1/+1
Change-Id: I7650a3ec31120ac5e7954f4c1ca985ad55d189b4 Reviewed-on: https://code.wireshark.org/review/1978 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-06PDCP LTE: add identification of ZUC based security algorithmsPascal Quantin1-0/+2
Change-Id: I63a66bc5822ac04f1a2bccd3a15adac30b65e397 Reviewed-on: https://code.wireshark.org/review/1541 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-05MAC/RLC/PDCP LTE: replace obsolete APIsPascal Quantin1-14/+14
Change-Id: I5368cc7b1986c6a87cb70a3fd3cb5e589d73f870 Reviewed-on: https://code.wireshark.org/review/1520 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-05-04Remove enabling HAVE_SNOW3G by defaultMichael Mann1-2/+1
Change-Id: Ie1af436b763ec762a41af0bdfc1f3ec6adea2bc1 Reviewed-on: https://code.wireshark.org/review/1486 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-03Update TODO commentsMartin Mathieson1-4/+6
Change-Id: I4ea940be5b65c041bdd330bfc2bdbe9a00360d00 Reviewed-on: https://code.wireshark.org/review/1475 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-04-26Change preferences - always want to try to decrypt signalling PDUsMartin Mathieson1-2/+2
Change-Id: Ib34f12b5f8dd276612aed2fe0192c94e847858f2 Reviewed-on: https://code.wireshark.org/review/1377 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-03-10PDCP LTE: various fixes related to security handlingMartin Mathieson1-72/+147
- 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-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-02-25Remove trailing whitespace.Bill Meier1-8/+8
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-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-1/+1
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-01-27Revert part of previous changeMartin Mathieson1-2/+1
svn path=/trunk/; revision=54979
2014-01-27Send news of SecurityModeFailure to PDCP dissector, which will attempt to ↵Martin Mathieson1-9/+43
roll back to previous setting svn path=/trunk/; revision=54978
2014-01-16Remove #include and make the situation with snow3g clearer in a comment. ↵Martin Mathieson1-4/+5
May need further removal, depending upon concensus on wireshark-dev svn path=/trunk/; revision=54827
2014-01-14Fix -Wsometimes-uninitialized found by ClangAlexis La Goutte1-2/+2
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-14SNOW3G is not available on default WiresharkPascal Quantin1-1/+1
svn path=/trunk/; revision=54788
2014-01-14Make sure we allocate bytes for snow3g at least rounded up to next 4 byte ↵Martin Mathieson1-3/+3
boundary svn path=/trunk/; revision=54786
2014-01-14Update a commentMartin Mathieson1-2/+1
svn path=/trunk/; revision=54785
2014-01-14Add snow3g integrity (not quite working for me), but rework how integrity ↵Martin Mathieson1-78/+82
and ciphering functions and conditional compilation is done svn path=/trunk/; revision=54784
2014-01-14Provide hook for calling EEA1 implementation (Snow3G). Implementation not ↵Martin Mathieson1-44/+74
supplied due to licensing conditions. TODO: EIA1. svn path=/trunk/; revision=54782
2014-01-14Cast away constness.Guy Harris1-3/+3
svn path=/trunk/; revision=54763
2014-01-10Update a comment and fix some indentationMartin Mathieson1-4/+4
svn path=/trunk/; revision=54692
2014-01-06Call deciphering and integrity checking appropriately forMartin Mathieson1-5/+29
SecurityModeCommand and SecurityModeResponse. Also show when integrity has been checked and found to be correct. svn path=/trunk/; revision=54620
2014-01-06Do EEA2 deciphering in-place, from PascalMartin Mathieson1-10/+2
svn path=/trunk/; revision=54615
2014-01-03EIA2 is now functionalPascal Quantin1-8/+18
svn path=/trunk/; revision=54579
2013-12-31Zero security struct to avoid reading garbage value, and remove a redundant testMartin Mathieson1-10/+4
svn path=/trunk/; revision=54506
2013-12-25Code that uses that parameter is #if 0'ed out, so _U_ it for now.Guy Harris1-1/+1
svn path=/trunk/; revision=54452
2013-12-25Show ciphering and integrity keys separately. Correct inputs to integrity ↵Martin Mathieson1-18/+34
calculation (result still not right with gcrypt 1.6 yet) svn path=/trunk/; revision=54451
2013-12-24dirty hack to make things compile without libgcryptMartin Kaiser1-1/+1
would it make sense to check global_pdcp_check_integrity inside calculate_digest()? svn path=/trunk/; revision=54438
2013-12-24Lop off last 4 bytes of payload to use for digest calculation. Still doesn't ↵Martin Mathieson1-1/+1
get expected result. svn path=/trunk/; revision=54437
2013-12-24Still not quite working, but using MAC API with gcrypt 1.6 now for digestMartin Mathieson1-18/+35
svn path=/trunk/; revision=54427
2013-12-23Fix setup of new expert info item.Guy Harris1-1/+1
svn path=/trunk/; revision=54426
2013-12-23Fix compilation after last change in packet-pdcp-lte (about unused parameter)Alexis La Goutte1-1/+1
svn path=/trunk/; revision=54398
2013-12-23Add #if 0'd code to calculate CMAC digest, which isn't supported in windows ↵Martin Mathieson1-6/+67
build of libgcrypt currently getched by 'setup'. svn path=/trunk/; revision=54388
2013-12-23Remove printf() callMartin Mathieson1-1/+0
svn path=/trunk/; revision=54382
2013-12-23Call function and compare result with parsed mac-i. Now just need to do ↵Martin Mathieson1-17/+60
EIA2(AES) calculation svn path=/trunk/; revision=54380
2013-12-23Use preference variable that wasn't used yet to pacify buildbotMartin Mathieson1-0/+27
svn path=/trunk/; revision=54378
2013-12-23Starting to get ready for integrity checkingMartin Mathieson1-34/+61
svn path=/trunk/; revision=54377
2013-12-19Change types and add cast to try to please buildbotMartin Mathieson1-3/+3
svn path=/trunk/; revision=54256
2013-12-19Cope with spaces or dashes in security keysMartin Mathieson1-8/+44
svn path=/trunk/; revision=54251