aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ncp2222.py
AgeCommit message (Collapse)AuthorFilesLines
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-29NCP2222: change ncp.nds_return_all_classes filter type from FT_STRING to ↵Pascal Quantin1-1/+1
FT_UINT32 Otherwise a call to proto_tree_add_uint_format_value will trigger an assert Bug: 11550 Change-Id: Ic30b07a424cd94b861cee8999b91154ceeb72469 Reviewed-on: https://code.wireshark.org/review/10689 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-25ncp2222: Use BASE_CUSTOM for date and time fields.Michael Mann1-18/+15
This simplifies some of the logic required for field formatting. Change-Id: I2f9a612b18e3e4ca01311683d9cf61cbad9950f4 Reviewed-on: https://code.wireshark.org/review/10649 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-25Convert dissect_nds_request and dissect_nds_reply to use proto_tree_add_xxx ↵Michael Mann1-13/+24
directly instead of the homegrown nds_val. Change-Id: Ie67892caec2cddee591631045233f8a3f1cc0bc6 Reviewed-on: https://code.wireshark.org/review/10648 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-25Refactor NCP Python data so that INFO column can be generated on the fly ↵Michael Mann1-462/+498
(TAKE 2) The "old" method of populating the INFO column was to dissect all fields of a function/subfunction, then do a search in the tree to find the hf_ values of interest to then format into something for the INFO column. This is very expensive and requires "low level" APIs (for tree manipulation) which really shouldn't be used in a dissector. The "new" method populates the INFO column at the same time a field is parsed, so nothing has to be revisited (and allows for more fields to be displayed on some malformed packets). There are still expert infos (and possibly column APIs) under if (tree)s, but I'm not sure how FAKE_TREE_IS_VISIBLE factors into that. Removing the FAKE_TREE_IS_VISIBLE seems to negatively affect dissection. Change-Id: Ie487e851c2f6558dd12f0c7010757b4a5f36226b Reviewed-on: https://code.wireshark.org/review/10631 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-22Revert "Refactor NCP Python data so that INFO column can be generated on the ↵Michael Mann1-471/+455
fly." This reverts commit 38b6f306a70905be8b29ffaeb75288d315ff9b04. Change-Id: I6ec83b94811be7699880e9a741c68faaac175bd0 Reviewed-on: https://code.wireshark.org/review/10613 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-19Refactor NCP Python data so that INFO column can be generated on the fly.Michael Mann1-455/+471
The "old" method of populating the INFO column was to dissect all fields of a function/subfunction, then do a search in the tree to find the hf_ values of interest to then format into something for the INFO column. This is very expensive and requires "low level" APIs (for tree manipulation) which really shouldn't be used in a dissector. The "new" method populates the INFO column at the same time a field is parsed, so nothing has to be revisited. There are still expert infos (and possibly column APIs) under if (tree)s, but with the FAKE_TREE_IS_VISIBLE "hacks" removed, there should be less fear in removing the tree checks. Change-Id: I847827395fc28704f468df8bc8b47b297dde8479 Reviewed-on: https://code.wireshark.org/review/10572 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-19Some more ncp2222 improvementsMichael Mann1-544/+568
Including: 1. Using ENC_BIG_ENDIAN and ENC_LITTLE_ENDIAN instead of self made macros 2. Creating an "expert info hook" so that fields can be parsed "in real time" and added as expert info instead of searching by field name and manually getting values. Most of the expert info is still under if (tree)s, but this is another step closer to removing all of the "manual labor" done that requires "special handling" of all tree functionality. Once the "manual labor" is removed, this dissector can behave like every other dissector and the if (tree)s can be removed with more abandon. Change-Id: If2c6a4c723e12e070e68d6df2d492d4b5ac35123 Reviewed-on: https://code.wireshark.org/review/10555 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-17ncp2222 - Convert process_bitfield -> proto_tree_add_bitmask and other cleanup.Michael Mann1-10/+121
The dissector is doing a lot of unnecessary "manual" operations. Start the process of simplifying that to encourage use of general APIs and put control of the "field name" in the hands of the hf_ entry it belongs with. Change-Id: I5b048c04858ac4a846a276ba12d61c665deb66f8 Reviewed-on: https://code.wireshark.org/review/10547 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-15ncp2222 Updatesgmor1207@gmail.com1-195/+516
Modifications to ncp2222.py Add absolute time values eptime for file/volume info Add support for 64 bit File Transfer NCP's (22/54, 22/55, 22/56, 22/57, 22/58, 87/70, 87/71, 87/72, 87/73, 89/41, 123/35) Fix numerous dissection errors in NWInfo and ExtNWInfo structures Fix some indention (white space) in source Modifications to packet-ncp2222.inc Change seq count rollover value to 16 instead of 255 to make it more robust Add ncp 87,72 reply Add ncp 8x20 request Fix ncp 8x20 reply Change-Id: I80bdcc5854c02edd4ea51c74aa0bbc9c0e062bc1 Reviewed-on: https://code.wireshark.org/review/10017 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-09-12Eliminate proto_tree_add_text from packet-ncp2222.incMichael Mann1-1/+22
Change-Id: I551204d7546c05ab277bbb299a44b4625475d1a0 Reviewed-on: https://code.wireshark.org/review/10501 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-08NCP2222.py : fix generate indent (use 4 spaces)Alexis La Goutte1-64/+64
Change-Id: Ibe55260e837f0a839649675c08e1bf66d8bcdb52 Reviewed-on: https://code.wireshark.org/review/9924 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-01Add tshark -z "ncp,srt"Michael Mann1-132/+0
Change-Id: Iab2559c2bac5550987c108c6e917506fcec525e9 Reviewed-on: https://code.wireshark.org/review/8221 Reviewed-by: Michael Mann <mmann78@netscape.net> 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-01-18Remove some apparently-unnecessary includes of emem.h.Guy Harris1-1/+0
Change-Id: Id50ce3e707056cca8f30052f05c451ce431b39b5 Reviewed-on: https://code.wireshark.org/review/6632 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-04Rename some filter names to fix cases of duplicate filter names.Bill Meier1-1/+1
Note: Use of most of these filter names could have caused a Wireshark crash. Change-Id: I393402a25dd26d174baff77f4706f6d5f43a94ae Reviewed-on: https://code.wireshark.org/review/5610 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-02-14Remove $Id$ and other Subversion leftovers from the tools.Jeff Morriss1-3/+0
There are a few things in here which could still use attention. Don't regenerate anything now. Change-Id: I283c224d3523212144707fca3d6265916cb11792 Reviewed-on: https://code.wireshark.org/review/205 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2013-12-18Fix [-Wmissing-prototypes]Anders Broman1-0/+1
svn path=/trunk/; revision=54209
2013-12-03Dissectors should not use dfilter.h, don't include it.Jakub Zawadzki1-0/+1
XXX ncp2222 dissector is using dfilter_compile(), why? svn path=/trunk/; revision=53766
2013-12-01Use 4-space (PEP 8) indentation. Add modelines.Gerald Combs1-0/+12
svn path=/trunk/; revision=53685
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-11-10Move struct _ftype_t + callback typedefs + free macro to ftypes-int.hJakub Zawadzki1-0/+1
svn path=/trunk/; revision=53223
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-09-08Add filterable expert info to NCP dissector.Michael Mann1-0/+39
svn path=/trunk/; revision=51833
2013-08-02Make sure we're compatible with Python 2 + 3. Tested with Pythons 2.5,Gerald Combs1-13350/+13355
2.7, and 3.3. The contents of packet-ncp2222.c are different after the changes (e.g. some array contents are in a different order) but the output of running 'tshark -nVxr' on the NCP files in the menagerie are identical. svn path=/trunk/; revision=51123
2013-04-10Use consistent "generated automatically" wording which will hopefully beGerald Combs1-1/+1
picked up by licensecheck. svn path=/trunk/; revision=48812
2013-02-26it's ==> its & its ==> it's as needed.Bill Meier1-1/+1
svn path=/trunk/; revision=47898
2013-02-15Comment out a number of unused hf[] enrries found by checkhf.Bill Meier1-10/+30
svn path=/trunk/; revision=47670
2012-09-27Added additional server information in NCP 23/17 reply structure for OES Linux.Greg Morris1-1/+13
Fixed GTKHash table being overwritten when number of NCP packets exceeds 255. Sequence numbers wrap so this was causing the request value table to be overwritten and subsequent malformed NCP packets. Fixed buid_expert_data for file open reporting to correctly convert to Hex value so proper lookup in val table will succeed. Added additional OES Linux values to build_expert_data for server entries. svn path=/trunk/; revision=45177
2012-09-19We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=44997
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-2/+2
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-0/+4
svn path=/trunk/; revision=35705
2010-11-01Compile (over 100) dfilters only if needed rather than at every Wireshark ↵Bill Meier1-31/+10
startup; Also: Minor whitespace cleanup. svn path=/trunk/; revision=34747
2010-10-10Define some fcns & vars as static...Bill Meier1-2/+2
svn path=/trunk/; revision=34459
2010-02-02Added protocol name to "Reassembled length" text.Guy Harris1-1/+1
svn path=/trunk/; revision=31775
2010-02-02Add a field for the reassembled length.Guy Harris1-0/+4
svn path=/trunk/; revision=31769
2010-02-02Clean up white space.Guy Harris1-903/+890
svn path=/trunk/; revision=31768
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-6/+6
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL == (int)BASE_NONE, so there's no source or binary compatiblity issue, although we might want to eliminate BASE_NONE at some point and have the BASE_ values used with integral types start at 0, so that you can't specify BASE_NONE for an integral field. svn path=/trunk/; revision=31319
2009-09-12Move all of the scripts in epan/dissectors/ to tools/ .Jeff Morriss1-0/+16420
Add a target ("x11-dissector") to build the X11 dissector. Put the X11-related files (back) in the source distribution. svn path=/trunk/; revision=29871