Commit Graph

37 Commits

Author SHA1 Message Date
Darien Spencer 47860f05b4 AT: Add CPMS command
Change-Id: Idb4dd32849d1d1c64eab1c5f58e5b268aff43b04
Reviewed-on: https://code.wireshark.org/review/29006
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-11 15:30:19 +00:00
Darien Spencer ab47e8a52f AT: Add ^CIMI command
AT^CIMI is an alternative form for AT+CIMI for some modems

Change-Id: Id64fb4e0d76396400aa69fceeadba3a87ddf68e1
Reviewed-on: https://code.wireshark.org/review/29072
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-11 15:26:48 +00:00
Darien Spencer 93d50f542f AT: Allow more CMEE command types
Code was only allowing actions, while 'test', 'read' ,'action simply' and 'response'
are also possible

Change-Id: Iee84dd77912debe96a06f0b7d6b3e1f15527ce3b
Reviewed-on: https://code.wireshark.org/review/28997
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-08-07 20:13:22 +00:00
Darien Spencer 169962be43 AT: Fix check for numeric CME errors
Allow whitespaces in numeric error codes.

Change-Id: Id9baa2b8d90519f83ecba10f9cc479e15a932e3d
Reviewed-on: https://code.wireshark.org/review/28976
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-05 18:41:39 +00:00
Darien Spencer 93eaa1d648 AT: Add CIMI command
Change-Id: I7a03add8b48d0f360fbe5434fef866461804c2f3
Reviewed-on: https://code.wireshark.org/review/28940
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-08-05 09:43:46 +00:00
Peter Wu 114012dc4b AT: fix check for non-numeric CME errors
Fix the digit check, testing a pointer as character is an error.

Change-Id: I1ce2898dd1cca0b61bb2da342c81bc648fdb1cf2
Fixes: v2.9.0rc0-1356-g51c6fde9c7 ("AT: Distinguish between numeric and textual CME errors")
Reviewed-on: https://code.wireshark.org/review/28962
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-05 04:47:32 +00:00
Darien Spencer 4d650e7249 AT: Add CSIM command
Parse both commands and responses, including a call to GSM SIM dissector

Change-Id: I39624a1a088066aae6eb1e6fd61d4f73821b2345
Reviewed-on: https://code.wireshark.org/review/28959
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-05 04:46:41 +00:00
Darien Spencer 5c474bdef1 AT: Fix CME Error description
Leftover description form the BT-HFP dissector was classifying the DTE as an
Audio Gateway, which isn't always the case.

Change-Id: If6f916026bce00dc8783d95f48e449ffa9951d37
Reviewed-on: https://code.wireshark.org/review/28960
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-04 18:57:04 +00:00
Darien Spencer 98484f6428 AT: Allow test command for AT+CGMM
Change-Id: Ifbd6cb4dcfc4dee9b174eca60aaaac9de8968303
Reviewed-on: https://code.wireshark.org/review/28950
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-04 13:52:29 +00:00
Darien Spencer 51c6fde9c7 AT: Distinguish between numeric and textual CME errors
Change-Id: Ibf57da87f0ecd3a25461b333883ae8f84b3b4e31
Reviewed-on: https://code.wireshark.org/review/28951
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-04 13:49:04 +00:00
Alexis La Goutte 49aef5b061 at: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ibe42807cfbf3ed57791d4f4beb8e95cc71ba39f4
Reviewed-on: https://code.wireshark.org/review/28942
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Darien Spencer <cusneud@mail.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2018-08-04 07:51:56 +00:00
Darien Spencer d985188aa5 AT: Dissect commands
This commit introduces dissection of the different parts of the command,
showing of the command direction and origin entity, generic dissection of
'unsupported' commands, detailed dissection of several 'supported'
commands and aggregated commands dissection.

Most of the code has been taken from BT-HFP (A protocol of AT commands
over bluetooth).
Change-Id: I3516ec9c28581df8ef9c0c37f9b6ee9ec0c55938
Reviewed-on: https://code.wireshark.org/review/28699
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-01 05:48:06 +00:00
Darien Spencer 79a3829f4b AT: Allow padding in heuristic check
Bug: 14882
Change-Id: I0aa26d2ae898d47e0e33794f95e9c464cf5ec6f1
Reviewed-on: https://code.wireshark.org/review/28296
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-28 23:55:10 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Michael Mann f789c91a5e Have format_text_wsp use wmem allocated memory.
format_text_wsp is fed into by tvb_format_text_wsp and tvb_format_stringzpad_wsp
so those functions need to add a wmem allocated parameter as well.
Most of the changes came from tvb_format_text_wsp and tvb_format_stringzpad_wsp
being changed more so than format_text_wsp.

Change-Id: I52214ca107016f0e96371a9a8430aa89336f91d7
Reviewed-on: https://code.wireshark.org/review/19851
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-30 02:25:45 +00:00
Pascal Quantin d53229dbc1 AT: fix heuristic check
It should loop on captured data, not reported one
While we are at it, let's call tvb_format_text_wsp() only once

Change-Id: If6805a91d8e5dcf641e682b453522d88cbc2df6c
Reviewed-on: https://code.wireshark.org/review/15699
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-06-02 15:37:58 +00:00
Martin Kaiser 10f1ea6369 at: remove an unnecessary if (tree) check
Change-Id: I2e7805edd3312b9e8dd4540c60eca195c0f36445
Reviewed-on: https://code.wireshark.org/review/15680
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-06-01 11:51:56 +00:00
Joerg Mayer 8f3ad91905 Fix some warnings/errors of type
git/epan/dissectors/packet-a21.c:478:25: error: 'item' was marked unused but was used
      [-Werror,-Wused-but-marked-unused]
        proto_item_append_text(item, "%s", val_to_str_const(event_id, a21_event_vals, "Unknown"));
                               ^
Added manual change id because file-jpeg.c forced the use of commit -n

Change-Id: Iffff53d6253758c8454d9583f0a11f317c8390cb

Fix warnings/errors of type:
git/epan/dissectors/packet-ax25-kiss.c:205:52: error: 'pseudo_header' was marked unused but was
      used [-Werror,-Wused-but-marked-unused]
                        return capture_ax25( pd, l_offset, len, cpinfo, pseudo_header );

Fix checkhf warnings:
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_netswitch
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_subswitch
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_poll_reply_trailer
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_rdm_universe
Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_tod_data_universe

Change-Id: Id1fa12afb97a8e9cd4ed0ea25351c3b2639c930e
Reviewed-on: https://code.wireshark.org/review/14667
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-28 12:46:31 +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 01f7356f85 register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8
Reviewed-on: https://code.wireshark.org/review/11805
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-11-13 17:44:24 +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
AndersBroman 05c0152370 Replcae deprecated API tvb_length with tvb_reported_length or tvb_captured
length.

Change-Id: Id42f3409a32e202528d350f7afde7376e411fc51
Reviewed-on: https://code.wireshark.org/review/8076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-15 15:22:42 +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
Guy Harris 0b9eb9f4b7 Get rid of unnecessary includes of ctype.h.
Change-Id: I2cf49f808558147ce77e7d086558966cfb2defca
Reviewed-on: https://code.wireshark.org/review/4850
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 06:02:51 +00:00
Bill Meier ff5a77256c Add editor modelines and adjust indentation as needed.
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c
Reviewed-on: https://code.wireshark.org/review/4371
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 18:21:50 +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
AndersBroman 3157bf6ba5 isprint() -> g_ascii_isprint()
Change-Id: Ia586ef8ce500d5fc7578c52014206fa7a7eaea41
Reviewed-on: https://code.wireshark.org/review/1624
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-13 16:14:07 +00:00
Pascal Quantin 60c580dd13 AT: do not always prepend "/" to protocol name
Change-Id: Ice043e0355ea4d9112b377398079c94e66e35cc8
Reviewed-on: https://code.wireshark.org/review/1452
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-05-01 11:35:44 +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
Anders Broman b539916835 [-Wmissing-prototypes]
explicit casts.

svn path=/trunk/; revision=48293
2013-03-14 07:37:13 +00:00
Anders Broman 04766017df - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48282
2013-03-13 21:14:20 +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
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Chris Maynard 5b5f05c081 The AT dissector is not really USB-specific, so rename it from packet-usb-at.c to packet-at.c.
svn path=/trunk/; revision=40703
2012-01-24 20:29:32 +00:00