Commit Graph

93 Commits

Author SHA1 Message Date
Pascal Quantin c8f87842cb ANSI A: fix dissection of numerous fields broken in g7298a31
Change-Id: I09898cfc1aedc4b8067c6d12c94effc51a5ebbc0
Reviewed-on: https://code.wireshark.org/review/10345
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-09-01 19:23:52 +00:00
Michael Mann 7298a31687 Eliminate proto_tree_add_text from ANSI dissectors.
Change-Id: I22dccb2f2d71897334e11632f4060ccfbf4794ad
Reviewed-on: https://code.wireshark.org/review/10334
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-09-01 04:10:06 +00:00
Michael Mann 2e2129a914 Conversion of random proto_tree_add_text calls.
Change-Id: I6505ce34de84bfe46d5bc7b4d6a3c6044f3fb4b5
Reviewed-on: https://code.wireshark.org/review/10041
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-16 02:32:12 +00:00
Pascal Quantin 6c58665540 ANSI IS-637 A: fix byte highlighting of destination address when using ASCII encoding
Change-Id: I11d5de26bd73bada742e808f582e0dd746032aa2
Reviewed-on: https://code.wireshark.org/review/8684
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-29 12:08:11 +00:00
Pascal Quantin 82503258ff ANSI IS-637 A: dump bytes when SMS encoding format is set to octet
Change-Id: I3d8a72a9549d170e0b1d54ad930da8c9dd510134
Reviewed-on: https://code.wireshark.org/review/8663
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-05-27 15:56:19 +00:00
Pascal Quantin 3b9cf24be6 ANSI IS-637 A: add dissection of Multiple Encoding User Data and Service Category Program Data
Bug: 11086
Change-Id: I36096d35038bc71191040514a38dcdf9e1373f31
Reviewed-on: https://code.wireshark.org/review/7840
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-03-30 06:06:35 +00:00
Pascal Quantin 123be13127 ANSI IS-637 A: ensure that num_fields is not null before calling text_decoder
Bug: 11014
Change-Id: Id2c7913d96743424380bd75c4005ec747ee7dd50
Reviewed-on: https://code.wireshark.org/review/7412
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-26 16:36:45 +00:00
Pascal Quantin d7538cbe4b ANSI IS-637-A: prevent an out of bounds access
Bug: 10897
Change-Id: I8316ba40ec00b612e4edd490e3cd36e7277912a9
Reviewed-on: https://code.wireshark.org/review/6824
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-28 10:06:25 +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
Michael Mann d65b7d5cd2 Eliminate proto_tree_add_text from GSM_SMS dissector.
Change-Id: Ibe189239735da2ebb1b0ce61a5af249975b38be3
Reviewed-on: https://code.wireshark.org/review/4402
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-10-01 13:37:51 +00:00
Pascal Quantin e179870a12 ANSI IS-637 A: remove a useless variable
Change-Id: I50077329d6e78ca39312e72eb04b7a5db85b977b
Reviewed-on: https://code.wireshark.org/review/4301
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-09-26 08:57:32 +00:00
Pascal Quantin 7c54eb23e5 ANSI IS-637 A: get rid of tvb_length() deprecated API
Change-Id: I40de03605c051024c604679a1e141afa841a77e9
Reviewed-on: https://code.wireshark.org/review/4287
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-09-25 16:11:57 +00:00
Pascal Quantin e520b2b800 ANSI IS-637-A: fix dissection of fragmented Unicode SMS
The computation of the number of characters available was wrong when the User Data Header is present

Change-Id: I2809c1460316530654a997b26cfc33c60a32fd6f
Reviewed-on: https://code.wireshark.org/review/4284
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>
2014-09-25 15:36:37 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Pascal Quantin cfe11b1097 Add ENC_ASCII_7BITS encoding
Change-Id: I01ec87ff4181afb5b2de487fd5f5200f8d62f17d
Reviewed-on: https://code.wireshark.org/review/1088
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-13 20:02:52 +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
Guy Harris ea1d5c151e Use proto_tree_add_item() for most string encodings.
We support ISO 8859-1 and 8859-8, so use proto_tree_add_item() for them.
That leaves only EUC-KR.

Change-Id: Ie61f69af43be03e5abeb84b95601a407900fb79b
Reviewed-on: https://code.wireshark.org/review/403
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-26 10:17:22 +00:00
Guy Harris 205a9f9b50 Use tvb_get_string_enc() rather than tvb_get_string(); according to
TIA/EIA-637-A, call-back numbers are either BCD or ASCII.

svn path=/trunk/; revision=54917
2014-01-22 22:37:08 +00:00
Pascal Quantin eabf15f80a Fix dissection of 3GPP2 SMS encoded in UCS2
svn path=/trunk/; revision=54787
2014-01-14 16:23:38 +00:00
Alexis La Goutte 86f6c85860 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54731
2014-01-13 22:25:03 +00:00
Pascal Quantin 70dc6197ec From Michael Lum via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9472 :
ANSI IS-637 SMS enhancements for CMAS (TIA-1149) and header dissection

svn path=/trunk/; revision=54684
2014-01-09 21:58:09 +00:00
Pascal Quantin 6ebc058f47 Add proto_tree_add_ts_23_038_7bits_item() / tvb_get_ts_23_038_7bits_string() functions and update dissectors to use it.
Remove gsm_sms_char_7bit_unpack() / gsm_sms_chars_to_utf8() functions.
Update documentation a bit.

svn path=/trunk/; revision=54534
2014-01-01 14:33:19 +00:00
Guy Harris 5084f58ce2 We support ENC_UCS_2, so use that in proto_tree_add_item() and
tvb_get_string_enc() rather than using iconv to convert it to UTF-8.

svn path=/trunk/; revision=54350
2013-12-22 02:12:32 +00:00
Pascal Quantin 5db2d622e4 From Michael Lum via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9554 :
GSM SMS: remove some globals and expose some UDH fields through dis_field_udh()

svn path=/trunk/; revision=53997
2013-12-12 22:35:45 +00:00
Pascal Quantin 93398e794e Use STR_UNICODE display instead of proto_tree_add_unicode_string() in the remaining dissectors
svn path=/trunk/; revision=53867
2013-12-08 20:03:15 +00:00
Pascal Quantin 37660f413b Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9478 :
GSM SMS User Data header fill bits are wrong when using a 7 bits ASCII / IA5 encoding

svn path=/trunk/; revision=53631
2013-11-28 21:59:02 +00:00
Bill Meier a3cb8fdf95 Create/use value_string_ext to reference certain value-string-arrays.
Define a char array as const.
Remove an unneeded initializer.
Add editor modelines.
Do some minor whitespace changes.

svn path=/trunk/; revision=53319
2013-11-14 21:32:47 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Pascal Quantin 9201e8ce14 3GPP2 SMS: add support for KSC5601 (Korean) character set
svn path=/trunk/; revision=53139
2013-11-07 10:27:11 +00:00
Michael Mann bb36a25089 Remove use of pinfo->private_data and just pass the data around through function parameters
Remove g_pinfo from packet-ansi_637.c and add packet_info* as a function parameter while we're at it.

svn path=/trunk/; revision=52883
2013-10-27 01:06:44 +00:00
Bill Meier a3a15ff90b Remove instances of unused 'data_handle' (and of one other handle).
svn path=/trunk/; revision=52767
2013-10-22 16:13:32 +00:00
Bill Meier 76d4b43a29 Minor whitespace, formatting & etc changes.
svn path=/trunk/; revision=52588
2013-10-13 18:14:59 +00:00
Pascal Quantin b46f9bebe2 Change some dissectors to use pinfo memory pool instead of malloc if it can trigger an exception between between buffer allocation and tvb_set_free_cb call
svn path=/trunk/; revision=51427
2013-08-19 14:55:41 +00:00
Pascal Quantin 81b6d6aab3 Do not use ephemeral memory when adding a new data source
svn path=/trunk/; revision=51423
2013-08-19 10:39:43 +00:00
Jakub Zawadzki f4bcbeb9f2 Keep result of [new_]register_dissector in some dissectors. [2 of x]
(don't create new dissector handle if we can use already existing one)

svn path=/trunk/; revision=51159
2013-08-05 19:09:44 +00:00
Pascal Quantin 9216d338f0 From Reinhard Speyerer via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8851:
ansi_637_tele dissector displays MSB as MBS for Call-Back Number

svn path=/trunk/; revision=50151
2013-06-25 21:05:28 +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
Guy Harris 3dbf3b975a Give somewhat more precise names for character encodings ("Unicode"
doesn't specify a single way to encode characters in an octet stream -
there's UTF-8 and UTF-16BE/LE, as well as UCS-2BE/LE for a subset of
Unicode, and "Latin" really means "ISO 8859-1" a/k/a "ISO Latin 1".

svn path=/trunk/; revision=49912
2013-06-12 18:17:15 +00:00
Pascal Quantin 41647faaba Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3289 :
dissector ansi_637 does not have unicode encoding in user data parameter

svn path=/trunk/; revision=49911
2013-06-12 17:25:04 +00:00
Pascal Quantin 0975d03e8d Fix dissection of 3GPP2 SMS messages when the User Data Header field is present (for fragmented SMS)
svn path=/trunk/; revision=49910
2013-06-12 16:59:59 +00:00
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 221b249acd svn path=/trunk/; revision=48272 2013-03-12 21:58:04 +00:00
Jakub Zawadzki c5a71b1006 String passed to val_to_str() must have int format specifier (%u, %d, %x, and so on...).
Fix some cases (easy to grep) by call to val_to_str_const().

svn path=/trunk/; revision=47807
2013-02-21 21:04:59 +00:00
Bill Meier c895033e4a Comment out unused hf[] entry.
svn path=/trunk/; revision=47449
2013-02-02 18:25:38 +00:00
Pascal Quantin d66d8c44d2 Fix GSM 7-bit default alphabet decoding in ANSI IS-637-A
svn path=/trunk/; revision=46687
2012-12-21 21:03:31 +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 b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00