Commit Graph

278 Commits

Author SHA1 Message Date
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
Martin Kaiser fba61a31be add ssl detection to proto_get_frame_protocols()
svn path=/trunk/; revision=54439
2013-12-24 13:44:00 +00:00
Guy Harris 0d7a48a8bf Add a ENC_3GPP_TS_23_038 encoding, for the standard SMS alphabet in a
bit-packed string, and use it in some places.

svn path=/trunk/; revision=54428
2013-12-24 00:20:09 +00:00
Guy Harris fc7a77189d Add UCS-4 support, and use it.
Shuffle the character ENC_ values around a bit, keeping the Unicode
encodings together, moving the Windows code pages (only one for now)
after the ISO 8859 encodings, and putting "I can't believe it's not
ASCII!" at the end.

Fix some comment typoes, and update another comment, while we're at it.

svn path=/trunk/; revision=54351
2013-12-22 08:45:57 +00:00
Guy Harris f231a273f2 Add the rest of ISO-8859-n, thanks to Jakub's "generate a mapping table"
program.

Put the character-encoding cases in order.

svn path=/trunk/; revision=54344
2013-12-21 21:55:46 +00:00
Jakub Zawadzki 099294dd16 Add charset table for ISO/IEC 8859-9 (ENC_ISO_8859_9)
svn path=/trunk/; revision=54239
2013-12-18 23:32:06 +00:00
Martin Kaiser a07c0ff146 add support for ISO 8859-5
svn path=/trunk/; revision=54132
2013-12-15 19:13:31 +00:00
Gerald Combs 5be6dd5feb Remove config.h includes from proto.h and tap.h.
svn path=/trunk/; revision=53913
2013-12-10 20:23:33 +00:00
Jakub Zawadzki 5fa7d37e37 Fix epan building with undefined HAVE_PLUGINS
+ guard prototypes with HAVE_PLUGINS in .h files to get errors before linking.

svn path=/trunk/; revision=53909
2013-12-10 19:13:09 +00:00
Pascal Quantin a944c8ef7a Remove proto_tree_add_unicode_string()
svn path=/trunk/; revision=53869
2013-12-08 20:15:07 +00:00
Guy Harris b4b18b314a Expand a comment.
svn path=/trunk/; revision=53839
2013-12-08 01:21:58 +00:00
Guy Harris 562348fbb8 Add ENC_ISO_8859_1.
Move the Wikipedia links for the code page layouts in front of the
tables whose contents reflect the code page layouts.

svn path=/trunk/; revision=53837
2013-12-08 01:05:35 +00:00
Jakub Zawadzki 0e5bc8a49c Add string encoding for ISO/IEC 8859-2 (ENC_ISO_8859_2)
svn path=/trunk/; revision=53826
2013-12-07 15:02:55 +00:00
Jakub Zawadzki ffb4e79de9 Add STR_ASCII, STR_UNICODE as possible displays for field_display_e
svn path=/trunk/; revision=53822
2013-12-07 11:50:43 +00:00
Jakub Zawadzki c67d38cf15 Rename base_display_* to field_display
This is preparation to support ->display for FT_STRING values.

svn path=/trunk/; revision=53820
2013-12-07 10:41:42 +00:00
Jakub Zawadzki 113b078a4d Add new string proto encoding for windows-1250 (ENC_WINDOWS_1250)
- Move windows-1250 to unicode encoding table to charset.c
- Add tvb_get_string_unichar2, tvb_get_stringz_unichar2 functions which recode tvb-string to UTF-8.

svn path=/trunk/; revision=53819
2013-12-07 10:10:03 +00:00
Jakub Zawadzki b75354ebe8 Avoid including <epan/epan.h> in dissectors.
svn path=/trunk/; revision=53774
2013-12-03 23:49:51 +00:00
Guy Harris 0cc1545d05 Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins.  Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.

In particular applications, only process the relevant plugin types.

Add a Makefile.common to the codecs directory.

svn path=/trunk/; revision=53710
2013-12-02 08:30:29 +00:00
Gerald Combs b3a24c5cc4 Replace similar code with a common routine.
svn path=/trunk/; revision=53519
2013-11-23 01:06:30 +00:00
Jakub Zawadzki b5916f0f12 Expand CHECK_DISPLAY_AS_X ('this macro looks like a hack') macro in packet-ieee80211.c, remove it.
svn path=/trunk/; revision=53327
2013-11-14 22:40:40 +00:00
Jakub Zawadzki 6f6d04e2f9 Move REPORT_DISSECTOR_BUG() body to proto_report_dissector_bug() function. Remove exceptions.h include from proto.h
svn path=/trunk/; revision=53231
2013-11-10 16:04:15 +00:00
Jakub Zawadzki 8b73d378a4 exceptions.h not needed by tvbuff.h (no much progress because it's needed by proto.h)
svn path=/trunk/; revision=53219
2013-11-10 11:48:03 +00:00
Jörg Mayer 7c2c2d89f5 Fix:
cd /home/jmayer/work/wireshark/svn/build/qt-gtk3/epan && /usr/bin/cc  -DG_DISABLE_DEPRc
In file included from /home/jmayer/work/wireshark/svn/trunk/epan/packet.h:29:0,
                 from /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-2dp:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-2dparityfec.c: In functio:
/home/jmayer/work/wireshark/svn/trunk/epan/proto.h:2128:2: error: ISO C90 forbids mixe]
  extern header_field_info __start__data_ ##proto[]; \
  ^
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-2dparityfec.c:331:4: note’
    proto_register_fields(proto_2dparityfec, hfi, array_length(hfi));
    ^
cc1: all warnings being treated as errors


svn path=/trunk/; revision=53152
2013-11-08 00:01:19 +00:00
Jakub Zawadzki 1dffd1a949 GCC on amd64 align header_field_info variables to 16-bytes, this cause problems with proto_register_fields_section().
sizeof(void *) alignment should be enough, use it in HFI_INIT.

This fixes http://www.wireshark.org/lists/wireshark-dev/201311/msg00069.html

svn path=/trunk/; revision=53150
2013-11-07 23:20:06 +00:00
Jakub Zawadzki ce6ca9a05d Add infrastructure for section-initializing protocol hfis (without array).
configure implementation later.

svn path=/trunk/; revision=53146
2013-11-07 20:14:18 +00:00
Evan Huus 8a0ef07000 Effectively remove the tree memory pool and port some of its behaviour to the
pinfo memory pool, they have exactly the same scope. Simplification and minor
performance win (one GHashTable we longer have to create/destroy on every
packet).

svn path=/trunk/; revision=53076
2013-11-04 14:12:59 +00:00
Jakub Zawadzki bad81b517f Reintroduce back epan_dissect_reset(), proto_tree_reset()
This time it makes more sense, cause for each dissection we need two wmem allocators.
Reseting wmem allocator is much faster than destroy & create.

svn path=/trunk/; revision=52706
2013-10-20 10:21:25 +00:00
Evan Huus c2b2d204db Redo r52569 in a way that doesn't break the GUI. Add a mem_pool member to
tree_data and reference it directly when allocating/freeing tree items. This
lets us keep multiple around when we need them, and still lets us use
wmem_free_all for a major speedup. It also, coincidentally, lets us get rid of
the annoying fi_tmp hack that was needed before, since that element gets swept
up in the free_all with everything else.

Keep one pool cached to avoid creating/destroying a pool for each packet,
another minor performance win.

The various changes in approach seem to balance out pretty much exactly, this
still gives ~11% over pre-52569.

svn path=/trunk/; revision=52573
2013-10-12 21:01:17 +00:00
Michael Mann a891f3e70b Make expert items used in "low level" proto functions filterable (and ensure they are called even with a NULL tree). I don't really like the Type Length Mismatch "protocol", but it doesn't seem that much different than the exception "protocols".
svn path=/trunk/; revision=52341
2013-10-03 01:54:02 +00:00
Jörg Mayer 1e762e315d Remove epan.h from ftypes.h, address.h and tpg.h,
add it to proto.h as it contains macros that require emem.h

svn path=/trunk/; revision=52001
2013-09-13 09:13:09 +00:00
Guy Harris 8d8c56d3e4 Note what the various ENC_TIME_ encodings are.
svn path=/trunk/; revision=51980
2013-09-12 20:30:55 +00:00
Evan Huus f8693e35e0 From RobiOneKenobi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9072
Add support for Time-of-Day timestamp format from z/OS.

svn path=/trunk/; revision=51974
2013-09-12 16:56:37 +00:00
Jakub Zawadzki 401cdb009e Convert more dissectors to use hfinfo instead of hfindex.
svn path=/trunk/; revision=51478
2013-08-22 20:54:50 +00:00
Jakub Zawadzki 4e870dd240 Fix few concept of new api tree:
- (for now) keep ABI, restore prototype of old proto_tree_add_item, add new proto_tree_add_item_new
- add few helpers for boolean, time, string which will do ->id
- don't use HFI_INIT directly, use it by another macro (MSVC has very small limit for section name)

svn path=/trunk/; revision=51401
2013-08-17 07:16:12 +00:00
Jakub Zawadzki 9d79b3233a Introduce new proto_tree API required for hf_ variables removal.
svn path=/trunk/; revision=51396
2013-08-16 21:21:52 +00:00
Alexis La Goutte c47aad79dd Fix (-W)documentation error found by Clang
In file included from ../../epan/packet.h:29:
./../proto.h:1775:16: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 @param protocol
 ~~~~~~~~~~~~~~^
./../proto.h:1947:13: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 @param flags
 ~~~~~~~~~~~^

svn path=/trunk/; revision=51255
2013-08-10 21:28:10 +00:00
Jakub Zawadzki 9cfac1227d Replace hfinfo pointer to same_name_prev, with same_name_prev_id.
svn path=/trunk/; revision=51175
2013-08-06 20:53:47 +00:00
Jakub Zawadzki 72ea2f9c9c Remove hfinfo->bitshift member, add hfinfo_bitshift() to get it.
svn path=/trunk/; revision=51174
2013-08-06 20:10:59 +00:00
Michael Mann 81f3faf1e8 Completely remove support for proto_item_set_expert_flags.
svn path=/trunk/; revision=51144
2013-08-05 02:25:45 +00:00
Jakub Zawadzki 3f9b7e36e9 Reorder field_info structure to remove paddings on 64 bits (8B less).
svn path=/trunk/; revision=51039
2013-07-30 21:09:03 +00:00
Evan Huus 6e3a30794e Add 64-bit value strings and the appropriate tooling (including yet another
overloaded use of the DISPLAY field). Thanks to Jakub for pointing out I'd done
this wrong the first time (months ago in r49357).

Fixes severity display for collectd protocol, originally filed at:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8472

svn path=/trunk/; revision=50935
2013-07-26 21:51:39 +00:00
Jeff Morriss 33cf749c19 Fix up some indentation.
svn path=/trunk/; revision=50697
2013-07-17 14:01:47 +00:00
Jakub Zawadzki 792f35a28c Make tree_is_expanded array static, add setter/getter function.
svn path=/trunk/; revision=50433
2013-07-07 16:33:49 +00:00
Jeff Morriss a441793cba Move a couple of time-related modules into wsutil.
A bunch of files didn't really need to include these header files so remove
the include line rather than changing it.

svn path=/trunk/; revision=50154
2013-06-25 22:02:20 +00:00
Gerald Combs d14fa4914d Add Doxygen boilerplate for some of our core modules and data structures.
svn path=/trunk/; revision=49640
2013-05-30 22:20:21 +00:00
Evan Huus c0c0b10f96 A few more doxygen fix-ups.
svn path=/trunk/; revision=49092
2013-04-30 00:55:03 +00:00
Evan Huus 63ef04ec84 Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.
svn path=/trunk/; revision=49053
2013-04-26 18:28:21 +00:00
Chris Maynard 4ac2441d7c Coalesce "-G fields2" and "-G fields3" into "-G fields", as discussed on -dev.
See: http://www.wireshark.org/lists/wireshark-dev/201304/msg00015.html

svn path=/trunk/; revision=48753
2013-04-05 21:58:43 +00:00
Evan Huus 8569907b9f From Steve Magnani via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8339
This patch adds a new public API, proto_tree_add_bitmask_len(), identical to
proto_tree_add_bitmask() but using a caller-supplied length rather than an
inferred one. The underlying proto_item_add_bitmask_tree() code is modified
to display only fields for which all defined bits are available, and to
ignore bits that have no corresponding defined field ("forward compatibility"
cases).

From me: minor edits, see the bug for more details.

svn path=/trunk/; revision=48049
2013-03-04 14:18:18 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00