Commit Graph

17 Commits

Author SHA1 Message Date
John Thacker 8c585cc228 skinny: Convert parse_xml2skinny_dissector.py to Py3
Convert parse_xml2skinny_dissector.py to Python 3.
This is mostly the output of running 2to3, but some of the
uses of dict.keys() were left as is instead of being converted
to lists, since only membership was tested.

The dissector still needs to be regenerated, which will happen
in a next commit, so that this change can be easily backported.
2022-11-03 20:28:19 -04:00
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +00:00
Stig Bjørlykke f314b64fd0 Skinny: Fix arguments in parser
Remove a duplicated argument to fix a warning:

  Wrong number of arguments for string format.
  Format ptvcursor_add(cursor, hf_skinny_%s, 6, ENC_NA);
  takes 1, but 2 are provided.
2021-11-09 13:32:50 +00:00
Jirka Novak cbb35809ba Skinny: Resynced Skinny xml definition with code
I found that SkinnyProtocolOptimized.xml and packet-skinny.c.in are not in
sync with packet-skinny.c. Obviously packet-skinny.c file was modified
multiple times manually.
I made changes:
- synced all typos fixed in packet-skinny.c to SkinnyProtocolOptimized.xml
- improved parse_xml2skinny_dissector.py to be able to generate
  additional information to flow sequence
- updated SkinnyProtocolOptimized.xml to mark where to generate
  additional information

If fact the outcome is just refactoring of original code.
2021-10-31 17:19:33 +01:00
Evan Huus cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.

A few others were returning memory, and needed conversion to accept a
wmem scope argument.
2021-09-01 03:54:52 +00:00
Guy Harris 5cf3fd03f1 HTTPS In More Places, update some URLs.
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8
Reviewed-on: https://code.wireshark.org/review/34096
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 07:55:36 +00:00
Dario Lombardo 8a5385b9c9 More licenses converted to SPDX.
Change-Id: Id4f987dcdacf06622d70263f4659a4400e30dc39
Reviewed-on: https://code.wireshark.org/review/26332
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 13:35:49 +00:00
Diederik de Groot a0b2a5989d [skinny]: minor changes to xml file
- Fix/syncronise spelling for similar field types
- Fix cog.py script invocation

Change-Id: Iab6d8ac6414c1ba9b97c49d7d0a4d2609eb1a55b
Reviewed-on: https://code.wireshark.org/review/23153
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-21 15:28:02 +00:00
Diederik de Groot 73ac6974c4 [skinny]: Fix tvb struct size guard value
The struct size guard value was used incorrectly, causing message with short
content to be only partially dissected.

Minor:
- Renamed OffHookWithCgpn to OffHookWithCalingPartyNumber
- Added SetHookFlashDetect Message
- Removed some of the debug logging when parse_xml2skinny_dissector.py:debug=0

Change-Id: If4f20d2412f8775fac3d0a2979200e8369cea6f2
Reviewed-on: https://code.wireshark.org/review/20186
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-22 05:39:53 +00:00
Diederik de Groot 9a22102d35 [skinny]: Added conversation and request_response handling
Improvements:
 - added conversation
 - added request/response handling

Change-Id: Ia670eb23c0671b195108876a30ff3ff5eb4a152c
Reviewed-on: https://code.wireshark.org/review/20094
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-16 05:01:54 +00:00
Diederik de Groot ea0a7f211c [skinny]: Add struct/union guards to multi-part message handlers
Improve multi-part message handling
- Calculate (sub) structure/union length
- Add a guard when iterating over multi-part message
- For fixed length messages, advance the cursor when iteration falls short of max length

Change-Id: Id2af3aa1a878328f105e173cabe2b68dd0343507
Reviewed-on: https://code.wireshark.org/review/20057
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-02-12 16:21:02 +00:00
Diederik de Groot fb3a7caa17 [skinny] Fix ConnectionStatRes and DialedNumber Messages protocol version >20
- ConnectionStatisticsResponse Comes in three different forms
- DialedNumber Message has variable length

Minor:
- Pass ipv4or6 connection address back to calling function (using this later on in seperate commit)
- Correct spelling mistakes
- Remove duplicates from DeviceType[]

Change-Id: Ib1619b163c12b6a4c6c86972186d828be3fd94e2
Reviewed-on: https://code.wireshark.org/review/20056
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-02-12 16:14:28 +00:00
Diederik de Groot cf49f71c59 dissector-skinny: Update skinny dissector to fix ServerRes Message
ServerRes message does not follow other message when it comes to
provinding the list of ip-addresses. The type of ip-address (IPv4
or IPv6 does not depend on the protocol version but the length of
the message.

Fix: ipv4 address displayed as ip-address

Change-Id: Ie16f81c9482b30a80da37b9327b09e933d7808f8
Reviewed-on: https://code.wireshark.org/review/10513
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-13 19:24:00 +00:00
Diederik de Groot d6aa77d83b Skinny:
Do not try to create a wmem_strbuf whose size is bigger than the max size allowed -> using wmem_strbuf_new instead of wmem_strbuf_sized_new (Evan Huus)
While we are at it, fix errors spotted by the pre-commit tools/SkinnyProtocolOptimized -> Did not get any, can you specify which errors ? (Pascal Quantin)
FT_IPv6: 'ENC_BIG_ENDIAN | ENC_NA' -> 'ENC_NA' only (2) (Pascal Quantin)
Revert back to wmem_strbuf_sized_new instead of wmem_strbuf_new (Pascal Quantin)
Use wmem_strbuf_sized_new maxlength = 0  (Pascal Quantin)

Bug: 10409
Bug: 10410
Change-Id: Iebfcb53bc0a6289e02d10c38ecb717aa5c89389e
Reviewed-on: https://code.wireshark.org/review/3862
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-26 18:58:39 +00:00
Pascal Quantin 7836a714ab Skinny: do not try to create a wmem_strbuf whose size is bigger than the max size allowed
While we are at it, fix errors spotted by the pre-commit tools/SkinnyProtocolOptimized

Bug: 10409
Change-Id: Ic84632e0563f801239603534121e3487cf0d6d24
Reviewed-on: https://code.wireshark.org/review/3861
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-26 12:07:44 +00:00
Diederik de Groot 7fab56afb5 Skinny: packet-skinny
Add tools path to the python search path, fixing cog.py generation of package-skinny.c from packet-skinny.c.in
Add GPLv2 License to parse_xml2skinny_dissector.py

Change-Id: I91b76867b02d8cebc40bba35151db48bc2fcaeca
Reviewed-on: https://code.wireshark.org/review/3819
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-25 04:23:17 +00:00
Diederik de Groot 276a697a6b [RFC] Skinny: Rewrite using automatic code generation
Support: Protocolversion 0 - 22
Includes: Callmanager to/from Cisco Phones, Inter CallManager Messages and CallManager to/from Cisco ASA
Code Generator not included, because protocol does not evolve anymore / No newer versions to be expected
Fixed: Added more readable information for SoftKeyTemplateRes and SoftKeySetRes, Added Bitfield processing, Added Longer Field Descriptions
Fixed: message_handle array overrun, message_ids, hf_skinny fields format
Fixed: dialedNumber Message, Setting data on si->fields (tap.h)
Fixed: Comments made by Peter Wu
Added: Code Generator Sources
Fixed: hf_skinny blurp, XML Truncation, Updated ButtonTemplate, SoftKeyTemplate and SoftKeyRes presentation
Fixed: EnblocMessage, DialedNumberMessage
Added: DisplayLabels
Added: dissect_skinny_DisplayLabel function to Lookup and Translate in the phone embedded strings to human readable form
Fixed: CallInfoV2, OpenReceiveChannelAck, KeypadButton when generated by a 7912 running old firmware.
Fixed: Made changes requested by Peter Wu, in last 2 reviews
Fixed: ConfigStatV2, ServerRes
Fixed: Comment made by Michael Mann
Fixed: CheckAPI.pl / Petri Dish
Fixed: Included packet-skinny.h and epan/dissectors/packet-skinny.h.in -> Petri Dish

Change-Id: Ic2d2ead8ff0ce80668c9b2e249ce69f53e25a383
Bug: 10262
Reviewed-on: https://code.wireshark.org/review/2921
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-24 12:55:10 +00:00