aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ppp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
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-12Change ENC_NA to ENC_BIG_ENDIAN for all fetches of integral type fields.Bill Meier1-50/+50
Change-Id: Ia4f5735c61eedcbe8354eabd5da05d02e167f25e Reviewed-on: https://code.wireshark.org/review/5734 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-09Eliminate proto_tree_add_text from packet-ppp.c.Michael Mann1-267/+351
Some of the conversions to proto_tree_add_xxx calls involved using explicit sizes instead of the "option length", so there is skipping of the "byte highlighting" of the type + length bytes. Change-Id: Ibfe09a089fb33ba43121de079aca81742d48db4c Reviewed-on: https://code.wireshark.org/review/5636 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-57/+45
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-13Add dissector table for sFlow header dissection.Michael Mann1-0/+2
Change-Id: I189a5b2d5f769395fa5e387f8be49b81903fb252 Reviewed-on: https://code.wireshark.org/review/5262 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-09Create a subdissector table for juniper payload protocols.Michael Mann1-0/+2
Change-Id: I60fd9c6c486b9b3b90e32fb9ccce3973569cc2ee Reviewed-on: https://code.wireshark.org/review/5204 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-05convert to proto_tree_add_subtree[_format]Michael Mann1-217/+113
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35 Reviewed-on: https://code.wireshark.org/review/2865 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-7/+7
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-7/+7
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-2/+2
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-05-28Minor: use VALS macro (as per convention); Add editor modelines; Do ↵Bill Meier1-2/+2
whitespace changes. Change-Id: I6007c1b2098d06e4a892474dd07f06a7538f94ef Reviewed-on: https://code.wireshark.org/review/1843 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-04-06Apply found fix-encoding-args.pl errors in the dissector directory.Michael Mann1-3/+3
I coincidentally found a few files with errors, so I thought it might be time to run it on the whole directory again. Change-Id: Ia32e54b3b1b94e5a418ed758ea79807c8bc7e798 Reviewed-on: https://code.wireshark.org/review/978 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-07(Benign) Don't use "address-of" operator on arg of VALS() (not that it makes ↵Bill Meier1-5/+5
any actual difference).. Change-Id: I0766d0f130648aaa5a58d9f4062fa24e898cbdc3 Reviewed-on: https://code.wireshark.org/review/545 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-2/+2
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-12-12(Trivial)Bill Meier1-14/+14
- Fix indentation to match editor modelines (tabs-->spaces); - Rework/add some whitespace; svn path=/trunk/; revision=53978
2013-12-12- Forward declaration of register functions.Anders Broman1-0/+45
svn path=/trunk/; revision=53971
2013-11-29Rename some of pint.h macros to match common style (bits number on the end).Jakub Zawadzki1-1/+1
pntohs -> pntoh16 pntohl -> pntoh32 pletohs -> pletoh16 pletohl -> pletoh32 phtons -> phton16 phtonl -> phton32 svn path=/trunk/; revision=53652
2013-11-09include <wsutil/pint.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53196
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-5/+5
- 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-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- 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-21Add _g_ to the names of functions that allocate glib memory. This is a bit moreEvan Huus1-1/+1
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures that take the appropriate wmem pool. Majority of the conversion done with sed. svn path=/trunk/; revision=52164
2013-09-15A few more dissectors converted to wmemPascal Quantin1-1/+1
svn path=/trunk/; revision=52071
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-4/+2
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-11Rename frame relay NLPID dissector table from "fr.ietf" to "fr.nlpid".Chris Maynard1-1/+1
svn path=/trunk/; revision=51960
2013-08-19Change some dissectors to use pinfo memory pool instead of malloc if it can ↵Pascal Quantin1-12/+8
trigger an exception between between buffer allocation and tvb_set_free_cb call svn path=/trunk/; revision=51427
2013-06-30Add expert info to dissect_ip_tcp_options(). The proto_tree_add_text seems ↵Michael Mann1-9/+18
a bit duplicative, but the byte highlighting over the whole option is nice. svn path=/trunk/; revision=50248
2013-06-29Separate IP option header fields for each dissector that uses ↵Michael Mann1-8/+29
dissect_ip_tcp_options(). Bug 8823 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8823) svn path=/trunk/; revision=50230
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-3/+1
svn path=/trunk/; revision=49921
2013-05-09NULL terminate bit field list. Bug 8638 ↵Michael Mann1-1/+2
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8638) svn path=/trunk/; revision=49214
2013-04-02Dissect more 3GPP2 extensions.Anders Broman1-14/+60
svn path=/trunk/; revision=48700
2013-03-25Fix RFC number.Guy Harris1-1/+1
svn path=/trunk/; revision=48553
2013-03-19From beroset:Anders Broman1-4/+4
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
2013-03-18Update a value_stringAnders Broman1-0/+4
svn path=/trunk/; revision=48401
2012-12-03Declare a value_string as static.Bill Meier1-1/+1
svn path=/trunk/; revision=46359
2012-11-22Fix potential buffer overflow crash; (Bug #7880).Bill Meier1-48/+43
Rework code logic slightly so same code path (and tests) used whether or not 'if(tree)'. svn path=/trunk/; revision=46128
2012-11-12Show SACK information in TCP graphs. Also add a generated field for theMartin Mathieson1-134/+139
number of SACK ranges found in the SACK option. This involved extending the IP options framework to include an extra void* data field, which in the case of TCP is filled in with the tap struct - other users currently pass NULL. I first implemented the graph to sort the SACK ranges and show (in red) the unacknowledged regions between them, but this became confusing where the number of ranges is limited by TCP padding bytes. i.e. you can't tell how many SACKs could have been encoded, so some of the gaps between ranges may already have been received. svn path=/trunk/; revision=46006
2012-09-25replaced decode_boolean_bitfield calls with itemized filtersMichael Mann1-14/+32
added tfs_no_yes to tfs.[ch] svn path=/trunk/; revision=45115
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-09-18Initialize ett's and hf's to "-1", not "- 1".Chris Maynard1-4/+4
svn path=/trunk/; revision=44959
2012-09-11Add data parameter to call_dissector_only.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=44872
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-28Yet another case of bug #7316 (r42989) and bug #7668 (r44688)Jakub Zawadzki1-1/+1
Use correct field type for ccp.opt.oui svn path=/trunk/; revision=44689
2012-08-28Fix bug #7668Jakub Zawadzki1-1/+1
Use correct field type for lcp.opt.oui svn path=/trunk/; revision=44688
2012-08-16col_...() and expert...() fcns should not be under 'if (tree)';Bill Meier1-128/+120
'tab-width/tabstop/tabSize' in editor modelines should really always be 8; svn path=/trunk/; revision=44538
2012-07-18Fix crash in PPP dissectorBalint Reczey1-0/+5
Make sure that there is enough space allocated for PPP encapsulated CRTP packet's header. The bug can be triggered on an x86_64 system using the cpature file attached to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680056 svn path=/trunk/; revision=43784
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-11Don't define value_string arrays in a .h file (included in multiple places).Bill Meier1-97/+92
Also: - don't use val_to_str_const() with a "format" default string; - rename 'opt_len_type' enumeration identifiers to be less generic. svn path=/trunk/; revision=43210
2012-06-08Fix some dead assignments.Gerald Combs1-10/+0
svn path=/trunk/; revision=43157
2012-06-01Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7316 :Pascal Quantin1-1/+1
Use correct field type for OUI svn path=/trunk/; revision=42989