Commit Graph

168 Commits

Author SHA1 Message Date
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 fa5b45834b Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49921
2013-06-14 01:56:28 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman 96e7b183fb From beroset:
patch to remove C++ incompatibilities from packet-lmp.c
renamed class to lmp_class

remove C++ incompatibilities from packet-rcpap.c
renamed class to inst_class (instruction class).

remove C++ incompatibilities from emem.c and oids.c

remove C++ incompatibilities from packet-radius.c

remove C++ incompatibilities from packet-enip.c


https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48299
2013-03-14 18:58:42 +00:00
Bill Meier 7cd0417af5 Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402
2012-12-05 15:56:36 +00:00
Bill Meier ddb2a90dd0 Fix [-Wshadow] warning.
svn path=/trunk/; revision=46367
2012-12-04 14:38:38 +00:00
Evan Huus 361aedec1f Create SET_ADDRESS_HF that takes an additional hf_ value that can be
used to override the filter generated from the address column.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 (again).

svn path=/trunk/; revision=45792
2012-10-26 01:59:17 +00:00
Evan Huus c6b522bc70 Revert revision 44921.
See discussion on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728

svn path=/trunk/; revision=45791
2012-10-26 00:42:34 +00:00
Anders Broman b70e8b63ff Allways use sminmpec_values_ext to print the vendor id regardless if we have it in the database or not.
svn path=/trunk/; revision=45736
2012-10-23 11:49:19 +00:00
Chris Maynard b44dcac8ba Fix a couple of typos.
svn path=/trunk/; revision=45375
2012-10-07 20:36:12 +00:00
Evan Huus 8bcc1ed05c Add modelines to packet-radius, and fix a bit of indentation.
svn path=/trunk/; revision=45358
2012-10-06 23:52:02 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Evan Huus 826bba705b From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728
Make right-click + apply-as-filter work in the packet list for non-ethernet
frames (such as ieee 802.11 frames).

svn path=/trunk/; revision=44921
2012-09-15 20:16:14 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Michael Mann 3082032be6 convert GStrings to more "ephemeral friendly" use.
svn path=/trunk/; revision=44515
2012-08-15 13:56:59 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
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-08-10 22:55:02 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jakub Zawadzki e5be60bc81 Fix bug #5735
dissect_attribute_value_pairs() should be also called with NULL tree.
Broken from r29964.

svn path=/trunk/; revision=42899
2012-05-29 20:01:25 +00:00
pascal e5f3a74723 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7186 :
Link together access-request and access-challenge messages

svn path=/trunk/; revision=42656
2012-05-16 13:24:10 +00:00
Guy Harris b50b6a5b0b Don't create alternative fields for the encrypted value of a string
attribute unless the attribute is encrypted.

svn path=/trunk/; revision=42535
2012-05-10 01:54:33 +00:00
Guy Harris 47cd41dbda Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

For RADIUS, this means that, for string attributes that are encrypted,
we need separate fields for the encrypted and decrypted versions, the
former of which is an FT_BYTES (as its value is *NOT* a text string!)
and the latter of which is FT_STRING.

While we're at it:

	make some routines static that don't need to be exported;

	"encrypt=" takes a value between 1 and 3 - get the value from
	the dictionary and store it, and only do User-Password-style
	decryption for encrypt=1 attributes;

	rename "hf64" to "hf_alt", as it's a general "alternate field",
	used for 64-bit values for integral attributess, IPv6 addresses
	for "combo IP" attributes, and encrypted values for string
	fields;

	give the URL for the FreeRADIUS dictionary file format man page.

svn path=/trunk/; revision=42530
2012-05-10 01:01:18 +00:00
Chris Maynard ec696f6dc0 Display CHAP password's Ident and String components.
svn path=/trunk/; revision=42442
2012-05-05 18:54:27 +00:00
Chris Maynard 1aaa8207f4 Properly decrypt user-password according to http://tools.ietf.org/html/rfc2865#section-5.2
This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6779
#BACKPORT

svn path=/trunk/; revision=42388
2012-05-02 20:37:59 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jörg Mayer 8eea660237 small whitespace fix
svn path=/trunk/; revision=40918
2012-02-07 14:01:24 +00:00
Jörg Mayer 2097912587 Rename crypt-xxx to xxx
svn path=/trunk/; revision=40511
2012-01-15 12:29:44 +00:00
Anders Broman c4a88586f3 Use packet-radius.c to dissect embedded AVP:s.
svn path=/trunk/; revision=40288
2011-12-25 11:25:39 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly 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-10-04 22:44:31 +00:00
Bill Meier dbae8e445c Update based upon latest names "packet-type-codes" list from the IANA:
- Change some type-code names to match IANA list;
- Handle additional type-codes as given in the IANA list;
- Don't consider certain "attribute types" to be valid packet-type codes
  See Bug 6335: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6335
- Minor code cleanup.

svn path=/trunk/; revision=38997
2011-09-14 18:45:06 +00:00
Guy Harris 41738f3aa8 Add some notes about attributes with a special format.
svn path=/trunk/; revision=37529
2011-06-03 01:26:08 +00:00
Bill Meier a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Gerald Combs ed25109219 Fix the warnings in Coverity CIDs 606-608.
svn path=/trunk/; revision=36671
2011-04-16 21:38:21 +00:00
Anders Broman 8d6ca293dc Change the signature of elem_fcn():ns to include pinfo.
svn path=/trunk/; revision=36443
2011-04-04 14:37:25 +00:00
Chris Maynard 2cc88f04a1 Don't bother creating/finding conversations if we're encapsulated within an
error packet, such as an ICMP destination unreachable.  Prior to this change,
I had captures that showed such encapsulated requests with responses indicated
in other frames, which obviously can't be true.

svn path=/trunk/; revision=36169
2011-03-08 18:52:12 +00:00
Chris Maynard 4d20bdd60d Conversation tracking must be handled whether "tree" is NULL or not.
svn path=/trunk/; revision=36168
2011-03-08 18:33:45 +00:00
Jörg Mayer cf8c877d0d Add support for the pre-rfc DAE port 1700
svn path=/trunk/; revision=36167
2011-03-08 18:29:30 +00:00
Jeff Morriss 6e0fcb7ab5 Introduce, and start using, tvb_eth_to_str().
Export tvb_*_to_str() and put them in alphabetical order.

svn path=/trunk/; revision=35602
2011-01-21 02:48:55 +00:00
Guy Harris 785f7b5191 Use report_failure() to report problems reading the RADIUS dictionary,
so it shows up in the GUI in Wireshark.

svn path=/trunk/; revision=35427
2011-01-08 17:06:04 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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-12-20 05:35:29 +00:00
Bill Meier 209109c2fd Define some fcns & vars as static ...
svn path=/trunk/; revision=34458
2010-10-10 20:07:06 +00:00
Bill Meier 7219ee2a49 Use val_to_str_ext() & friends to access sminmpec_values[];
Also: packet-nhrp.c: #include sminmpec.h not req'd;

svn path=/trunk/; revision=34143
2010-09-17 04:51:21 +00:00
Guy Harris 927b7da346 Have abs_time_to_str() and abs_time_to_str_secs() take an additional
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-05-21 06:33:25 +00:00
Guy Harris 500eb99cd9 Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
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
2010-02-27 19:01:27 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Guy Harris 4fde145bd2 Add an argument to abs_time_to_str() and abs_time_secs_to_str()
indicating whether the time should be shown as local time or UTC.  For
now, always pass FALSE, meaning "show as local time".

Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.

svn path=/trunk/; revision=31227
2009-12-10 22:19:29 +00:00
Bill Meier f3c1957f7c Fix Bug 4316: Crash when using custom RADIUS dictionary.
(The bug was caused by a variable not being initialized).
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4316

svn path=/trunk/; revision=31221
2009-12-10 18:13:38 +00:00
Guy Harris 6e478c4f6b Initialize radius_call, so it's null if we don't pass through the code
path that sets it.

svn path=/trunk/; revision=30524
2009-10-12 00:32:34 +00:00