Commit graph

74 commits

Author SHA1 Message Date
Evan Huus
37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman
b848149964 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48428
2013-03-19 21:06:52 +00:00
Anders Broman
04766017df - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48282
2013-03-13 21:14:20 +00:00
Anders Broman
221b249acd svn path=/trunk/; revision=48272 2013-03-12 21:58:04 +00:00
Bill Meier
6549fbbad7 #if 0 unused hf[] entries & etc.
Note: All (or almost all) unused hf[] entries
       in non-generated Wireshark dissectors
       have been #if 0'd (or commented) out.
       (This applies only to 'static hf_...' vars).
      A number of (non-generated) dissector
       files with *missing* hf[] entries
       still need to be fixed.


svn path=/trunk/; revision=47459
2013-02-03 22:29:48 +00:00
Bill Meier
c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Jeff Morriss
0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Bill Meier
82d40100d2 Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)'
Done on general principles altho upon inspection
none of the cases changed would have actually
resulted in an infinite loop.



svn path=/trunk/; revision=45478
2012-10-11 19:39:32 +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
Michael Mann
6c0e747f61 use session allocated memory for rtp_add_address/srtp_add_address hash tables
svn path=/trunk/; revision=44571
2012-08-19 00:21:26 +00:00
Bill Meier
9315a45deb From Evan Huus: fix "Unused variable in packet-ansi_a.c"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7447

svn path=/trunk/; revision=43598
2012-07-07 14:11:38 +00:00
Jakub Zawadzki
b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier
91e5923458 Fix some "warning: Value stored to '...' is never read" clang scan-build warnings.
Also; Do some whitespace cleanup in a few cases.

svn path=/trunk/; revision=42715
2012-05-19 14:20:55 +00:00
Anders Broman
fec452c2b1 Fix Bug 7119 ANSI MAP infinite loop.
Make conumed a guint16 to avoid wrapping add expert items.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7119

svn path=/trunk/; revision=42129
2012-04-18 11:12:15 +00:00
Anders Broman
fc41d4ad51 From Evan Huus:
Duplicate and misplaced 'break' statements.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7106

svn path=/trunk/; revision=42091
2012-04-16 08:39:34 +00:00
Guy Harris
fd8beeae21 Global variables considered harmful. Pass pinfo along as a parameter;
this appears to fix bug 6823 (the actual crash was a null pinfo being
passed to call_dissector()).

svn path=/trunk/; revision=40962
2012-02-11 02:31:52 +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
Bill Meier
4e57694d4a 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_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Chris Maynard
0dcd4ac28c In elem_cell_id_aux(), in the case of an unknown/invalid disc, be sure to
increment the curr_offset by the correct number of bytes; otherwise we can run
into an infinite loop condition such as was the case for bug 6044.

Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6044


svn path=/trunk/; revision=37930
2011-07-07 16:37:33 +00:00
Bill Meier
62cea3bb0a #include <stdlib.h> not required;
Whitespace cleanup.

svn path=/trunk/; revision=36904
2011-04-27 17:00:04 +00:00
Bill Meier
abf57a9af2 From Yaniv Kaul:
Some fixes for 'set but not used' errors that GCC 4.6 emits.

svn path=/trunk/; revision=36903
2011-04-27 16:34:37 +00:00
Stephen Fisher
e7a716144d Use _U_ for unused function parameters instead of assigning a variable
to itself.  Found by clang compiler.


svn path=/trunk/; revision=36813
2011-04-22 15:53:34 +00:00
Stig Bjørlykke
4f809a7e67 One more unused argument.
svn path=/trunk/; revision=36690
2011-04-17 19:17:46 +00:00
Stig Bjørlykke
d6e7705c96 Mark unused arguments with _U_.
svn path=/trunk/; revision=36688
2011-04-17 19:04:54 +00:00
Stig Bjørlykke
95447e23f8 Removed unneeded assignments to self.
Found by clang.

svn path=/trunk/; revision=36687
2011-04-17 19:01:26 +00:00
Gerald Combs
da198b3083 Fix gcc compilation errors.
svn path=/trunk/; revision=35986
2011-02-17 20:31:11 +00:00
Gerald Combs
1b0516a27e Fix various Visual C++ analysis warnings.
svn path=/trunk/; revision=35985
2011-02-17 19:43:16 +00:00
Anders Broman
735709bee6 Add tvb_bcd_dig_to_ep_str()
/*
 * Given a tvbuff, an offset into the tvbuff, and a length that starts
 * at that offset (which may be -1 for "all the way to the end of the
 * tvbuff"), fetch BCD encoded digits from a tvbuff starting from either 
 * the low or high half byte, formating the digits according to an input digit set, 
 * if NUll a default digit set of 0-9 returning "?" for overdecadic digits will be used.
 * A pointer to the EP allocated string will be returned.
 * Note a tvbuff content of 0xf is considered a 'filler' and will end the conversion.
 */

svn path=/trunk/; revision=35286
2010-12-28 12:36:26 +00:00
Guy Harris
a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Stig Bjørlykke
bfc709b0d1 Use printf modifier %u for guint32 values.
svn path=/trunk/; revision=35211
2010-12-17 13:03:34 +00:00
Bill Meier
e7568712ef Define some fcns & vars as static;
Minor whitespace and comments cleanup.

svn path=/trunk/; revision=34477
2010-10-11 19:00:55 +00:00
Anders Broman
4e907d2a70 From Michael Lum:
ANSI-A dissector does not recognize service option 73
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5176

svn path=/trunk/; revision=34050
2010-09-03 06:18:29 +00:00
Jeff Morriss
bd215f90bc Followup to rev 23668: ansi_a_ios501_elem_1_strings[] and
ansi_a_ios401_elem_1_strings[] are different lengths so use 'ansi_a_elem_1_max'
to know how far we can look into the array (instead of ANSI_A_E_NONE).
Since that variable points to the end of the array--a NULL entry--and since we
don't want to pass a NULL string pointer to proto_tree_add*(), ensure that
we only look at the last valid entry.

Also remove check_col() calls and reindent a bit.

svn path=/trunk/; revision=32901
2010-05-19 20:42:53 +00:00
Jeff Morriss
67b7737481 Fix the build
svn path=/trunk/; revision=32467
2010-04-14 21:38:08 +00:00
Anders Broman
83ce037aa9 Use the sample rate from SDP info in RTP stream analysis.
svn path=/trunk/; revision=32466
2010-04-14 20:48:37 +00:00
Bill Meier
09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Guy Harris
85a6e18cc1 Squelch some compiler warnings.
svn path=/trunk/; revision=32243
2010-03-19 08:37:34 +00:00
Kovarththanan Rajaratnam
65c53fedb6 Don't guard col_append_str with check_col
svn path=/trunk/; revision=30125
2009-09-24 20:00:21 +00:00
Stig Bjørlykke
b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman
3a11073d6b Get info about media type(Video or not) a first step towards usage in rtp statistics.
svn path=/trunk/; revision=28415
2009-05-19 18:42:33 +00:00
Guy Harris
ad33ca6c2f Clean up some 64-bit issues.
svn path=/trunk/; revision=28117
2009-04-22 03:07:37 +00:00
Anders Broman
40b778e01c From Michael Lum:
MEID digit translation fix.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3341

svn path=/trunk/; revision=27795
2009-03-19 06:41:41 +00:00
Anders Broman
dd90adfe90 From Michael Lum:
More dissection of IOS parameters in ANSI MAP IOS Invoke/Response Data
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3323

svn path=/trunk/; revision=27695
2009-03-11 06:27:40 +00:00
Anders Broman
f638e28b21 From Michael Lum:
pESN detection fix and additional dissection enhancements.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3254

svn path=/trunk/; revision=27587
2009-03-03 19:22:54 +00:00
Anders Broman
92fb6ca65f From Michael Lum:
Minor enhancement for for MEID/pESN
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3100

svn path=/trunk/; revision=27079
2008-12-22 12:05:56 +00:00
Bill Meier
c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Anders Broman
4ab1deefc0 From Michael Lum:
RFC3558 header dissection (EVRC in RTP)

svn path=/trunk/; revision=26853
2008-11-26 20:59:44 +00:00
Stig Bjørlykke
d0e33bc3c5 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26646
2008-10-31 14:07:23 +00:00
Bill Meier
1a7111b603 Minor revision related to proto_reg_handoff ...
svn path=/trunk/; revision=26252
2008-09-23 00:55:28 +00:00
Bill Meier
8d9c5d9b2b Cleanup related to prefs & proto_reg_handoff
svn path=/trunk/; revision=26124
2008-09-02 21:40:46 +00:00