Commit Graph

42 Commits

Author SHA1 Message Date
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier ff5a77256c Add editor modelines and adjust indentation as needed.
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c
Reviewed-on: https://code.wireshark.org/review/4371
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 18:21:50 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6
Reviewed-on: https://code.wireshark.org/review/2601
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 23:42:13 +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
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Anders Broman 2e52e2ac99 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48347
2013-03-17 09:11:21 +00:00
Pascal Quantin 8b5aa91371 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8037 :
Fix an infinite loop in CSN.1 dissector when having more than 255 padding bits

svn path=/trunk/; revision=46335
2012-12-02 21:37:34 +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
Anders Broman 6aca10831f From Mike Morrin:
Fix pedantic compiler warnings in csn.1 dissectors.

There is some tricky casting going on in csn.1 structures.  To eliminate all
the warnings, the function pointers needed to be moved out of the object
pointer unions.  Fortunately macros (mostly) hide these changes from the
protocol dissector tables.

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

svn path=/trunk/; revision=44899
2012-09-14 14:05:50 +00:00
Anders Broman cc6d4341e6 From Mike Morrin:
Interface based on header type rather than MCS.

passes in the header type for EGPRS packets. 
This makes sense because in a real protocol stack, the header type is encoded
in the burst stealing bits, allowing the header can be decoded, giving the CPS
IE, which then allows the data blocks to be decoded, so wireshark now follows
the same practice.

I found that there was a (previously overlooked) alignment error in decoding
the last octet of some headers due to the last "octet" having less than 8 bits,
and both the protocol stacks I have here assume that the left-hand bits are
missing (as per the figures in 44.060).  I corrected this by making a small
extension to the NULL encoding in packet-csn.[ch] to allow a NULL field to
consume more than 0 bits.

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

svn path=/trunk/; revision=44805
2012-09-07 07:43:13 +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
Anders Broman 17da162356 Try to fix a couple of warnings.
svn path=/trunk/; revision=43259
2012-06-14 15:50:24 +00:00
Anders Broman 131334481d Get rid of a couple of warnings.
svn path=/trunk/; revision=43063
2012-06-04 11:44:52 +00:00
Bill Meier 1ec161eab8 Minor cleanup: whitespace, indentation, long-lines, style, typos, etc;
Also: remove unneeded #include <stdlib.h> in 2 cases.

svn path=/trunk/; revision=42226
2012-04-24 18:27:06 +00:00
Anders Broman b28516dc00 From Mike Morrin: A small patch to correct the name of the function proto_tree_add_split_bits_item_ret_val()
svn path=/trunk/; revision=41255
2012-03-01 07:01:15 +00:00
Anders Broman 872c2094c4 From Mike Morrin:
The attached patches add the uses
proto_tree_add_split_bits_ret_val()
proto_tree_add_split_bits_crumb()

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

svn path=/trunk/; revision=41249
2012-02-29 20:38:39 +00:00
Anders Broman dea5452b95 From Lei Chen:
a patch to support decode FDD_CELL_INFORMATION of "UTRAN FDD Description" in packet-gsm_rlcmac.c

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

svn path=/trunk/; revision=41149
2012-02-23 08:57:40 +00:00
Anders Broman 2f024256bf From Sylvain Munaut:
0001-packet-csn1-Fix-indenting-of-the-CSN_UINT-subsection.patch
0002-packet-csn1-Add-new-maro-M_TYPE_LABEL-to-customize-n.patch
0003-packet-csn1-New-macro-M_FIXED_LABEL-to-customize-str.patch
0004-packet-csn1-Allow-CHOICE-elements-to-re-process-the-.patch
0005-packet-csn1-Make-new-M_CHOICE_IL-option-that-doesn-t.patch
0006-packet-csn-Extend-CSN_SERIALIZE-to-allow-0-bit-of-le.patch

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

svn path=/trunk/; revision=40847
2012-02-05 08:14:09 +00:00
Jeff Morriss 1c81971d42 From Mike Morrin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6754 :
Due to the variable remaining_bits_len getting out of sync with bit_offset (in
one case due to a mistake in the patch for bug 6375, and in another case
pre-existing).

I have shuffled the decrements of remaining_bits_len so that they always occur
next to an increment of bit_offset, so that this type of problem is easier to
spot.

From me: convert tabs to spaces to match the rest of the file.

svn path=/trunk/; revision=40662
2012-01-23 18:54:02 +00:00
Anders Broman fd9f182f4b Try to fix
packet-csn1.c:179: warning: 'pui8' may be used uninitialized in this function

svn path=/trunk/; revision=40635
2012-01-21 21:45:33 +00:00
Anders Broman e8407dd6c1 Add the missing file from
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=40627

Patch was whining about csn1.h fixing that i must have missed that csn1.c did not get patched.

svn path=/trunk/; revision=40634
2012-01-21 20:26:46 +00:00
Anders Broman 7237eb3c49 From Mike Morrin:
Wrong tvb_get_bits function call in packet-csn1.c.

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

svn path=/trunk/; revision=40384
2012-01-05 07:17:38 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier 0a1ab095ac From Sylvain Munaut: Fix Bug #6351 (Buildbot fuzztest crash);
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6351


svn path=/trunk/; revision=39140
2011-09-25 22:01:50 +00:00
Stig Bjørlykke 2e49699bb6 From Sylvain Munaut via bug 6328:
Fix bug in CSN_CHOICE implentation preventing subtree processing

svn path=/trunk/; revision=38951
2011-09-09 17:29:20 +00:00
Anders Broman a0b2954bc7 From Lei Chen:
fix the wrong display of CSN_BIT under CSN_UNION.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6287

svn path=/trunk/; revision=38807
2011-08-30 18:34:19 +00:00
Anders Broman e0645e724c CSN_LEFT_ALIGNED_VAR_BMP didn't handle more than 8 bits.
(CSN Ack/Nack Description wrongly handled in gsm_rlcmac_dl dissector )
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6101

svn path=/trunk/; revision=38745
2011-08-26 15:25:14 +00:00
Jeff Morriss 0315937427 Fix the fuzz failure reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6139 :

Properly initialize the CSN_DESCR type before recursively calling
csnStreamDissector().

svn path=/trunk/; revision=38430
2011-08-09 15:43:42 +00:00
Anders Broman c7c53a5b11 From Lei Chen:
CSN_RECURSIVE_TARRAY should count the last '0' bit.

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

svn path=/trunk/; revision=38205
2011-07-26 03:52:29 +00:00
Anders Broman bdc9f65888 From Lei Chen:
pDescr should not step on until proto_tree_add_text() has been called.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6151

svn path=/trunk/; revision=38164
2011-07-22 08:10:25 +00:00
Anders Broman 2a6c45c5a2 From Ludovic Haessler:
CSN Ack/Nack Description wrongly handled in gsm_rlcmac_dl dissector (3GPP TS 44.060)

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

svn path=/trunk/; revision=37926
2011-07-07 07:44:25 +00:00
Stig Bjørlykke e98f5fc23d Cleanup ProcessError().
Coverity 865.

svn path=/trunk/; revision=36610
2011-04-12 21:00:26 +00:00
Ronnie Sahlberg aa01f6e0f6 remove a proto_item variable we never use
coverity 866

svn path=/trunk/; revision=36346
2011-03-26 05:39:45 +00:00
Anders Broman 4cd37afb6c From Vincent Helfre:
I updated again the csn1 dissector to associate hf_field to each element.

svn path=/trunk/; revision=36306
2011-03-24 09:20:14 +00:00
Jeff Morriss 50c8f0f80a Don't use C++/C99-style comments.
svn path=/trunk/; revision=36288
2011-03-23 13:18:38 +00:00
Anders Broman fd782e736c From Vincent Helfre:
- added documentation in packet-csn1.h
- fixed a bug in packet-csn1.c
- fixed a BSIC description in packet-gsm_a_rr.c
- removed the "_v" suffix in packet-gsm_rlcmac element description

svn path=/trunk/; revision=36284
2011-03-23 09:14:50 +00:00
Bill Meier 16097406f4 Define some globals as static; Remove uneeded #includes; Whitespace cleanup.
svn path=/trunk/; revision=36100
2011-02-28 23:50:01 +00:00
Anders Broman 9a7dbb4182 From Pascal Quantin:
the attached patch should hopefully please the buildbots

svn path=/trunk/; revision=36095
2011-02-28 15:42:58 +00:00
Anders Broman 4c26d6ccb3 From Pascal Quantin:
patch to fix the various issues

svn path=/trunk/; revision=36094
2011-02-28 14:54:22 +00:00
Anders Broman 6eaae55c79 - RE apply checkapi patch.
- Mark unused parameters (From Pascal Quantin).

svn path=/trunk/; revision=36093
2011-02-28 14:17:52 +00:00
Anders Broman 7f604b779d From Vincent Helfre:
I change the void * descr field as an union to either store a pointer or a value.

Hope it solves the problem.

svn path=/trunk/; revision=36092
2011-02-28 13:55:47 +00:00
Anders Broman eec32e9cbc svn path=/trunk/; revision=36087 2011-02-28 09:43:22 +00:00