aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-reload-framing.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-8/+8
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-3/+3
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-2/+2
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-3/+3
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-3/+3
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-25Add ability to export PDUs for heuristic dissectors alsoPascal Quantin1-1/+1
Change-Id: I1bf1aa9794f9b4f106edffd4986fc0b1014522fa Reviewed-on: https://code.wireshark.org/review/9099 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-23Remove more deprecated tvb_lengthEvan Huus1-3/+3
Change-Id: I36603453c2563406f82663683930088dedd5f39c Reviewed-on: https://code.wireshark.org/review/9041 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-05-25reload-framing: add range checks before bit-shiftsStephane Bryant1-8/+7
Change-Id: I1422b581157ffa389f121306de4dc9241ffb4061 Reviewed-on: https://code.wireshark.org/review/7595 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-30Fix some cases where we're shifting a signed 1 left.Guy Harris1-6/+6
Shift 1U instead, to make sure it's unsigned; the result of, for example, the result of shifting a signed value left is undefined if the value times 2^{shift count} doesn't fit in the *signed* type of the shifted value. That means, in particular, that the result of shifting 1 left by {number of bits in an int - 1} is undefined. (In *practice*, it'll probably be -2^32, with the bit you want set, but that's not guaranteed, and GCC 5.1 seems not to like it.) Change-Id: I0d27565c382a04ceda9eec65f45a430ceb74cf53 Reviewed-on: https://code.wireshark.org/review/8255 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+2
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+2
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-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
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-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18Exported PDU: add support for more than 32 tagsPascal Quantin1-3/+3
Change-Id: Idc9f105164919827a8a81c88b5a56de4fa25df0b Reviewed-on: https://code.wireshark.org/review/1197 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-19Exported PDU: add support for data length on the wirePascal Quantin1-2/+3
Change-Id: Iff14ec4d0297ec85f3597b33871fb0ab5256a597 Reviewed-on: https://code.wireshark.org/review/728 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-17Revert "Try to make the heuristic a bit more efficient."Bill Meier1-5/+5
(based upon an OK from Anders). (The commit caused 'reload_framing_info' to be referenced before being set). This reverts commit b3ce4ecc1460fc0171d65e69549e155b447d851a. svn path=/trunk/; revision=52004 Change-Id: If715e1cad041fd832f460411cc652d9b5764d069 Reviewed-on: https://code.wireshark.org/review/718 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-12- Forward declaration of register functions.Anders Broman1-0/+3
svn path=/trunk/; revision=53963
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-13/+8
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-10-14Try to pptimize heuristics slightly.Anders Broman1-4/+4
svn path=/trunk/; revision=52603
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-13Try to make the heuristic a bit more efficient.Anders Broman1-5/+5
svn path=/trunk/; revision=52004
2013-08-31Convert another 10 dissectors to wmem.Evan Huus1-11/+11
svn path=/trunk/; revision=51612
2013-06-18Add ability to export decrypted SSL/DTLS PDUsPascal Quantin1-5/+37
svn path=/trunk/; revision=50001
2013-05-27Batch of filterable expert infosMichael Mann1-1/+10
svn path=/trunk/; revision=49600
2013-03-18From beroset:Anders Broman1-8/+8
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48409
2012-12-26Fix a bunch of warnings.Guy Harris1-2/+2
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-05Fix numerous instances of a variable/parameter name "shadowing" a library ↵Bill Meier1-23/+23
function name; (At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
2012-12-03Fix 2 bugs in heuristic tests which resulted in various false positives;Bill Meier1-12/+17
I believe this fix addresses the remaining issues for Bug #6047. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6047 Also: - Fix {-Wshadow] warning; - Use tvb_get_ntoh24() in 2 places; - Add ToDo comment about a TCP reassembly issue. svn path=/trunk/; revision=46338
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-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-2/+2
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-16Add editor modelines;Bill Meier1-33/+45
Do minor whitespace reformatting. svn path=/trunk/; revision=44539
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-2/+2
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-07-21Fix mis-allocated key size as caught by valgrind.Evan Huus1-6/+11
We have to divide the 'length' field to work with guint32 pointer arithmetic, but we still want to allocate and memcpy the original length value, since both of those operate in raw bytes, not blocks of sizeof(guint32). svn path=/trunk/; revision=43901
2012-07-21The se_tree_* functions are destructive to the key, so save and restoreEvan Huus1-0/+11
the key around each call. Fixes part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7509 svn path=/trunk/; revision=43898
2012-07-21The 32-bit-key tree code assumes that the pointer to the key can be castGuy Harris1-2/+5
to a pointer to a guint32 and dereferenced. On some platforms, such as SPARC, this requires that the pointer be aligned on a 4-byte boundary; there is no guarantee that the data field of an address structure is aligned on a 4-byte boundary, so allocate a buffer for a copy of that data and copy the data into it, and free it when we're done with it. Should fix bug 7501. svn path=/trunk/; revision=43880
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
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-06From Stéphane Bryant: improvements in RELOAD dissectionBill Meier1-58/+186
- Follow closely draft-ietf-p2psip-base-18 - Added support for draft-ietf-p2psip-base-18, draft-ietf-p2psip-sip-06, draft-ietf-p2psip-service-discovery-03, draft-ietf-p2psip-self-tuning-04, draft-ietf-p2psip-diagnostics-06, draft-zong-p2psip-drr-00, - Handoff to the xml dissectors for configuration data - export the message content dissection function in the new packet-reload.h file for use in related protocols (draft-hautakorpi-p2psip-with-hip-01) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317 From me: - Fix a few C++ style comments; - Fix: packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data Note: Additional fix yet req'd since checkhf.pl gives: ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop Unused entry: packet-reload.c, hf_reload_storeddata_signature Unused entry: packet-reload.c, hf_reload_storeddataspecifiers (Compile is OK). svn path=/trunk/; revision=39301
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-5/+5
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-06-09Only count an ACK if it's part of an existing conversation, otherwise weGerald Combs1-3/+8
get a lot of false positives. svn path=/trunk/; revision=37631
2011-05-29- Added new SignatureIdentity values.Anders Broman1-1/+1
From Marc Petit-Huguenin: - Removed directResponseForwarding. - The certificate_type enum is now defined as RFC 6091's CertificateType so moved the definition to packet-ssl-utils.[ch]. - Fixed invalid values for CERTIFICATE_BY_NODE and CERTIFICATE_BY_USER Kinds. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5967 svn path=/trunk/; revision=37452
2011-05-13From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863 :Jeff Morriss1-7/+4
1. Reload framing protocol no longer encapsulates the Reload message, instead the latter is in its own tree following Reload framing, much like IP, UDP, etc. 2. Similarly, DTLS no longer encapsulates its data payload if the payload can be dissected. The recognized payload is in its own tree following the DTLS, much like IP, UDP, etc. 4. DTLS now has its own heuristic table for dissecting its payload, and reload-framing is added to this DTLS heuristic table. 6. DTLS will try to dissect its payload if the agreed upon cipher is RSA-NULL-MD5 (0x0001) or RSA-NULL-SHA (0x0002), even when DTLS is not configured with the client/server private keys. Still to do: make DTLS a heuristic dissector on top of UDP (item 3 in the bug). svn path=/trunk/; revision=37110
2011-05-06From Marc Petit-Huguenin via ↵Jeff Morriss1-37/+37
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5894 : - Use "RELOAD" everywhere. - Fix invalid variable name "reload_framing.probe_information.type". - Fix various names to match the spec. - Dissect the X.509 certificate embedded in RELOAD messages. - Use tls_signature_algorithm and tls_hash_algorithm tables in packet-ssl-utils. From me: take out the tabs. Keep the long dissector name when registering the protocols. svn path=/trunk/; revision=37003
2011-03-28From Stephane Bryant via ↵Jeff Morriss1-0/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5787 : Register the reload-framing dissector by name. Needed when RELOAD is not used over udp/tcp (but tls, for example) svn path=/trunk/; revision=36380
2011-03-27Fix Coverity 393: "DEADCODE"; Add an XXX commentBill Meier1-2/+2
svn path=/trunk/; revision=36373
2011-03-22Allocate correct size of reload_frame.Stig Bjørlykke1-1/+1
Coverity 714. svn path=/trunk/; revision=36263