Commit Graph

33 Commits

Author SHA1 Message Date
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Bill Meier 91191c6c00 Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
(Code commented out since it may be required in the future (at least in some cases).

svn path=/trunk/; revision=37723
2011-06-20 01:13:21 +00:00
Chris Maynard d6fb7f50df From Romain Fliedel via bug 5947: Fix the mask for extracting FMID.
svn path=/trunk/; revision=37370
2011-05-23 17:53:51 +00:00
Bill Meier 8889f829c0 Use correct subtree in a few cases: Fixes Coverity 921,894,878 & 1136;
svn path=/trunk/; revision=37361
2011-05-23 14:26:43 +00:00
Jaap Keuter e0619af2c8 Further restructure the DECT dissector:
- Refactor capture info, A field, B field dissection.
- Clean up dissection, removing private A field, B field structures.
- Added standard references.

svn path=/trunk/; revision=35743
2011-02-01 22:46:30 +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
Gerald Combs 820be405e2 Fix a buffer overflow found by recent randpkt testing. Replace raw data
pointer access with tvb_memcpy() and tvb_get_ntohs().

svn path=/trunk/; revision=33470
2010-07-07 21:27:13 +00:00
Jörg Mayer 0eddecc248 Andreas Schuler <andreas (A) schulerdev.de>
Updates to the DECT dissector:
- using proto_tree_add_none_format()/proto_tree_add_item() instead of
  proto_tree_add_uint_format() where it makes sense
- fixed display of full slot data
- added some references to documentation
- cleaned up packet length checking
- put descrambled bfield-data in a tree
- cleaned up some afield items
- use custom columns instead adding all infos to COL_INFO
- add some more infos to the columns

Me:
- Replace proto_tree_add_none_format(..., strvar) by
  proto_tree_add_none_format(..., "%s", strvar).
- Fix an unused variable warning.

svn path=/trunk/; revision=33210
2010-06-11 16:11:42 +00:00
Anders Broman d8684d1d8d Cleanup of DECT dissector INFO column.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4502
- remove check_col()

svn path=/trunk/; revision=31913
2010-02-18 06:18:34 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Kovarththanan Rajaratnam 8de8a1cb6e setbit() is (AFAIK) defined in <sys/param.h> (OpenBSD) so rename to dect_setbit() to avoid clash. getbit() is also renamed for consistency.
Fixes the issue reported by Stan: http://www.wireshark.org/lists/wireshark-users/200908/msg00128.html

svn path=/trunk/; revision=29456
2009-08-17 17:19:31 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Kovarththanan Rajaratnam 4b6090e576 Don't guard col_set_str (COL_INFO) with col_check
svn path=/trunk/; revision=29342
2009-08-09 07:01:26 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Jörg Mayer cf0746df92 Fix warning: always evaluates to true/false
svn path=/trunk/; revision=28805
2009-06-22 06:29:32 +00:00
Anders Broman 28b46231f6 Fix a typo.
svn path=/trunk/; revision=28023
2009-04-09 15:32:26 +00:00
Jörg Mayer 4c0e847d8c Starting cleanup in earnest
- get rid of some structure accesses
- use _item functions where possible

svn path=/trunk/; revision=28022
2009-04-09 13:58:20 +00:00
Jörg Mayer 8b6ae788b2 Andreas Schuler:
add framenumber, extended fixed part capabilities and higher
layer capabilities

Me;

- replace div by crc to fix a shadowed global variable
- the last argument to proto_tree_add_item is the endianess
  indicator, not the value
- replace // by /* */

svn path=/trunk/; revision=27904
2009-03-30 21:55:22 +00:00
Guy Harris c023fe9066 Don't use sprintf() - use ep_strbufs and ep_strbuf_append_printf()
instead.

svn path=/trunk/; revision=27876
2009-03-28 17:30:31 +00:00
Jörg Mayer 46ac6b6e53 Andreas Schuler
Fix display problems with b-fields:
increase the length of the string and use sprintf.

Original German comment:

weiter hab ich festgestellt das das b-field nicht richtig dargestellt wird .
Entweder ist g_snprintf broken , oder wir sind beide zu unf\344hig die
funktion zu benutzen .
Der string wird aus 16x %.2x + leerzeichen zusammengesetzt , was nach
meinen berechnungen eine h\366chstl\344nge von 144 zeichen + nullbyte ergibt .
deshalb hab ich die stringvariable auf 145 hochgesetzt und benutze wieder
sprintf . hier der patch dazu .


svn path=/trunk/; revision=27844
2009-03-24 22:13:18 +00:00
Jörg Mayer d50755f465 Andreas Schuler
small fix:
In a  PP packet TA=7 gets dissected as Paging tail.  In case of PP it
is really an Mt .


svn path=/trunk/; revision=27843
2009-03-24 22:09:21 +00:00
Jörg Mayer 3c9e4d5de9 Whitespace changes, missed a comment in German
svn path=/trunk/; revision=27422
2009-02-11 07:46:39 +00:00
Bill Meier dce1390edd Replace remaining usage of sprintf ...
svn path=/trunk/; revision=27382
2009-02-05 21:16:36 +00:00
Jörg Mayer f76ab796a6 Don't convert a const to a non-const
svn path=/trunk/; revision=27374
2009-02-05 08:25:59 +00:00
Bill Meier 0379da5147 Keep the compiler happy: revert one change....
svn path=/trunk/; revision=27373
2009-02-05 03:14:08 +00:00
Bill Meier a2cbe9b2da Define most everything as static (fcns & global variables);
Fix one of the sprintf usages;
Use NULL instead of "" for the FIELDDESC in the hf array entries;
Minor code cleanup;

svn path=/trunk/; revision=27372
2009-02-05 02:27:33 +00:00
Bill Meier 893b439a4d #include <epan/prefs> not req'd; minor spacing changes;
next up: replace use of sprintf .....

svn path=/trunk/; revision=27371
2009-02-05 00:33:45 +00:00
Jörg Mayer afd7fc8f66 More whitespace changes
BOOL -> gboolean

_subtree -> _ett (not because it's better but because it's what's used
  (almost) everywhere else

svn path=/trunk/; revision=27370
2009-02-04 23:17:55 +00:00
Jörg Mayer e4885e846a Small whitespace changes
svn path=/trunk/; revision=27369
2009-02-04 22:00:31 +00:00
Bill Meier 52c567e2b2 One very minor reg_handoff change [static ... not req'd]
svn path=/trunk/; revision=27364
2009-02-04 00:12:55 +00:00
Jörg Mayer 973bd36bb0 Fix some errors I either missed or introduced:
- missing {0, NULL} at the end of a val array
- incorrect registration

Small formatting changes.

svn path=/trunk/; revision=27363
2009-02-03 23:11:13 +00:00
Jörg Mayer f79a85e204 Andreas Schuler <krater (A) badterrorist.com>
Matthias Wenzel <dect (A) mazzoo.de>

Beginnings of a DECT dissector. This is a copy of the svn
repository at dedected.org with the following modifications:

- Change from plugin to normal dissector
- Change comments from // to /* */
- Change German comments to English
- #if-0-out unused variables
- Reorder functions to avoid forward declarations and use the normal
  Wireshark conventions
- Fix the scrt table (as by email from Andreas)
- Fix Mask for hf_dect_A_Tail_Qt_0_Cn from 0x2F -> 0x3F (as by email
  from Matthias)
- Initialize some variables because GCC isn't aware of the reduced
  value space in a switch statement that switches on (var & 7).
- Declare some function parameters as _U_
- Add GPLv2 and later header (as by emails from Andreas and Matthias).

TODO (roughly in that order)
  - Don't use structs to access the elements in the datastream.
  - Use tvb_..._item wherever possible
  - Add references to documentation (ETSI EN 300 175 parts 1-8)
    including the section.
  - Make things stateful
  - Once the capture format has stabilized, get rid of the Ethernet
    hack and use a proper capture type.


svn path=/trunk/; revision=27362
2009-02-03 21:30:36 +00:00