Commit Graph

174 Commits

Author SHA1 Message Date
Dario Lombardo 7fea55a054 Fixup: ep_address_to_str -> address_to_str
Change-Id: Id49ba07e32a71357b50b32de7cecfd80e412d508
Reviewed-on: https://code.wireshark.org/review/2379
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:22:02 +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
Dario Lombardo 971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Pascal Quantin 828bb24226 Partly revert fdeed480bf
wmem_packet_scope() cannot be used outside of a packet treatment

Change-Id: I6e545bbb51f325b366288f17358f9d2347a7d7c4
Reviewed-on: https://code.wireshark.org/review/977
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-06 10:18:15 +00:00
Michael Mann fdeed480bf Convert ep_address_to_str -> address_to_str(wmem_packet_scope, ...) for all dissectors
Change-Id: I7489e2fb3a1f2630ca17b0a5fe1aa873992f1061
Reviewed-on: https://code.wireshark.org/review/975
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-06 01:31:28 +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
Alexis La Goutte 5c1a348a8d Make checkAPI Happy
Change-Id: I885fb33685eb0ff06a1cf97e6cd671e6b6ee2eaa
Reviewed-on: https://code.wireshark.org/review/215
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-14 15:03:32 +00:00
Owen Williams 3a4f762bfc New RTCP REMB dissector – Bug 9757
Change-Id: I0f455f58bdec8dc3787da96a3bfc43ac41dc48f8
Reviewed-on: https://code.wireshark.org/review/202
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-14 13:51:24 +00:00
Jakub Zawadzki deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
Anders Broman b781d6c99d - Make local functions static.
- Forward declaration of register functions.

svn path=/trunk/; revision=53958
2013-12-12 06:11:05 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Michael Mann 02a8391535 Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new.
svn path=/trunk/; revision=53049
2013-11-02 15:52:25 +00:00
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Michael Mann 346f803d42 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +00:00
Martin Kaiser 04ec29b391 emem -> wmem
svn path=/trunk/; revision=52075
2013-09-15 18:20:25 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Michael Mann e5e4d357e3 Batch of filterable expert infos.
svn path=/trunk/; revision=51518
2013-08-25 21:01:11 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Jaap Keuter be66273ae4 Mark unavailable XR record elements more clearly then just a comment.
svn path=/trunk/; revision=48824
2013-04-11 19:54:16 +00:00
Alexis La Goutte 03370667f5 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48503
2013-03-23 13:08:21 +00:00
Anders Broman b7617b32eb From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48383
2013-03-17 22:16:39 +00:00
Bill Meier 1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Bill Meier d3a7f4b817 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).

svn path=/trunk/; revision=47390
2013-01-31 18:31:28 +00:00
Bill Meier 0960e508e4 Comment out cases of unused hf array entries found by checkhf.
svn path=/trunk/; revision=47302
2013-01-26 18:54:53 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Chris Maynard e6983eb890 Avoid potential infinite loops. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7879
#BACKPORT (1.8, 1.6)

svn path=/trunk/; revision=45717
2012-10-22 16:22:21 +00:00
Anders Broman 4209300f48 Replace non ASCII chars.
svn path=/trunk/; revision=45421
2012-10-09 10:26:43 +00:00
Jaap Keuter d08697130f Add initial support for three new RTCP packet types: AVB, RSI and TOKEN.
svn path=/trunk/; revision=45416
2012-10-09 06:41:32 +00:00
Guy Harris 141200fa86 Show the PID field of the transport feedback NACK as "RTCP Transport
Feedback NACK PID", not just as "RTCP Transport Feedback NACK", and give
the field a name for that.

Use it in the protocol tree for the bits of the BLP field, rather than
making it a hidden field there.

Clean up the tags appended to the BLP field.

svn path=/trunk/; revision=45157
2012-09-26 20:19:20 +00:00
Guy Harris 0ac06207ce Just append the ": " to the generic NACK BLP item, don't replace its
text.

Don't put empty items into the bitfield tree.

Show the BLP field as hex, as it's a bitfield.

(What should *really* happen is that it should display each 1 bit in the
usual fashion, with the ".... ...1 .... ...." display, but have that bit
be an *integral* field with the appropriate PID for the NACKed packet -
i.e., display hf_rtcp_rtpfb_nack_pid, with the value
rtcp_rtpfb_nack_pid + i + 1, and with the bitfield stuff in the
displayed representation.)

svn path=/trunk/; revision=45155
2012-09-26 19:23:33 +00:00
Michael Mann 97c808c75c replaced decode_boolean_bitfield calls with itemized filters
svn path=/trunk/; revision=45152
2012-09-26 18:10:29 +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
Anders Broman 227327a1e6 Mark pinfo as unused.
svn path=/trunk/; revision=43927
2012-07-23 13:27:16 +00:00
Michael Mann a6af1fae2a Add dissector tables for RTCP extended feedback messages (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5764)
svn path=/trunk/; revision=43926
2012-07-23 11:58:51 +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
Pascal Quantin a2a9d5757a Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7386 :
Fix dissection of Packet Receipt Times Report Block

svn path=/trunk/; revision=43467
2012-06-24 21:26:40 +00:00
Bill Meier e332a8de56 Fix the fix ....
svn path=/trunk/; revision=42685
2012-05-17 20:36:23 +00:00
Bill Meier 47828c3170 Silence a "may be used uninitialiuzed" warning.....
svn path=/trunk/; revision=42684
2012-05-17 20:30:59 +00:00
Bill Meier bab856a504 General cleanup including as appropriate:
- Remove unneeded #include files (string.h, addr_resolv.h);
 - Remove unneeded 'if(!initialized){...}' in proto_reg_handoff();
 - Reformat hf[] entries;
 - Remove unneeded variable initializations;
 - "localize" some variables;
 - Whitespace/indentation/long lines/formatting
(in one case: re-order code slightly to not do col_set_str() & etc until
              after initial "frame acceptance testing" by dissector.

svn path=/trunk/; revision=42683
2012-05-17 20:13:22 +00:00
Jeff Morriss 080ad215a3 As suggested in http://www.wireshark.org/lists/wireshark-dev/201204/msg00062.html :
Don't use ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN with ENC_ASCII: ASCII has no
endianism, so ENC_NA is more appropriate.

svn path=/trunk/; revision=42432
2012-05-04 23:49:07 +00:00
Bill Meier 86f7bff724 Fix incorrect packet-details display of certain 1 bit FT_BOOLEAN fields.
(Use a valid 'parent field width' in the hf[] 'display' field.

svn path=/trunk/; revision=41396
2012-03-07 15:39:39 +00:00
Bill Meier c4b63360dc Fix proto_tree_add_item( encoding args;
Do whitespace cleanup (for a few files).

svn path=/trunk/; revision=39640
2011-10-27 20:30:38 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00