aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dect.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-5/+5
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-2/+1
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-09-14Convert some dissectors to wmem (leaving uat-like memory with emem for now)Pascal Quantin1-28/+30
svn path=/trunk/; revision=52031
2013-07-03Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=50353
2013-03-16[-Wmissing-prototypes]Anders Broman1-0/+2
Use explicit casts. svn path=/trunk/; revision=48341
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-04-28Initialize the bits[] array to zero.Chris Maynard1-0/+1
svn path=/trunk/; revision=42320
2012-04-09Add missing const attribute to some char *Jakub Zawadzki1-2/+2
Fix some "assignment discards qualifiers from pointer target type", etc svn path=/trunk/; revision=41993
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-1/+1
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-105/+105
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-8/+8
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-06-20Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;Bill Meier1-5/+5
(Code commented out since it may be required in the future (at least in some cases). svn path=/trunk/; revision=37723
2011-05-23From Romain Fliedel via bug 5947: Fix the mask for extracting FMID.Chris Maynard1-1/+1
svn path=/trunk/; revision=37370
2011-05-23Use correct subtree in a few cases: Fixes Coverity 921,894,878 & 1136;Bill Meier1-7/+10
svn path=/trunk/; revision=37361
2011-02-01Further restructure the DECT dissector:Jaap Keuter1-188/+247
- 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
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
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-07-07Fix a buffer overflow found by recent randpkt testing. Replace raw dataGerald Combs1-18/+22
pointer access with tvb_memcpy() and tvb_get_ntohs(). svn path=/trunk/; revision=33470
2010-06-11Andreas Schuler <andreas (A) schulerdev.de>Jörg Mayer1-157/+253
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-02-18Cleanup of DECT dissector INFO column.Anders Broman1-30/+29
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4502 - remove check_col() svn path=/trunk/; revision=31913
2010-01-13From Didier Gautheron:Anders Broman1-80/+36
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
2009-08-17setbit() is (AFAIK) defined in <sys/param.h> (OpenBSD) so rename to ↵Kovarththanan Rajaratnam1-3/+3
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-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-4/+1
svn path=/trunk/; revision=29346
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-16/+4
svn path=/trunk/; revision=29345
2009-08-09Don't guard col_set_str (COL_INFO) with col_checkKovarththanan Rajaratnam1-10/+5
svn path=/trunk/; revision=29342
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-22Fix warning: always evaluates to true/falseJörg Mayer1-1/+1
svn path=/trunk/; revision=28805
2009-04-09Fix a typo.Anders Broman1-2/+2
svn path=/trunk/; revision=28023
2009-04-09Starting cleanup in earnestJörg Mayer1-157/+165
- get rid of some structure accesses - use _item functions where possible svn path=/trunk/; revision=28022
2009-03-30Andreas Schuler:Jörg Mayer1-83/+788
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-28Don't use sprintf() - use ep_strbufs and ep_strbuf_append_printf()Guy Harris1-12/+19
instead. svn path=/trunk/; revision=27876
2009-03-24Andreas SchulerJörg Mayer1-10/+11
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-24Andreas SchulerJörg Mayer1-26/+65
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-02-11Whitespace changes, missed a comment in GermanJörg Mayer1-713/+713
svn path=/trunk/; revision=27422
2009-02-05Replace remaining usage of sprintf ...Bill Meier1-2/+2
svn path=/trunk/; revision=27382
2009-02-05Don't convert a const to a non-constJörg Mayer1-5/+5
svn path=/trunk/; revision=27374
2009-02-05Keep the compiler happy: revert one change....Bill Meier1-1/+1
svn path=/trunk/; revision=27373
2009-02-05Define most everything as static (fcns & global variables);Bill Meier1-112/+110
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#include <epan/prefs> not req'd; minor spacing changes;Bill Meier1-7/+6
next up: replace use of sprintf ..... svn path=/trunk/; revision=27371
2009-02-04More whitespace changesJörg Mayer1-542/+310
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-04Small whitespace changesJörg Mayer1-549/+545
svn path=/trunk/; revision=27369
2009-02-04One very minor reg_handoff change [static ... not req'd]Bill Meier1-1/+1
svn path=/trunk/; revision=27364
2009-02-03Fix some errors I either missed or introduced:Jörg Mayer1-87/+92
- missing {0, NULL} at the end of a val array - incorrect registration Small formatting changes. svn path=/trunk/; revision=27363
2009-02-03Andreas Schuler <krater (A) badterrorist.com>Jörg Mayer1-0/+1960
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