aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-c1222.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-1/+1
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 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-12-23asn1 generated dissectors: cleanup #include usageBill Meier1-16/+9
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387 Reviewed-on: https://code.wireshark.org/review/6008 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-22Fix unknown command tag name [-Wdocumentation-unknown-command]Alexis La Goutte1-1/+1
Change-Id: I6c2564a86e13d9321001856ba1f51681a9f20976 Reviewed-on: https://code.wireshark.org/review/5979 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-13ASN1: Register PDU-dissectors as NEWStig Bjørlykke1-11/+9
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-06-19batch of manual tvb_length conversionsEvan Huus1-2/+2
Change-Id: Ib3a1ddc4342a7a8648d6ed8bfcb35aa229c56a27 Reviewed-on: https://code.wireshark.org/review/2445 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-4/+4
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-4/+4
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-2/+2
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-26Remove trailing whitespace from asn1 .cnf & template.[hc] files. Regenerate ↵Bill Meier1-2/+2
dissectors. Change-Id: I0e779b2ac2f608356649c5bbfca438141070dea4 Reviewed-on: https://code.wireshark.org/review/412 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-18Remove $Id$ from the ASN.1 dissectors and regenerate them.Jeff Morriss1-19/+17
Change-Id: Ie476c6f82f318188b41ed922b92c6fec119ea954 Reviewed-on: https://code.wireshark.org/review/244 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-1/+1
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-1/+1
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-10- Forward declaration of register functions.Anders Broman1-5/+7
svn path=/trunk/; revision=53901
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-9/+12
"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-25Add a very small hack to make the UAT update callback error string freeable, andEvan Huus1-3/+3
convert all existing UAT update callbacks to use glib memory instead of ephemeral memory for that string. UAT code paths are entirely distinct from packet dissection, so using ephemeral memory was the wrong choice, because there was no guarantees about when it would be freed. The move away from emem still needs to be propogated deeper into the UAT code itself at some point. Net effect: remove another bunch of emem calls from dissectors, where replacing with wmem would have caused assertions. svn path=/trunk/; revision=52854
2013-10-16From Ed Beroset: add modelines and fix irregular indenting;Bill Meier1-332/+342
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9273 This patch adds modelines and cleans up the irregular indentation of this dissector's code. The only other change was in asn1/c1222/packet-c1222-template.c to consolidate an #ifdef that had a redundant #endif (line 812) and subsequent reopening #ifdef (line 824). The only thing between them was comments, so the span of the original #ifdef (line 644) was simply extended by eliminating those two lines. The purpose for this patch is to make the file easier to edit and understand in advance of more substantive patches later. This patch is intended to be easy to review by having only non-substantive changes. svn path=/trunk/; revision=52636
2013-10-11Fix compilation when we don't HAVE_LIBGCRYPTJeff Morriss1-1/+3
svn path=/trunk/; revision=52527
2013-10-10Add a call to tvb_ensure_bytes_exist before we allocate memory based on ourEvan Huus1-5/+6
offset+size, prevents attempts to allocate outrageous memory, fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9260 svn path=/trunk/; revision=52503
2013-10-10From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9246Evan Huus1-14/+29
Fix memory leaks and bad memory accesses in c1222 dissector. From me: use realloc in a handoff function since it may get called multiple times, and we only need the latest. svn path=/trunk/; revision=52497
2013-10-06Fully support relative AP-titles in C12.22. Bug 9196 ↵Michael Mann1-37/+91
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9196) From Ed Beroset svn path=/trunk/; revision=52394
2013-09-26From beroset@mindspring.com:Anders Broman1-1/+1
c1222 dissector has wrong tag value for BER-encoding of calling_AE_qualifier https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9193 svn path=/trunk/; revision=52225
2013-09-22emem -> wmem conversion:Pascal Quantin1-6/+6
- 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-4/+4
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-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-15/+15
svn path=/trunk/; revision=51851
2013-08-10Fix (-W)documentation error found by ClangAlexis La Goutte1-21/+21
../../asn1/c1222/packet-c1222-template.c:348:15: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param pinfo ~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:349:14: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tree ~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:350:16: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param length ~~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:351:16: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param offset ~~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:758:11: error: parameter 'keybuf' not found in the function declaration [-Werror,-Wdocumentation] * \param keybuf is updated with a copy of the key data if successful lookup. ^~~~~~ ../../asn1/c1222/packet-c1222-template.c:758:11: note: did you mean 'keybuff'? * \param keybuf is updated with a copy of the key data if successful lookup. ^~~~~~ keybuff ../../asn1/c1222/packet-c1222-template.c:879:13: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tvb ~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:880:16: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param offset ~~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:881:13: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param len ~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:882:15: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param pinfo ~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:883:14: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tree ~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1023:13: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tvb ~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1024:15: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param pinfo ~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1025:14: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tree ~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1047:15: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param pinfo ~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1048:13: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tvb ~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1049:16: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param offset ~~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1068:13: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tvb ~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1069:15: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param pinfo ~~~~~~~~~~~^ ../../asn1/c1222/packet-c1222-template.c:1070:14: error: empty paragraph passed to '\param' command [-Werror,-Wdocumentation] * \param tree ~~~~~~~~~~^ svn path=/trunk/; revision=51272
2013-08-01Move a bunch of the crypt modules and pint.h into wsutil.Jeff Morriss1-8/+10
This means wsutil now links against libcrypt. Protect a bunch of the crypt header files from multiple inclusion. svn path=/trunk/; revision=51100
2013-07-06Squelch some warnings that show up with, for example, the GCC 4.2.1 thatGuy Harris1-1/+1
comes with Xcode 3.2.6 (it's not a real problem, but that requires more flow analysis than that version of the compiler does, apparently). svn path=/trunk/; revision=50419
2013-07-06Fix display filter errors caught by checkfiltername.plMichael Mann1-13/+13
svn path=/trunk/; revision=50399
2013-06-04From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8746 :Pascal Quantin1-9/+35
Add procedure numbers to C12.22 dissection svn path=/trunk/; revision=49775
2013-06-04From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8762 :Jeff Morriss1-9/+5
Remove dead code (condition can never happen). svn path=/trunk/; revision=49743
2013-06-03Convert ASN.1 dissectors to use filterable expert info.Michael Mann1-27/+59
NOTE: Kerberos ASN.1 template was updated, but not generated to source. svn path=/trunk/; revision=49707
2013-06-01Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8745 :Pascal Quantin1-17/+51
Upgrade AP-title ASN.1 description svn path=/trunk/; revision=49684
2013-06-01Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8744 :Pascal Quantin1-13/+13
Display C12.22 Invocation Id as unsigned integer svn path=/trunk/; revision=49682
2013-05-27Postfix FT_NONE fields with "_element" string to reduce number of ↵Pascal Quantin1-4/+4
incompatible filters in ASN.1 dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402 svn path=/trunk/; revision=49599
2013-05-01Make C12.22 work over UDP.Anders Broman1-7/+10
svn path=/trunk/; revision=49104
2013-04-11Update the ASN.1 based dissectors following the changes done in r48812Pascal Quantin1-2/+2
svn path=/trunk/; revision=48820
2013-02-19How can I get a new tvbuff that starts at an offset within a givenGuy Harris1-2/+2
tvbuff and runs to the end of the tvbuff? Let me count the ways.... Replace a bunch of different ways of doing that (some incorrect, in that they're not properly handling tvbuffs where the captured and reported lengths are different) with tvb_new_subset_remaining(). svn path=/trunk/; revision=47751
2013-02-17Remove C++ incompatibilities in c1222 dissector.Michael Mann1-22/+14
Also addresses an implicit cast in the epan/uat.h file Bug 8342 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8342) svn path=/trunk/; revision=47721
2012-09-24Regenerate asn.1 dissectors.Jakub Zawadzki1-5/+5
svn path=/trunk/; revision=45110
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-07-13tvb_length_remaining() can return -1, so don't assign its return value to an ↵Chris Maynard1-52/+52
unsigned integer. Fixes Coverity CID 281367: Improper use of negative value. svn path=/trunk/; revision=43698
2012-07-08UATs could be put into "categories". The categories were defined onlyGuy Harris1-1/+1
implicitly by the #define name and string they were defined to; not all UATs neatly fit into any of the categories, so some of them were put into categories that weren't obviously correct for them, and one - the display filter macro UAT - wasn't put into any category at all (which caused crashes when editing them, as the GUI code that handled UAT changes from a dialog assumed the category field was non-null). The category was, in practice, used only to decide, in the aforementioned GUI code, whether the packet summary pane needed to be updated or not. It also offered no option of "don't update the packet summary pane *and* don't redissect anything", which is what would be appropriate for the display filter macro UAT. Replace the category with a set of fields indicating what the UAT affects; we currently offer "dissection", which applies to most UATs (any UAT in libwireshark presumably affects dissection at a minimum) and "the set of named fields that exist". Changing any UAT that affects dissection requires a redissection; changing any UAT that affects the set of named fields that exist requires a redissection *and* rebuilding the packet summary pane. Perhaps we also need "filtering", so that if you change a display filter macro, we re-filter, in case the display is currently filtered with a display filter that uses a macro that changed. svn path=/trunk/; revision=43603
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-25tvb_length_remaining() can return a negative number, so be sure to handle ↵Chris Maynard1-3/+7
it. Fixes Coverity CID 281367. svn path=/trunk/; revision=42840
2012-05-11Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-1/+1
proto_tree_add_bitmask() calls. svn path=/trunk/; revision=42568
2012-05-07Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-1/+1
proto_tree_add_item() calls. svn path=/trunk/; revision=42477
2012-03-11Use _U_ for unused arguments.Stig Bjørlykke1-6/+6
svn path=/trunk/; revision=41478
2012-03-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-4/+4
svn path=/trunk/; revision=41299
2012-01-15The warning fix overdid things: It removed functionality.Jörg Mayer1-8/+5
Now I only remove the variable ft and everything looks good. svn path=/trunk/; revision=40516
2012-01-14Ed Beroset <beroset@mindspring.com> via bug 5531Jörg Mayer1-0/+1916
The ANSI C12.22 protocol is a smart grid protocol for utility meters, including gas, water and electric. The dissector implemented in the patch file includes full support for all EPSEM (Extended Protocol Specification for Electricity Metering) services and includes a full implementation of the C12.22 security modes. [...] To decrypt the attached sample file, you need to set up the key table in the preferences to include key 0 with a value of 6624C7E23034E4036FE5CB3A8B5DAB44. Me: Fixes for: [ 64%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-c1222.c.o ../../asn1/c1222/packet-c1222-template.c: In function ‘dissect_epsem’: ../../asn1/c1222/packet-c1222-template.c:860:15: error: variable ‘ft’ set but not used [-Werror=unused-but-set-variable] [ 5%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-c1222.c.o ../../asn1/c1222/packet-c1222-template.c:103:19: error: ‘c1222_flags’ defined but not used [-Werror=unused-variable] svn path=/trunk/; revision=40500