aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes
AgeCommit message (Collapse)AuthorFilesLines
2016-06-30Remove Makefile.common filesJoão Valverde2-56/+22
Now that nmake build system has been removed they are not needed anymore. Change-Id: I88075f955bb4349185859c1af4be22e53de5850f Reviewed-on: https://code.wireshark.org/review/16050 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-15Remove Nmake build systemPascal Quantin2-33/+0
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-10ftype-protocol: Fix [-Wcast-qual] warningsJoão Valverde1-13/+13
Change-Id: Ia8a02d8dc66aead486c8ae3f0bdf4cd82717ed20 Reviewed-on: https://code.wireshark.org/review/15817 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-06Move ip6_to_str_buf() to to_str.c and make it take the buffer length.João Valverde1-6/+4
Also make it use ws_inet_ntop6() (rather than implementing the string conversion ourselves). Remove ip6_to_str_buf_len(). Change-Id: I1eff3a8941e00987c2ff0c4dcfda13476af86191 Reviewed-on: https://code.wireshark.org/review/15692 Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-11Run checkAPIs in epan/ftypes/ .Jeff Morriss1-9/+8
Michael cleaned up the strcpy()'s which were preventing it from running without errors. Change-Id: I3f02150a9b1fbefddb67c0cb90fc2c58766d7d2a Reviewed-on: https://code.wireshark.org/review/15375 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10Give FvalueToStringRepr a length parameter.Michael Mann13-55/+55
This allows the conversion of a few straggler strcpy calls in ftype library. Also provides a more accurate size value instead of the many hard coded values the ftypes were using. Change-Id: Ia6273980432e16ad3a6233816a6054d9fed5d2a4 Reviewed-on: https://code.wireshark.org/review/15344 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann2-17/+14
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-06Give the full name of the current version of the IEEE standard in question.Guy Harris1-1/+1
Change-Id: Ia9b41ec4dd29ca7316828f4a3f0b3fd112d83202 Reviewed-on: https://code.wireshark.org/review/15279 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-05Convert ftype-tvbuff.c to ftype-protocol.cMichael Mann18-127/+181
As noted in https://www.wireshark.org/lists/wireshark-dev/201604/msg00103.html a protocol field isn't really a tv_buff, so allow for the possibility of a NULL tv_buff in a "protocol type". If the tvb is NULL, use the string of the protocol field for comparison Bug: 12335 Change-Id: Ie12a5f7b31c7293c61006b0f70135d100a97c4e0 Reviewed-on: https://code.wireshark.org/review/15261 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-02Add checkAPI calls to CMake.Graham Bloice1-0/+10
This generates a top level target, checkAPI, that is excluded from the ALL build target, so must be run separately. On Windows using a Visual Studio generator, call msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj Change-Id: I44a57c564dcfc75499463b942436f4b920a82478 Reviewed-on: https://code.wireshark.org/review/14873 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-03-28Fix warnings/errors of type -Wused-but-marked-unusedJoerg Mayer3-5/+5
Change-Id: I34c2d9953272822da0745d1b24c64d8466e43b37 Reviewed-on: https://code.wireshark.org/review/14668 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-15FT_BOOLEAN is now stored as a 64-bit value; treat it as such.Guy Harris1-7/+7
Always look and set the uinteger64 member of the union for FT_BOOLEAN values. Bug: 12236 Change-Id: I7b0166e564b9d6cbb80051a81714a4b4c5f740a2 Reviewed-on: https://code.wireshark.org/review/14481 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-08Add EditorConfig settings for most C filesJoão Valverde2-0/+42
Change-Id: I02e6d71290bbdf7504437b0d670955b3686b6b52 Reviewed-on: https://code.wireshark.org/review/14360 Reviewed-by: João Valverde <j@v6e.pt>
2016-03-01CMake: Add more structure to libwireshark buildJoão Valverde2-1/+74
Smaller epan/CMakeLists.txt is easier to work with and this structure is well suited to CMake. It should make it easier to manage and configure each epan module differently if necessary. Change-Id: Ia649db3b7dcd405aa43dbdba3288699d5e375229 Reviewed-on: https://code.wireshark.org/review/14068 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21autotools: Use pkg-config autoconf macros for GLib/GTKJoão Valverde1-3/+2
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add dependency flags explicitly instead of using WS_CPPFLAGS. Some minor improvements and fixes for missing/unnecessary variables (no impact on our test builds). Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671 Reviewed-on: https://code.wireshark.org/review/14005 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-28autotools: Don't use "user variables" to set build flagsJoão Valverde1-6/+3
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-12Fix FT_UINT24 comment errorKevin Bracey1-1/+1
Displayed as 6 hex digits, not 3. Change-Id: I61f9b41d4bd846ff74fac24b0651c7243c9c9e51 Reviewed-on: https://code.wireshark.org/review/13235 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-04Rename ipv4_addr and ipv6_addr to indicate their full contents.Guy Harris3-33/+33
They're not just addresses, they also include a mask length for IPv4 and a prefix length for IPv6. Rename them appropriately. Rename the old ipv4_addr_and_mask() and ipv6_addr_and_mask() to reflect that 1) they fetch data from a tvbuff and 2) *don't* fetch the mask length or prefix length, those lengths are passed as arguments to indicate how many bytes worth of address to fetch. Change-Id: I4cad5a186ad7bfcb60022a91dbe8bc8479e6471f Reviewed-on: https://code.wireshark.org/review/13035 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03Rename ipv6-utils.h to ipv6.h.Guy Harris2-2/+2
By analogy to ipv4.h. Change-Id: I147565b332024b1bb88e9cd15889255773d04524 Reviewed-on: https://code.wireshark.org/review/13034 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29Add support for IEEE-11073 FLOATsMichal Labedzki5-0/+1568
Add support for IEEE-11073 32-bit FLOAT and 16 bit SFLOAT field types. Use them in Bluetooth ATT dissector. Change-Id: Ife0f3843da84a9af23483b0a0d9b69cd2f511d08 Reviewed-on: https://code.wireshark.org/review/12680 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-28Save the results of wmem_strndup(NULL, ...) in a non-const pointer.Guy Harris2-27/+30
That way, we have a non-const pointer to use when freeing it, and don't have to undo the constification with a cast. Rename "has_slash" to "slash", while we're at it, as it's not a Boolean indicating whether the string has a slash, it's either a pointer to the slash in question or NULL if the string has no slash. Change-Id: Ia55b39bddb67c8ca71f7b09ee5eb82efaa3bdf0c Reviewed-on: https://code.wireshark.org/review/12891 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-30Add BASE_ALLOW_ZERO for byte arrays that are validly zero sized.Michael Mann1-1/+1
<MISSING> implies that the field should be there and isn't. Allow dissectors to specify when a zero-sized array for a field is perfectly valid. Ping-Bug: 11803 Change-Id: I3fd60e3c6f832c6b4a3a8837ebc52c3e74e795ae Reviewed-on: https://code.wireshark.org/review/12271 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-15Lua: Added support for ProtoField framenum type.Stig Bjørlykke1-1/+2
Change-Id: I1d4cddd4026f08416005f2b3212536b3984d1a8d Reviewed-on: https://code.wireshark.org/review/11834 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-09-17change the representation of an empty byte array in a display filterMartin Kaiser1-6/+14
by default, an empty byte array (FT_BYTES) is represented as an empty string thus, using "Apply as Filter / Selected" on such an item creates an invalid display filter expression, e.g. dvb-ci.mmi.char_tbl== represent an empty byte array as "" if we're compiling a display filter expression Bug: 11526 Change-Id: Ie94507a24a496e0c25bcdadfab72fdf9fb35958a Reviewed-on: https://code.wireshark.org/review/10540 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-07-20Allow EUI-64s to be specified as numbers or byte strings.Guy Harris1-14/+31
They are, after all, really byte strings, just as MAC-48s/EUI-48s are. Clean up some of the integer <-> byte-string trickery a bit, using unions rather than pointer punning. Bug: 11380 Change-Id: I0d9aa3ca7bb6b7e4c75e49a11b13d3d0e5a04473 Reviewed-on: https://code.wireshark.org/review/9727 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24Remove another batch of deprecated tvb_length callsEvan Huus1-16/+16
Change-Id: Icfdde38e40cca05d0705a081153a4ea3e8782ee7 Reviewed-on: https://code.wireshark.org/review/9086 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-20ftypes: display BASE_HEX_DEC integers as hexadecimalPascal Quantin1-2/+2
Bug: 11292 Change-Id: I69a5591996bec77c2cb2bfcd04e9179784470edf Reviewed-on: https://code.wireshark.org/review/8987 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-06-11Replace tabs in files with editor modeline "expandtab"Bill Meier2-7/+7
Change-Id: I4667fd4091c510a4c798f79dae333a07dc42dad6 Reviewed-on: https://code.wireshark.org/review/8880 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-05-07ftypes: display 64 bits BASE_HEX fields as hexadecimalPascal Quantin1-2/+14
Change-Id: Ie9bedf6c17c0a941ebaabd5144460a42eb4ca1ed Reviewed-on: https://code.wireshark.org/review/8336 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-07fix FT_INT64 fields output in tsharkMoeller, Thies1-4/+4
Bug: 11170 Change-Id: Ife7f565d17b92cd5f84e92ce109f530e68d98cfa Reviewed-on: https://code.wireshark.org/review/8333 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-07fix FT_UINT64 fields output in tsharkMoeller, Thies1-1/+1
Bug: 11170 Change-Id: Ica259867e2c8e0b4b680bca94970e13962a8dbb1 Reviewed-on: https://code.wireshark.org/review/8290 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-12One check mark for ACKs, two check marks for dup ACKs.Gerald Combs1-1/+3
Add FT_FRAMENUM_ACK and FT_FRAMENUM_DUP_ACK and set them for tcp.analysis.acks_frame and tcp.analysis.duplicate_ack_frame. Draw a single or double check mark in the packet list accordingly. These are probably specific to TCP, but as it happens there are a lot of TCP packets. Change-Id: I35416506419159a79ad8cc2e35f8a14485edfb7e Reviewed-on: https://code.wireshark.org/review/7568 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12Avoid abort on zero-length fieldsPeter Wu2-2/+4
Since commit v1.99.4rc0-70-g0bec885 (Remove use of sprintf for ftype string formatting), Wireshark aborts with "Null pointer passed to bytes_to_hexstr_punct()". This happened with a SSL capture where the ssl.handshake.extensions_padding_data had a zero length. Fix it by producing a zero-length string instead (as done by the previous implementation). Change-Id: I711d786a9ae692eb44c5e49a30d5fea41c5af31e Reviewed-on: https://code.wireshark.org/review/7649 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-11Remove use of sprintf for ftype string formattingMichael Mann4-61/+40
Change-Id: I656d6193aad740ab88bf16fb25c202e766e3092a Reviewed-on: https://code.wireshark.org/review/7616 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-10Add support to display unsigned integer "field type" in hex.Michael Mann1-5/+20
Ping-Bug: 10318 Change-Id: Idb8790681cda901788df10fc1484179001bbb35c Reviewed-on: https://code.wireshark.org/review/7566 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-05Qt: Add extra related packet indicator types.Gerald Combs1-0/+8
Add the ability to set frame number types: none, request, or response. Use the types to draw different related packet indicators in the packet list. Track the conversation in PacketListRecord. Use it to draw dashed lines for unrelated frames. Set frame number types for DNS and ICMP. Instead of drawing a transparent QImage, alpha blend our foreground color and draw directly in our painter. Blend more toward the foreground color. Add FRAMENUM_TYPE to checkAPIs. Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214 Reviewed-on: https://code.wireshark.org/review/7436 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-2164-bit constants need to be wrapped in G_G{U}INT64_CONSTANT().Guy Harris1-6/+6
Otherwise, they don't get the right suffix to tell the compiler that they're 64-bit even on ILP32 platforms. Change-Id: I5c52a999d21707602e0a4174a142d1d1036242be Reviewed-on: https://code.wireshark.org/review/7297 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-21Ftypes: Double: Minor fixesMichal Labedzki1-6/+8
Fix comments typos and use safe equivalent of sprintf. Change-Id: Icc9d69532dc35e8a58a78c0eacdb42214b679069 Reviewed-on: https://code.wireshark.org/review/7290 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21Make FT_{U}INT64 behave more like FT_{U}INT32, add support for ↵JC Wren14-118/+589
FT_{U}INT{40,48,56} Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19 Reviewed-on: https://code.wireshark.org/review/5813 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-15epan/ftypes/*.[hc]: As needed: Add editor modelines & Fix indentationBill Meier11-1/+144
Change-Id: Ib0bd1ea7801ab450b300a94c4757f16d0dd75760 Reviewed-on: https://code.wireshark.org/review/7137 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-09(Trivial) Fix printf-related 'Mismatch on sign' warningsBill Meier1-1/+1
Found by MSVC2013 Code Analysis Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79 Reviewed-on: https://code.wireshark.org/review/7045 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-19Convert OID APIs to use wmem.Michael Mann1-4/+6
There are a few oid functions that are only called in oids_test.c. I'll presume the APIs are used in proprietary dissectors rather than just remove them. Change-Id: I4595e00f93bf9ab8cf2493fe0432b91960f55a3f Reviewed-on: https://code.wireshark.org/review/6592 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-18Remove some apparently-unnecessary includes of emem.h.Guy Harris2-2/+0
Change-Id: Ib7d1b587b439ff21ec6b7f1756ce6ccf25b66f80 Reviewed-on: https://code.wireshark.org/review/6635 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18ftype (integer): fix Uninitialized argument value found by Clang AnalyzerMichael Mann1-0/+3
Change-Id: I79e893f1d810a90c6a495067941d2e393e9fee72 Reviewed-on: https://code.wireshark.org/review/6501 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris13-180/+221
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18Remove ep_strndupMichael Mann2-12/+24
Change-Id: Id336dc16f97a0973754993094aa637813c0ca31c Reviewed-on: https://code.wireshark.org/review/6604 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-11Replace some "low hanging fruit" uses of emem.Michael Mann1-1/+2
Most of the remaining ep_ uses are grouped with specific functionality. Change-Id: I8fa64a17acc6bcdcf6891b2d28715ac0c58f1a4a Reviewed-on: https://code.wireshark.org/review/6484 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-11Rename the FT_BYTES separator types to SEP_ from BASE_.Guy Harris1-4/+4
There's no requirement for "display" field values to have names beginning with BASE_; use SEP_, to indicate that they're separators. (And, yes, we should introduce SEP_NONE, with a value of 0, and use it.) While we're at it, fix BASE_SEMICOLON - the separator is a colon, not a semicolon - and document SEP_SPACE in doc/README.dissector. Change-Id: I856aafda2c60b8320dffe287f0deb06a9604a2bf Reviewed-on: https://code.wireshark.org/review/6486 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-10Add BASE_SPACE for FT_BYTESMichael Mann1-0/+1
It's just like BASE_DOT, BASE_DASH and BASE_SEMICOLON, only its a space between bytes. Since this seems pretty specific to FT_BYTES, perhaps there is a better was to represent the functionality (like FT_BOOLEAN uses numeric values for number of bits)? Change-Id: I1a8f1ab263ece2736a8012b66fdd6a9105db7282 Reviewed-on: https://code.wireshark.org/review/6451 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-09Some more random removal of ep_ memory.Michael Mann1-3/+3
Change-Id: I6eccd20280e907bd9e6a5fcf873ccf80afddecac Reviewed-on: https://code.wireshark.org/review/6416 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>