Commit Graph

135 Commits

Author SHA1 Message Date
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman 6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Pascal Quantin 86eda54fe6 As suggested by Evan Huus, use extended value_strings
svn path=/trunk/; revision=48407
2013-03-18 22:21:53 +00:00
Pascal Quantin 94f330030d use enum values instead of hardcoded values
(as suggested by Sylvain Munaut in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8487)

svn path=/trunk/; revision=48397
2013-03-18 20:26:47 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Pascal Quantin f857265011 Fix some dead increment warnings found by Clang
svn path=/trunk/; revision=47319
2013-01-27 18:58:52 +00:00
Pascal Quantin ae61fe0158 Try to fix dissection of GSM protocol family broken by r47209.
Using val_to_str seemed to be a good idea, but most value_string arrays were not properly filled or were using hacks.
(I hope I got everything right...)


svn path=/trunk/; revision=47218
2013-01-22 23:25:44 +00:00
Bill Meier f815eb4969 Fix two purported [-Wshadow] warnings;
Also: Do some minor whitespace and formatting changes.

svn path=/trunk/; revision=46196
2012-11-26 02:17:50 +00:00
Pascal Quantin a84d12bcd0 Dissect more DTM related messages
svn path=/trunk/; revision=45996
2012-11-11 10:52:35 +00:00
Pascal Quantin e304855c22 Do not display IE length twice
svn path=/trunk/; revision=45987
2012-11-10 08:50:20 +00:00
Anders Broman 66ddbc8c5d Add dissection ofDTM ASSIGNMENT COMMAND and fix message types.
svn path=/trunk/; revision=45825
2012-10-29 12:49:45 +00:00
Pascal Quantin 51e45c8da9 From Mike Morrin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7911 :
Fix dissection of some GSM RR IEs which include length octet

From me:
Keep displaying those IEs as TLV to keep coherency with other TLV IEs
Fix dissection of Dynamic ARFCN Mapping

svn path=/trunk/; revision=45811
2012-10-27 17:03:12 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Pascal Quantin 7da4784b25 Following r44648, revert part of r44162 and followups so as to have a top level gsm_a filter name
svn path=/trunk/; revision=44667
2012-08-25 13:32:41 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Pascal Quantin 51fd116d6d Do not register fields twice
svn path=/trunk/; revision=44195
2012-08-01 19:22:59 +00:00
Pascal Quantin 68194dd0d5 The minimum CCCH size is 3 bytes (L2 pseudo length + protocol discriminator + message type)
svn path=/trunk/; revision=44192
2012-08-01 19:00:13 +00:00
Pascal Quantin 6c8d938dd4 Follow-up of r44162: clean more filters
svn path=/trunk/; revision=44187
2012-08-01 14:07:18 +00:00
Pascal Quantin 2303b8dcfc Follow-up of r44162: RR dissector is not used only on Common Control CHannels but also on Dedicated Control CHannels; update protocol name and filters accordingly
svn path=/trunk/; revision=44185
2012-08-01 13:32:07 +00:00
Michael Mann 1741731384 remove unnecessary underscores from display filters
svn path=/trunk/; revision=44181
2012-08-01 02:59:17 +00:00
Michael Mann 175851fb40 Updated GSM dissectors display filters per checkfiltername.pl
Tried to provide consistency with GSM dissector (protocol) names, even if the filenames now don't match the dissector name.

svn path=/trunk/; revision=44162
2012-07-31 18:54:11 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
pascal 0ba1ab2909 Display Element ID in hexadecimal (like in 3GPP specs)
Display EPS bearer ID in decimal

svn path=/trunk/; revision=42755
2012-05-21 19:27:38 +00:00
pascal 2845705252 Revert 42618 (in 3GPP vocabulary multirat means multi radio access technology)
svn path=/trunk/; revision=42619
2012-05-13 19:03:48 +00:00
Chris Maynard 7cd17ae0b3 More typos: Multirat -> Multirate.
svn path=/trunk/; revision=42618
2012-05-13 18:01:35 +00:00
Chris Maynard 21863ad163 Convert tabs to spaces. Fix some typos.
svn path=/trunk/; revision=42617
2012-05-13 17:55:06 +00:00
Anders Broman 82ba410214 Tabs spelling
svn path=/trunk/; revision=42616
2012-05-13 16:34:53 +00:00
Anders Broman 6d757a2083 Renove redundant code
svn path=/trunk/; revision=42611
2012-05-13 14:00:10 +00:00
Anders Broman 09c5089ebc Fix de_rr_cell_opt_sacch decoding the DTX cell options wrongly, by using proto_tree_add_split_bits_item_ret_val https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7253
svn path=/trunk/; revision=42610
2012-05-13 13:58:10 +00:00
Guy Harris 32ec3275bd Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_bits_item() calls.

svn path=/trunk/; revision=42567
2012-05-11 08:05:35 +00:00
Bill Meier c055ca8c7e General minor cleanup including:
- remove unneeded #includes;
- use val_to_str_const() as appropriate;
- reformat hf[] entries;
- reformat long lines;
- use #if 0/#endif to coment out code instead of /* ... */;
- remove boilerplate comments;
- whitespace & indentation


svn path=/trunk/; revision=42487
2012-05-07 22:11:34 +00:00
pascal 1e2f3bb55a Update RRC to V10.7.0 and add dissection of Core Network System Information IEs
svn path=/trunk/; revision=42081
2012-04-15 11:51:40 +00:00
Bill Meier c4cc3264fd proto_tree_add_bits_item() associated hf[] entry 'bitmask' must be 0;
FT_BOOLEAN hf[] entries with a 0 'bitmask' should have 'display' = BASE_NONE;
General whitespace & formatting changes.

svn path=/trunk/; revision=41579
2012-03-15 23:16:46 +00:00
Alexis La Goutte bdbe07fe0a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41464
2012-03-10 17:47:28 +00:00
Anders Broman d50dcb37e9 From Sylvain Munaut: gsm_a_common: ELEM_MAND_VV_SHORT doesn't support IEs of different types. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6924
svn path=/trunk/; revision=41445
2012-03-09 05:08:30 +00:00
Jeff Morriss 406861ebf4 Don't use FT_*INT with true_false strings: the code to generate
representations of former is expecting value_strings--which are quite
different than the latter.

svn path=/trunk/; revision=41362
2012-03-06 02:04:10 +00:00
Anders Broman dea5452b95 From Lei Chen:
a patch to support decode FDD_CELL_INFORMATION of "UTRAN FDD Description" in packet-gsm_rlcmac.c

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

svn path=/trunk/; revision=41149
2012-02-23 08:57:40 +00:00
Bill Meier 083496f05c Fix:
packet-gsm_a_rr.c:3867:101: error: parameter 'len' set but not used [-Werror=unused-but-set-parameter]
packet-gsm_a_rr.c:6837:46: warning: variable 'bit_offset_sav2' set but not used [-Wunused-but-set-variable]
packet-gsm_a_rr.c:7458:18: warning: variable 'curr_offset' set but not used [-Wunused-but-set-variab

svn path=/trunk/; revision=40453
2012-01-13 14:18:07 +00:00
Anders Broman 77e16b842e Fix:
packet-gsm_a_rr.c:3289: warning: unused parameter 'len'
packet-gsm_a_rr.c:3412: warning: unused parameter 'len'
packet-gsm_a_rr.c:4449: warning: unused variable 'bit_len'
packet-gsm_a_rr.c:4444: warning: unused parameter 'len'
packet-gsm_a_rr.c:4557: warning: unused parameter 'len'
packet-gsm_a_rr.c:6285: warning: unused parameter 'len'
packet-gsm_a_rr.c:6765: warning: unused variable 'bit_len'
packet-gsm_a_rr.c:6759: warning: unused parameter 'len'
packet-gsm_a_rr.c:6987: warning: unused variable 'bit_len'
packet-gsm_a_rr.c:6979: warning: unused parameter 'len'
packet-gsm_a_rr.c:7457: warning: unused parameter 'len'

svn path=/trunk/; revision=40451
2012-01-13 06:42:46 +00:00
Anders Broman d9df8397f4 From Mike Morrin:
This is largely a cosmetic update of the gsm_a_rr dissector:

•    TBF starting time is now fully decoded.
•    “Double indenting” of IE groups (where an IE dissector adds a subtree just
after the generic dissector adds a subtree) has been eliminated.
•    “Null” break points in CSN.1 IEs have been added where they were
previously missing (this could have caused some correct PDUs to be reported as
malformed).
•    The calculation of CSN.1 IE lengths has been corrected: ((a – b)>>3)+1 is
not the same as (a>>3)-(b>>3)+1 .
•    The handling of CSN.1 padding bits is slightly improved.
•    The handling of CSN.1 “truncated” bits is slightly improved.
•    Eliminated superfluous checks for len==0 at the beginning of some
rest-octet dissectors (the generic dissector won’t call the CSN.1 dissector if
len is 0).
•    A few minor corrections to text strings and formatting.

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

svn path=/trunk/; revision=40447
2012-01-13 06:11:44 +00:00
Anders Broman 6fe073426a From Lei Chen:
An error in eutran_measurement_param_desc of GSM si2qua rest octet.

From me fix similar bugs.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6721

svn path=/trunk/; revision=40434
2012-01-11 06:30:20 +00:00
Anders Broman ec2f398ad1 From Mike Morrin:
GSM RR CCCH dissection ignores last octet of PDU.

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

svn path=/trunk/; revision=40405
2012-01-08 15:30:05 +00:00
Alexis La Goutte 96ba099770 Fix the following error :
packet-gsm_a_rr.c: In function 'de_rr_p2_rest_oct':
packet-gsm_a_rr.c:4033:105: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]

svn path=/trunk/; revision=40386
2012-01-05 08:29:58 +00:00
Anders Broman 755c083fd8 From Mike Morrin:
Improvements to handling of gsm_um traces and dissection of ccch protocol

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

svn path=/trunk/; revision=40385
2012-01-05 07:24:21 +00:00
Anders Broman 56188e9d27 From Mike Morrin:
GSM ENHANCED MEASUREMENT REPORT PDUs were not
dissected when present as L3_INFO in RSL MEAS_RES PDUs.

It seems that the RSL L3_INFO needs to be handled by a different dissector
depending on whether it contains a DTAP, SACCH or CCCH PDU, which fortunately
can be deduced from the RSL PDU type.  packet-rsl.c is updated to implement
this.

In packet-gsm_a_rr.c the dissection of PDUs with RR Short PD format is
improved, and also some items are renamed to make clearer the difference
between SACCH PDUs (which cna be normal or Short PD format) and RR Short PD
format PDUs (which can occur on SACCH, CCCH, or DCH).

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

svn path=/trunk/; revision=40357
2012-01-01 19:57:47 +00:00
Anders Broman f5f746f54f From Mike Morrin:
eliminates the global variable for tracking which nibble is
to be decoded by taking advantage of the fact that half octet IEs always occur
in pairs, and thus a pair can be grouped together for decoding.

There was probably also some confusion caused by the macros UPPER_NIBBLE and
LOWER_NIBBLE because the GSM bit numbering is opposite to Wireshark internal
numbering, so I have changed these to be LEFT_NIBBLE and RIGHT_NIBBLE, which
corresponds to the display format in Wireshark.

The dissection order of half octet IEs has been adjusted where necessary to
align with the ordering shown in the GSM specifications.

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

svn path=/trunk/; revision=40157
2011-12-12 07:24:57 +00:00
Anders Broman 243b43c1fc From Vincent Helfre.
The offset in "Cell Selection Indicator after Release of all TCH and SDCCH" was not correct because the length was element was decoded twice.  So I removed the second decoding of the length.

svn path=/trunk/; revision=40088
2011-12-04 15:21:22 +00:00
Anders Broman 756113888a Get rid of Warnings.
svn path=/trunk/; revision=39977
2011-11-21 18:21:59 +00:00
Anders Broman 603173b64a From Vincent Helfre:
added the display of intermediate value used to decode ARFCN in 
range 1024/256 format.
So now the W(n) values can be displayed and localised in the tvb buffer.
The code was reworked a little to use the get_bit functions.

svn path=/trunk/; revision=39976
2011-11-21 18:16:19 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00