aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-kink.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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-11-16create_dissector_handle -> new_create_dissector_handleMichael Mann1-3/+4
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I96aa9cf53533cbb07105aa400d42922baf3016b3 Reviewed-on: https://code.wireshark.org/review/11860 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-24Remove a bunch more deprecated tvb_length callsEvan Huus1-5/+5
(getting really close!) Change-Id: Ibf22a5f727c4dc0070b78144a4b0ab8e0c5e1bce Reviewed-on: https://code.wireshark.org/review/9081 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-18Add a CF_FUNC macro for casting BASE_CUSTOM functions.Gerald Combs1-2/+2
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid the following warning: warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic] We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be more consistent with the other macros in proto.h. Update each instance of BASE_CUSTOM to use CF_FUNC. Adjust a dummy variable name generated by asn2wrs.py that was triggering an invalid error in checkhf.pl. Fix an encoding arguement in packet-elasticsearch.c found by fix-encoding-args.pl. Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22 Reviewed-on: https://code.wireshark.org/review/7150 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-2/+2
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29Add editor modelines; fix indentation as needed.Bill Meier1-0/+12
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263 Reviewed-on: https://code.wireshark.org/review/4363 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-27Eliminate proto_tree_add_text from some dissectors.Michael Mann1-74/+76
Some other related cleanup. Change-Id: I45f54032aa8318858f4ee784945b6f2ed163b6ea Reviewed-on: https://code.wireshark.org/review/4328 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29proto_tree_add_subtree[_format]Michael Mann1-24/+20
Change-Id: Id00f456479415adf0a219af6c9a2108d4b3642d0 Reviewed-on: https://code.wireshark.org/review/2702 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-5/+5
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-5/+5
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.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-14Fix some trivial warnings.Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54085
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-1/+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-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-7/+5
svn path=/trunk/; revision=51662
2013-07-01Define certain 'const char *...' arrays as static.Bill Meier1-1/+1
Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50292
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-7/+4
svn path=/trunk/; revision=49920
2013-05-26Batch of filterable expert infos.Michael Mann1-6/+19
svn path=/trunk/; revision=49584
2013-02-27Replace proto_tree_add_text with proto_tree_add_item + expert_infoMichael Mann1-91/+105
svn path=/trunk/; revision=47908
2013-02-26Fix spelling/typos found using a list of commonly misspelled words.Bill Meier1-9/+9
The misspellings were mostly in comments but some were in text strings visible to the user. svn path=/trunk/; revision=47899
2013-02-03fix dead incrementMartin Kaiser1-1/+0
http://www.wireshark.org/download/automated/analysis/scan-build-2013-02-02-1/report-JzzXua.html#EndPath svn path=/trunk/; revision=47456
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-08-10Use val_to_str_const() where appropriate;Bill Meier1-1/+1
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-11-12fix [-Wunused-but-set-variable]Anders Broman1-1/+4
svn path=/trunk/; revision=39803
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-3/+3
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-1/+1
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-02-07Remove unneeded #includes (stdio.h,stdlib.h);Bill Meier1-91/+91
Whitespace cleanup: trailing, indentation, "4-space tabs" svn path=/trunk/; revision=35850
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-05-21Have abs_time_to_str() and abs_time_to_str_secs() take an additionalGuy Harris1-2/+2
argument indicating whether to include the time zone in the string. If we're constructing a display filter, don't include the time zone, otherwise do. Fixes bug 4756. svn path=/trunk/; revision=32913
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-02-27Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with theGuy Harris1-2/+2
date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats to a "time_fmt.h" file, included by the headers that use it. Have abs_time_to_str() and abs_time_secs_to_str() take the date format value, rather than a Boolean "show this as UTC" flag, as an argument. Document the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS and VCDU dissectors, rather than having those dissectors do the formatting themselves. svn path=/trunk/; revision=32034
2009-12-11Just use abs_time_secs_to_str() to display UTC times, now that it has aGuy Harris1-14/+6
flag to tell it to format the time in UTC. svn path=/trunk/; revision=31239
2009-10-06From Didier Gautheron:Anders Broman1-0/+1
ep memory can't be used for tvbs defined as data_source. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4054 svn path=/trunk/; revision=30376
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=29345
2009-07-28When we passed the crytobuffer to krb5_c_decrypt() we never actually Ronnie Sahlberg1-9/+7
verified that we did have enough data in the buffer/tvb, which could lead to a SEGV. (for example if we enable KRB5 decryption but we do NOT use TCP reassembly, and the encrypted data goes beyong the end of the current segment) Change the signature to decrypt_krb5_data() to take a TVB instead of a buffer+length. Actually check that we do have the entire encrypted PDU before calling out to the kerberos libraries. svn path=/trunk/; revision=29213
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-1/+1
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-05-13Apply some of the patches from:Anders Broman1-2/+1
http://wiki.wireshark.org/Development/Optimization svn path=/trunk/; revision=28356
2008-10-05kerberos/gss enhancementsRonnie Sahlberg1-1/+1
add a parameter *datalen to decrypt_krb5_data() so that we can pass back the length of the decrypted blob back to the caller. This is useful for when there are "junk" at the end of the blob and thus the decrypted data is not the same size as the encrypted blob. GSS CFX is one such example. (we should have done this earlier since it might have made some other stuff easier to imlement...) make the preference setting krb_decrypt a globally visible variable so we can see its value and act on it from callers of krb decryption from outside of packet-kerberos.c i.e. from GSS CFX Make keytype == -1 a wildcard that when passed to decrypt_krb5_data() will try any/all encryption keys. This since GSS CFX does not provide the enctype in the GSS layer. (The GSS CFX enctype is only negotiated during the AP-REQ/REP so we should later pick this value up and store it in a CFX session variable. That is for a later enhancement. ) Enhance the GSS decryption (that for hitorical reasons are implemented in packet-spnego.c and not packet-gssapi.c :-) ) to also handle decryption of GSS CFX This should make wireshark able to decrypt any/all GSSAPI RFC4121 packets, if the keytab file is provided. I have successfully decrypted LDAP using GSS CFX with AES encryption with this. svn path=/trunk/; revision=26350
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-1/+1
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2007-05-06Start introducing actx to ber functions.Anders Broman1-0/+1
svn path=/trunk/; revision=21705
2007-03-22Sebastien Tandel:Jörg Mayer1-0/+4
some warning fixes packet-http.c set headers.content_length = 0 before the first potential use of it. packet-kink.c "ifdef kerberos" around one function declaration packet-nbns.c set headers.{dgm_length|pkt_offset|error_code} = 0 packet-pflog.c delete capture_pflog and capture_old_pflog which aren't used anymore in the code. svn path=/trunk/; revision=21120
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2005-07-30More char -> const char fixesJörg Mayer1-1/+1
Declare some functions static svn path=/trunk/; revision=15158
2005-07-25packet-http.c(484) : warning C4101: 'i' : unreferenced local variableUlf Lamping1-1/+0
packet-http.c(486) : warning C4101: 'si' : unreferenced local variable packet-kink.c(628) : warning C4101: 'quick_mode_payloads_length' : unreferenced local variable svn path=/trunk/; revision=15051
2005-07-09Make a bunch of items in encryption code arrays of guint8, and make someGuy Harris1-1/+1
pointers either "void *" or "guint8 *", to reduce the level of compiler warnings (the data in question is largely binary in those cases). svn path=/trunk/; revision=14886
2005-06-16Squelch some compiler warnings.Guy Harris1-2/+11
svn path=/trunk/; revision=14649
2005-06-16Static variables considered harmful. Make the ISAKMP version aGuy Harris1-5/+2
parameter to many functions inside the ISAKMP dissector, as well as to the "isakmp_dissect_payloads()" routine it exports. Get rid of "isakmp_set_version()", as the version can be passed to "isakmp_dissect_payloads()" from the KINK dissector. Put the declaration of "isakmp_dissect_payloads()" into a "packet-isakmp.h" header, and have "packet-isakmp.c" and "packet-kink.h" include it rather than declariing "isakmp_dissect_payloads()" itself - or not doing so at all. svn path=/trunk/; revision=14648