Guy Harris
77acaa1f48
Get rid of unnecessary includes of ctype.h.
...
Change-Id: I9e2cd7a9fed33fc2f4b0c0da3603690450f6952d
Reviewed-on: https://code.wireshark.org/review/4809
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-18 01:22:31 +00:00
Stig Bjørlykke
4e1b5ea866
ASN1: Register PDU-dissectors as NEW
...
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-10-13 11:24:07 +00:00
Guy Harris
e74ae46002
Show BER identifiers and lengths in SNMP variable bindings.
...
If the user turns on the "show internal BER encapsulation tokens"
preference, show them the tokens inside SNMP variable bindings.
Change-Id: Ief9040f422cb214bbff8e4cfd45a2e05c7106480
Reviewed-on: https://code.wireshark.org/review/4105
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-14 09:57:41 +00:00
Stig Bjørlykke
437b448095
Mark Trap-PDU as obsolete for SNMP versions > 1
...
Change-Id: I967a1547eb97619042b620bb3d803a29cce9ebe1
Reviewed-on: https://code.wireshark.org/review/3920
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-30 09:54:05 +00:00
Alexis La Goutte
acf39ff724
SNMP : Continue to fix indent (use tab)
...
Change-Id: I6b92deb2dbf9b9c4be7fd75d6d788755524a7483
Reviewed-on: https://code.wireshark.org/review/3570
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-13 07:40:08 +00:00
Alexis La Goutte
38418210e3
SNMP: Remove some unused hf field
...
Change-Id: I33c89d07af6658569df3a9a094e2865e28ed0acb
Reviewed-on: https://code.wireshark.org/review/3569
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-13 07:38:09 +00:00
Alexis La Goutte
cb44442dfc
SNMP: fix mixed indent (use tab)
...
Change-Id: I19fde26bf7d1d2b19fcb56573f6e0814d1a7b8ab
Reviewed-on: https://code.wireshark.org/review/3551
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-11 14:44:08 +00:00
Alexis La Goutte
4c131ced56
SNMP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
...
Change-Id: I00d66ff57fd3ea1ede692c85b2ae0286c30557b7
Reviewed-on: https://code.wireshark.org/review/3550
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-11 14:43:32 +00:00
Alexis La Goutte
db7143d906
SNMP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
...
Change-Id: Ifd4fef4ff7cc5a3197a802e0da5851370ddcd715
Reviewed-on: https://code.wireshark.org/review/3549
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-11 14:42:20 +00:00
Michael Mann
cd02af56a1
Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.
...
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions.
Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree.
Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141
Reviewed-on: https://code.wireshark.org/review/3500
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-09 01:57:08 +00:00
Guy Harris
4d90d6e38d
Add some files under asn1 to the distribution.
...
Include CMakeLists.txt files and the gnm subdirectory, along with the
top-level Makefile.inc and Makefile.preinc files. Don't explicitly
include Custom.make, as automake does that automatically given that it's
included by asn1/Makefile.am.
Add some files to EXTRA_DIST lists.
Move some .asn files to EXTRA_DIST; they don't need to be in SRC_FILES,
as SRC_FILES always includes EXTRA_DIST, and they *do* need to be in
EXTRA_DIST so that they're in the distribution.
Change-Id: Id91df577260fa57028d40fe098be1d79c59398e6
Reviewed-on: https://code.wireshark.org/review/3273
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-30 23:42:55 +00:00
Michael Mann
9356d5c689
convert to proto_tree_add_subtree[_format] for ASN.1 dissectors
...
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef
Reviewed-on: https://code.wireshark.org/review/2509
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:08:21 +00:00
Evan Huus
37b903d7ab
batch of tvb-length conversions
...
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498
Reviewed-on: https://code.wireshark.org/review/2507
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-21 04:01:52 +00:00
Pascal Quantin
d0ac937567
Revert "Update ASN.1 source files with the API changes done in g021e7af"
...
This reverts commit e308e7c4de
.
Change-Id: I079616d63f643f79f1bc03ef5fdf724f36df4071
Reviewed-on: https://code.wireshark.org/review/2435
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-19 18:42:28 +00:00
Pascal Quantin
e308e7c4de
Update ASN.1 source files with the API changes done in g021e7af
...
Change-Id: I52ecfccbce423206242e3cf99401a8c9e1655d88
Reviewed-on: https://code.wireshark.org/review/2385
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 16:15:42 +00:00
Evan Huus
de00c49bd8
Convert a bunch of time_to_str functions to wmem
...
Change-Id: I24fe3cc4a3589dadc4528a77fe7ff13d06b1a983
Reviewed-on: https://code.wireshark.org/review/2245
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-16 17:26:25 +00:00
Evan Huus
39d7c9df0a
Remove emem in SNMP UAT, use glib instead
...
Change-Id: Ieea8c09d6a82285b0ba20f669c35394fbf195f50
Reviewed-on: https://code.wireshark.org/review/2241
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-16 15:38:31 +00:00
Michael Mann
73217d9f3f
tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
...
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-06-07 15:41:07 +00:00
Bill Meier
1dff4e309d
Remove trailing whitespace from asn1 .cnf & template.[hc] files. Regenerate 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-26 19:38:21 +00:00
Jeff Morriss
8c608e6e82
Remove $Id$ from the ASN.1 dissectors and regenerate them.
...
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-18 03:05:28 +00:00
Stig Bjørlykke
3ba10a7051
Apply g4cc69483 to asn1 templates.
...
Change-Id: Id44ef17e7293be5d713c5e9e5d55b25194b46016
Reviewed-on: https://code.wireshark.org/review/86
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-02-03 10:05:25 +00:00
Guy Harris
d262ff8789
Use tvb_get_string_enc() with an explicit encoding; it's a + or a -, so
...
just treat it as ASCII.
svn path=/trunk/; revision=54896
2014-01-22 04:53:43 +00:00
Guy Harris
6b8e8d3fea
Make a routine not used outside the SNMP dissector static.
...
svn path=/trunk/; revision=54751
2014-01-14 02:06:42 +00:00
Evan Huus
6be37815a1
Add bytestring_to_str() which takes a wmem scope and is otherwise identical to
...
bytestring_to_ep_str (now deprecated). Use the new one in a few obvious places.
Also just print directly to the buffer when loading ethernet addresses for
resolution. The straight-to-buffer bytes_to_hexstr seems useful, maybe it
shouldn't be in a private header...
svn path=/trunk/; revision=54270
2013-12-19 20:53:44 +00:00
Evan Huus
2ae8edccea
Rename more to_str functions to have ep_ in the name if they return ephemeral
...
buffers. Remove two unused functions.
svn path=/trunk/; revision=54250
2013-12-19 16:28:39 +00:00
Evan Huus
a6415ece0a
Rename a couple of to_str functions to have ep_ in the name. This makes it
...
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-19 15:49:09 +00:00
Evan Huus
3342e3bc89
Convert some emem to wmem. It took some manual flow analysis, but they are only
...
used during actual packet dissection.
svn path=/trunk/; revision=52870
2013-10-26 16:04:21 +00:00
Evan Huus
95f484a91e
Add a very small hack to make the UAT update callback error string freeable, and
...
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-25 22:14:25 +00:00
Pascal Quantin
a0c53ffaa1
emem -> wmem conversion:
...
- 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-22 15:50:55 +00:00
Jörg Mayer
72f8ca4895
One of the wmem patches only updated the generated packet-snmp.c
...
but not the source. Fix that.
svn path=/trunk/; revision=52123
2013-09-17 18:54:18 +00:00
Michael Mann
9e3f9b449f
expert_add_info_format_text -> expert_add_info_format
...
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Michael Mann
00dd0adc0d
expert_add_info_format_text -> expert_add_info_format
...
svn path=/trunk/; revision=51851
2013-09-09 00:28:48 +00:00
Pascal Quantin
02cae558f9
Do not use ephemeral memory when adding a new data source
...
svn path=/trunk/; revision=51424
2013-08-19 11:11:11 +00:00
Jeff Morriss
2df54da6e2
Move a bunch of the crypt modules and pint.h into wsutil.
...
This means wsutil now links against libcrypt.
Protect a bunch of the crypt header files from multiple inclusion.
svn path=/trunk/; revision=51100
2013-08-01 23:34:47 +00:00
Jeff Morriss
54bb2e7a5c
Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
...
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Michael Mann
7878e93cad
expert_add_info_format_text + proto_tree_add_text = proto_tree_add_expert_format, where applicable.
...
svn path=/trunk/; revision=50377
2013-07-03 23:43:26 +00:00
Evan Huus
d63bd5330f
Back out some of the wmem conversions (r50063 and r50057).
...
These dissectors allocate ephemeral or seasonal memory in UAT callbacks, which
really makes no sense because UAT callbacks can occur when there is no packet or
file in scope, making this effectively a leak if the user is fiddling with their
UAT and never opens a capture.
Emem let you get away with this, wmem forces an assertion. Back out the changes
so that the UATs are usable until the code can be properly fixed to not use
out-of-scope allocators.
svn path=/trunk/; revision=50073
2013-06-20 06:26:03 +00:00
Evan Huus
b1e12ec925
Convert the rest of the ASN1 dissectors from emem to wmem.
...
svn path=/trunk/; revision=50063
2013-06-19 22:47:36 +00:00
Jörg Mayer
b77119aca7
Remove traling whitespace.
...
svn path=/trunk/; revision=50048
2013-06-19 18:33:49 +00:00
Anders Broman
82e220f2bd
Pretify dissection of date and Time.
...
svn path=/trunk/; revision=49905
2013-06-12 15:08:08 +00:00
Anders Broman
03a322661f
Fix a crash when oid_info->value_typem is NULL
...
svn path=/trunk/; revision=49894
2013-06-12 04:21:40 +00:00
Anders Broman
bbb5aacd42
Show DisplayString as a string.
...
svn path=/trunk/; revision=49887
2013-06-11 16:35:06 +00:00
Anders Broman
3bfeaff546
Add subdissection of:
...
- SNMPv2-MIB sysDescr
- SNMPv2-MIB::sysName
svn path=/trunk/; revision=49774
2013-06-04 20:05:16 +00:00
Michael Mann
7fe5422c4b
Convert ASN.1 dissectors to use filterable expert info.
...
NOTE: Kerberos ASN.1 template was updated, but not generated to source.
svn path=/trunk/; revision=49707
2013-06-03 03:42:36 +00:00
Jörg Mayer
59417deed4
I added EXPORT_FILES in too many places, remove them
...
(via "copy - modify too little - paste" cycle)
svn path=/trunk/; revision=49255
2013-05-11 22:02:33 +00:00
Jörg Mayer
b22ed68d8d
Some more protocols can be generated via cmake
...
svn path=/trunk/; revision=49233
2013-05-10 14:55:15 +00:00
Jörg Mayer
243e9c0ba5
Just whitespace changes
...
svn path=/trunk/; revision=49167
2013-05-05 08:49:18 +00:00
Michael Mann
195e87f3ea
Protect a "divide by zero" operation. Bug 7359 ( https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7359 ). This seems to have been generated through a corrupted UAT file switching between 1.8 and 1.10, but it's a good check to have regardless.
...
svn path=/trunk/; revision=49128
2013-05-01 23:59:16 +00:00
Jörg Mayer
8faa262e90
Stub cmake support for generating the asn1 dissectors.
...
It doesn't do anything yet, it is just to make svn status
readable again.
svn path=/trunk/; revision=49007
2013-04-23 23:05:33 +00:00
Bill Meier
371d2dc915
From beroset:
...
remove C++ incompatibilities
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10401
svn path=/trunk/; revision=48441
2013-03-20 14:50:20 +00:00