Commit Graph

119 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
Chris Maynard 05308f904d Fix Coverity CID 281471: Logically dead code. (addr_type can only be 1 or 2 due to the return statement in the default case)
svn path=/trunk/; revision=48577
2013-03-27 02:46:45 +00:00
Anders Broman 88731fc9ef Set up RTCP conversation too.
svn path=/trunk/; revision=48442
2013-03-20 20:02:22 +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
Chris Maynard 181751aa74 Fix Coverity CID 280371: Logically dead code.
svn path=/trunk/; revision=47972
2013-03-01 06:52:25 +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
Guy Harris 5c2a86ebc8 Update a comment.
svn path=/trunk/; revision=46795
2012-12-26 22:13:34 +00:00
Guy Harris 46e9f63fb2 Do array bounds checking.
svn path=/trunk/; revision=46793
2012-12-26 22:05:41 +00:00
Guy Harris 8ede6b7dc0 bssmap_msg_fcn[] is a dense array, not a sparse array, so *every* entry
must be filled in - even if we don't happen to have dissectors for
particular message types.  Just put NULL in there, so we don't index
past the end of the array, grab a random location in memory's contents
as a function pointer, and crash when we call through that pointer.

svn path=/trunk/; revision=46747
2012-12-25 23:14:05 +00:00
Anders Broman 45769c7975 Update MSG value string and add commented out info
svn path=/trunk/; revision=46207
2012-11-26 19:53:30 +00:00
Bill Meier 8e9db03197 Minor cleanup:
- revert incorrect replacement of FALSE by ENC_BIG_ENDIAN
  done a while back;
  [The incorrect use of ENC_BIG_ENDIAN was benign since
   ENC_BIG_ENDIAN is currently defined as 0x0000000];

svn path=/trunk/; revision=45651
2012-10-18 22:22:25 +00:00
Anders Broman ef4ecaa38b Use proto_tree_add_item() and value_strings in a couple of more places.
svn path=/trunk/; revision=45087
2012-09-24 08:38:45 +00:00
Anders Broman 201380fd33 Detected typos in speech codec value.
- Refactored code to use proto_tree_add_item() and use a value string.

svn path=/trunk/; revision=45044
2012-09-21 13:36:07 +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
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +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
Pascal Quantin 6c8d938dd4 Follow-up of r44162: clean more filters
svn path=/trunk/; revision=44187
2012-08-01 14:07:18 +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
Anders Broman 4cc3cae627 - In INTERNAL HANDOVER COMMAND Circuit Identity Code is C(Coded optional in WS)
- be_speech_codec ( 3.2.2.104    Speech Codec) did not cover all codecs.

svn path=/trunk/; revision=43401
2012-06-20 07:59:20 +00:00
Pascal Quantin f0a74f3a5c Upgrade GSM BSSMAP dissection to Release 9 (V9.8.0)
svn path=/trunk/; revision=43227
2012-06-12 21:36:55 +00:00
Pascal Quantin aa0ebee47c From Alexander via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7361 :
Add BSS supported Codec list dissection to Assigment Complete message

svn path=/trunk/; revision=43215
2012-06-11 20:28:31 +00:00
Pascal Quantin 653f74bfcf From Alexander via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7360 :
Service handover IE is not correctly dissected

svn path=/trunk/; revision=43214
2012-06-11 20:12:17 +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
Bill Meier d53320919a Remove unneeded #includes (stdlib, stdio, ctypes, time);
In a few cases: do some whitespace, indentation cleanup & reformatting.

svn path=/trunk/; revision=42632
2012-05-15 19:23: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 5df9055044 Fix a few clang warnings
svn path=/trunk/; revision=42343
2012-04-30 08:38:26 +00:00
Anders Broman eb97cbb088 Set up RTP conversations from BSS MAP.
svn path=/trunk/; revision=42142
2012-04-19 13:59:55 +00:00
Jeff Morriss e41643f34a Avoid false-positive CID 621: if str is non-NULL, idx should be positive
(so idx won't be negative when used in the else statement).  To avoid
this false positive, add a check if idx is negative to the if(str) check.

Also remove some trailing commas.

svn path=/trunk/; revision=41925
2012-04-04 14:42:25 +00:00
Anders Broman 7bfeada4bf Fix dissecton of speech codec list
svn path=/trunk/; revision=41429
2012-03-08 10:23:04 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier c67363e4de Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38170
2011-07-22 18:33:44 +00:00
Jeff Morriss 4380cad67d Finish removing tabs and fix up some indentation.
Add a break after decoding CSData Codec Type.

svn path=/trunk/; revision=37247
2011-05-18 17:31:48 +00:00
Jeff Morriss 7b3bd3e8a9 Add a default (else) case in the default case for cause values to avoid passing
a NULL string pointer to format routines.

While we're there, update the cause list from 48.008 v10.1.0.

svn path=/trunk/; revision=37244
2011-05-18 17:09:55 +00:00
Anders Broman 8d6ca293dc Change the signature of elem_fcn():ns to include pinfo.
svn path=/trunk/; revision=36443
2011-04-04 14:37:25 +00:00
Anders Broman 72b69aeaf5 Change the msg_fcn() signature to include pinfo.
svn path=/trunk/; revision=36441
2011-04-04 07:45:34 +00:00
Anders Broman 691c566900 CID 453,454
Missing break

svn path=/trunk/; revision=36277
2011-03-23 05:48:58 +00:00
Anders Broman b4941ca580 Prepare to remove old bssgp code by changing exports.
svn path=/trunk/; revision=36142
2011-03-06 09:42:41 +00:00
Anders Broman f9b379bab5 Advance offsets in the "default" branch to avoid infinite loops.
** (tshark.exe:4392): WARNING **: Dissector bug, protocol GSM BSSMAP, in packet
194520: More than 1000000 items in the tree -- possible infinite loop
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5688

svn path=/trunk/; revision=35939
2011-02-13 15:43:17 +00:00
Anders Broman 35bde0d589 Update dissection of
3.2.2.103 Speech Codec List
3.2.2.104 Speech Codec
to 3GPP TS 48.008 version 9.4.0 Release 9.

svn path=/trunk/; revision=35935
2011-02-12 20:17:47 +00:00
Anders Broman 211e3a1eef - Use ENC_BIG_ENDIAN.
- GSM_A_PDU_TYPE_BSSMAP.

svn path=/trunk/; revision=35879
2011-02-08 12:32:34 +00:00
Anders Broman 7a78a180c7 Dissect more IE's in PERFORM-LOCATION-REQUEST.
svn path=/trunk/; revision=35721
2011-01-31 15:16:45 +00:00
Stig Bjørlykke 64dab4f576 Removed duplicate hf_gsm_a_bssmap_lsa_only registry.
svn path=/trunk/; revision=35676
2011-01-27 07:45:31 +00:00
Anders Broman 68f4f61017 Dissect PS-HANDOVER-REQUEST.
svn path=/trunk/; revision=35666
2011-01-26 19:44:23 +00:00
Anders Broman a78e5d7900 Use value_string_ext and friends.
svn path=/trunk/; revision=35484
2011-01-11 20:15:04 +00:00
Anders Broman f108c58805 Complement to
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=35477

svn path=/trunk/; revision=35483
2011-01-11 20:02:30 +00:00
Anders Broman f23d884631 Try to fix:
packet-gtpv2.c:2648: warning: return type defaults to 'int'
packet-gtpv2.c: In function 'dissect_udp_s_port_nr':
packet-gtpv2.c:2690: warning: unused parameter 'length'
packet-gtpv2.c: In function 'dissect_gtpv2_fq_csid':
packet-gtpv2.c:2845: warning: unused parameter 'length'
packet-gtpv2.c: In function 'dissect_gtpv2_emlpp_pri':
packet-gtpv2.c:2927: warning: implicit declaration of function 'be_emlpp_prio'
packet-gtpv2.c: At top level:
packet-gtpv2.c:3056: warning: initialization from incompatible pointer type

svn path=/trunk/; revision=35431
2011-01-08 20:26:35 +00:00