Commit Graph

103 Commits

Author SHA1 Message Date
Guy Harris 0f9c41f8a5 Get rid of CR's.
svn path=/trunk/; revision=10534
2004-03-31 20:57:42 +00:00
Anders Broman 12d2805f88 Add RADIUS AVP 101, the value string to go with it and some ACC vendor AVP:s
svn path=/trunk/; revision=10533
2004-03-31 20:25:40 +00:00
Guy Harris 51c9b679ad From Michael Kopp: add support for vendor-specific items for the Cisco
VPN 3000 Concentrator, Cisco VPN 5000 Concentrator and Cisco Broadband
Service Manager.

svn path=/trunk/; revision=10519
2004-03-30 18:23:54 +00:00
Gerald Combs eaafb5af48 Handle null RADIUS attribute information without crashing. Found by
Jonathan Heusser.

svn path=/trunk/; revision=10434
2004-03-22 16:05:48 +00:00
Guy Harris b1713c14a5 If we can't decrypt the user password, display it as hex data, not as
text.

Make "rdconvertbufftostr()" use "isprint()" to determine whether to
display a character as itself or as an escape.  Move our redefinition of
"isprint()" above "rdconvertbufftostr()" so that we make the "is it
printable?" decision appropriately.

svn path=/trunk/; revision=10423
2004-03-20 19:09:22 +00:00
Guy Harris 69f4254b00 Make a separate display type for the user password, rather than having
the code to handle RADIUS_STRING know that User Password has an AVP type
value of 2.  As only the User Password field has that display type, we
don't have to check whether we're handling vendor-specific VSAs.

svn path=/trunk/; revision=10422
2004-03-20 18:51:08 +00:00
Jörg Mayer 6706051035 Lars Roland: Another ugly bzero() call fixed
svn path=/trunk/; revision=10351
2004-03-09 01:08:27 +00:00
Guy Harris 7d1c080e78 Get rid of a variable I'd forgotten to back out before I checked the
code in.

svn path=/trunk/; revision=10339
2004-03-07 02:57:54 +00:00
Guy Harris d3dc33ec1b Note that for THE3GPP_IPV6_DNS_SERVERS we probably *do* need to handle
multiple IPv6 addresses.

svn path=/trunk/; revision=10338
2004-03-06 22:17:28 +00:00
Guy Harris 5d4ee9fe20 From Fritz Budiyanto: add various IPv6 attributes as per RFC 3162, and
also handle the THE3GPP_IPV6_DNS_SERVERS attribute.

svn path=/trunk/; revision=10337
2004-03-06 22:06:26 +00:00
Guy Harris a74ba11d8a Update URLs for various IANA documents.
svn path=/trunk/; revision=10262
2004-02-28 22:56:36 +00:00
Guy Harris 1b36210318 We can't test the GTK+ version in dissectors or libethereal code, as
they don't include any GTK+ headers (and shouldn't do so, as they can't
use GTK+); we use the GLib version as a proxy.

svn path=/trunk/; revision=9982
2004-02-05 09:42:26 +00:00
Jörg Mayer ce1356b88c Undo previous checkin, it only contained acidentally escaped unfinished code
svn path=/trunk/; revision=9939
2004-02-01 06:56:52 +00:00
Jörg Mayer 38faa0f27b packet-dcerpc-afs4int.c
svn path=/trunk/; revision=9938
2004-02-01 06:49:25 +00:00
Guy Harris 9027f02a1d From Joost Yervante Damad:
add 3 new vendors;

	add 3 non-encapsulated Merit vendor-specific attributes;

	display the authenticator in the protocol tree.

svn path=/trunk/; revision=9651
2004-01-13 03:30:15 +00:00
Guy Harris e6f433d884 Do the "isprint()" hack for GTK+ 2.x or 1.3[.x], whether on UNIX or
Windows - the problem is that GTK+ 1.3[.x] and later assume strings
handed to them are UTF-8 strings, not, for example, ISO 8859/x strings.

In packet-radius.c, re-define "isprint()" rather than #ifdeffing its use
(the old code was also incorrectly treating 0x7f as a printable).

svn path=/trunk/; revision=9435
2003-12-24 01:12:17 +00:00
Guy Harris ccf7ade467 Pass "attr_info" to "rd_value_to_str()" - don't look it up again in
"rd_value_to_str()".

Handle a null return from "find_radius_attr_info()".

We don't have to reserve a value type of 0 for "not found in the table"
- a null return from "find_radius_attr_info()" indicates that.

Hoist the code to make the top-level item for an AVP above the check for
an EAP message.

svn path=/trunk/; revision=9313
2003-12-17 07:05:22 +00:00
Guy Harris 653af411dd According to RFC 2868, a tag value of 0 is not valid for a string - we
just treat a 0 tag byte as the first byte of the string.

svn path=/trunk/; revision=9308
2003-12-17 02:24:53 +00:00
Guy Harris 5725e34ef4 Call the "type" member of a "radius_attr_info" structure "value_type"
(as it's the type of the value for that attribute, e.g. integer, string,
binary string, time, ...), and call "val1" "attr_type" (as it's the
"type" field value for that attribute in RADIUS packets).

Add a type for EAP messages, and check for EAP messages using the value
type.

For tagged integers, fetch the tag and value separately.

Fix the tagged-integer code to overwrite the buffer rather than
appending to it.

svn path=/trunk/; revision=9307
2003-12-17 02:17:40 +00:00
Guy Harris f15415bda4 Put in more information about the attribute type enum.
Get rid of "rd_value_to_str()", pulling its code up into the one place
it's called, and rename "rd_value_to_str_2()" to "rd_value_to_str()"
(and get rid of its return value - it just returns its first argument).

Make "textbuffer" and "vsabuffer" local variables in
"dissect_attribute_value_pairs()".

Get rid of "rd_match_strval_attrib()" - just fetch the full
radius_attr_info entry and use its "str" member.

svn path=/trunk/; revision=9306
2003-12-17 01:57:23 +00:00
Guy Harris 4de034bafd Instead of having a whole pile of RADIUS value types, each of which has
a value_string table associated with it, just have them all be
RADIUS_INTEGER4 or RADIUS_INTEGER4_TAGGED, and add to the table of value
tags/value types/value names a pointer to a value_string table - if it's
null, just show the value, otherwise use the table.

Use that for the 3GPP protocol type field as well, with a value_string
table, rather than doing a switch.

Constify a bunch of tables.

Replace "get_vsa_table()" with "get_attr_info_table()", which returns
the attribute information table for the vendor in question, or NULL.

Fix the handling of IPX addresses.

svn path=/trunk/; revision=9304
2003-12-17 00:41:46 +00:00
Guy Harris 8ce34a3cbd Add a new attribute type RADIUS_IP6_ADDRESS for IPv6 addresses.
Put in a note explaining the enum for those types.

From Rui Carmo: add all 3GPP VSA's.

svn path=/trunk/; revision=9217
2003-12-09 05:10:25 +00:00
Jörg Mayer 56e66f0293 - Bugfix: Passworddecoding should only be done for attribute 2, but
not for VSA 2
- Fixme comment about length handling added
- Cleanup: Setting a variable to the right type removes the necessity
          for casts.

svn path=/trunk/; revision=9067
2003-11-22 12:02:49 +00:00
Guy Harris d4e29bafd6 From Michael Kopp: add some entries for Cisco VSA for SSG Communication
via Radius Packets.

svn path=/trunk/; revision=8023
2003-07-15 22:16:52 +00:00
Guy Harris 71fefcc0c4 From Adam Sulmicki: report the message type for accounting status
messages and accounting messages.

svn path=/trunk/; revision=7956
2003-07-01 03:59:11 +00:00
Guy Harris 569e74a1f3 When registering a string preference, if the value of the preference is
NULL, convert it to a copy of a null string, otherwise replace it with a
copy of the string, so that we know that the variable for the preference
always points to a string that can be freed.

That also obviates the need to worry about a null-pointer value for a
preference variable when checking to see whether a preference has changed.

When checking for a string preference not being set, check for an empty
string, not a null pointer - the above code turns null pointers into
pointers to empty strings, *and* the GUI code does (and always did!) the
same.

svn path=/trunk/; revision=7342
2003-03-11 22:51:52 +00:00
Guy Harris c2594e7429 Fetch the time stamp into a gint32, as it's known to be 32 bits, and let
the call to "abs_time_secs_to_str()" convert it to a "time_t".

svn path=/trunk/; revision=7134
2003-02-13 03:05:14 +00:00
Guy Harris 5795b17d48 Cast "timeval" to "long", and print it with "%ld", to handle "time_t"
being an "int" or a "long".

svn path=/trunk/; revision=7133
2003-02-13 02:47:50 +00:00
Guy Harris 6c99ee4db0 Make the argument to "abs_time_secs_to_str()" a "time_t" - it's in ANSI
C, and it's the right thing to pass to "localtime()".

svn path=/trunk/; revision=7125
2003-02-12 00:44:04 +00:00
Guy Harris 1ad3b70b4b Add a "abs_time_secs_to_str()" routine that takes a UNIX time-since-the-
epoch-in-seconds value and converts it to a string.

Use that routine in the RADIUS dissector, rather than using "ctime()"
and "tzname[]" - "tzname[]" strings might contain non-ASCII characters,
which currently give the GTK+ 1.3[.x] used on Windows, and also, I
think, GTK+ 2.x, heartburn, as they expect UTF-8, not, for example, ISO
8859/1.

Fix the string length in "abs_time_to_str()".

svn path=/trunk/; revision=7124
2003-02-11 19:42:38 +00:00
Guy Harris 7d46021720 Do the usual "isprint()" workaround for versions of GTK+ that assume
UTF-8 strings.

svn path=/trunk/; revision=7020
2003-01-28 16:31:03 +00:00
Guy Harris 020effa6d0 Clean up the code a bit:
don't initialize variables that are set elsewhere before they're
	used;

	don't call "tvb_get_ptr()" to set a variable if you're not going
	to use that variable;

	make the two character-processing loops have the same structure;

	put the result of the XORing into an unsigned character, so it
	can be handed to "isprint()" without running the risk of bogus
	behavior if the 8th bit is set.

svn path=/trunk/; revision=6796
2002-12-17 22:49:33 +00:00
Olivier Abad f883bb7443 Replace #include "md5.h" with "crypt-md5.h".
svn path=/trunk/; revision=6795
2002-12-17 22:14:54 +00:00
Gerald Combs 9c0d1cbfb7 From James Harris: Decrypt RADIUS user passwords.
The MD5 is copyrighted by L. Peter Deutsch, and released under the same
license as zlib.  It is GPL-compatible, and should NOT have the GPL
applied to it.

svn path=/trunk/; revision=6790
2002-12-17 04:05:25 +00:00
Guy Harris 59932f2722 Don't cast away constness, and fix variable and structure member
qualifiers as necessary to ensure that we don't have to.

"strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't
test their results as if they did.

Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes.

Update Michael Tuexen's e-mail address.

svn path=/trunk/; revision=6726
2002-12-02 23:43:30 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris 320621f2f4 From Flavio Poletti: handle 3GPP QoS in RADIUS messages.
svn path=/trunk/; revision=6091
2002-08-26 20:22:31 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Guy Harris cc00331455 From Kan Sasaki:
1. Add some VSAs.

	2. Modify the routines match_numval() and
	   rd_match_strval_attrib() to use a null string pointer, rather
	   than a 0 value, to signify the end of the attribute table,
	   because some vendors are using an attribute with a value of 0.

	3. Bug fix.

svn path=/trunk/; revision=5890
2002-07-17 01:02:45 +00:00
Guy Harris ffe5c2cbe9 From Thierry Pelle: Redback vendor-specific items for RADIUS and L2TP.
svn path=/trunk/; revision=5856
2002-07-10 20:55:45 +00:00
Guy Harris 392a7dfc04 Get rid of the "data_src" member of the "frame_data" structure; put it
in the "packet_info" structure instead, as we don't need a pointer for
every single frame in the capture file, just for each frame for which we
currently have an open "epan_dissect_t".

svn path=/trunk/; revision=5614
2002-06-04 07:03:57 +00:00
Guy Harris 5427c55fb4 Bug fix from Kan Sasaki.
svn path=/trunk/; revision=5539
2002-05-24 03:21:23 +00:00
Guy Harris ae185d3e9c Update from Kan Sasaki.
svn path=/trunk/; revision=5465
2002-05-14 10:40:25 +00:00
Guy Harris abfac9ae93 From Kan Sasaki: added some VSAs from the FreeRadius dictionary files
and other changes to RADIUS.

Export the Q.931 cause location and code values, and use them in the
RADIUS dissector for ACC cause codes and values.

Make "CHAP" all caps, as it should be, and use InterCaps in AppleTalk
(Apple does).

The CHAP Challenge is an octet string, not a text string - the
FreeRadius dictionary has an error there.

In "rdconvertinttostr()", if there's no value_string table, just print
the value numerically, don't call "rd_match_strval()".

Don't pass a null value_string pointer to "rd_match_strval_attrib()" -
just report the value, without attempting to find a string for it.

svn path=/trunk/; revision=5460
2002-05-14 09:24:27 +00:00
Guy Harris 0b22c885cb From Kan Sasaki:
1. merge '#define XXX', XXX_printinfo and XXX_attrib_type_vals
	   into XXX_attrib to make it easy to add new attributes.

	2. put decoded VSAs as sub item.

Update comments to reflect those changes.

svn path=/trunk/; revision=5455
2002-05-13 08:57:43 +00:00
Guy Harris 7181a4d327 From Kan Sasaki: VSA decoding and other changes to RADIUS.
svn path=/trunk/; revision=5416
2002-05-08 08:13:08 +00:00
Guy Harris 08b87db529 Note in comments that we should perhaps get all the information for
RADIUS attributes from files like the FreeRadius dictionary files,
rather than compiling them into the RADIUS dissector.

svn path=/trunk/; revision=5403
2002-05-06 00:58:28 +00:00
Guy Harris 87b92007d1 Fix a typo in a comment.
When displaying text strings, show escapes in octal (as is done C)
rather than decimal.

Display RADIUS_BINSTRING values as strings of hex digits rather than as
text strings.

Make some items that apparently *are* text strings RADIUS_STRING rather
than RADIUS_BINSTRING.

The return value of "rdconvertbufftostr()" is never used; get rid of it.

svn path=/trunk/; revision=5402
2002-05-06 00:49:19 +00:00
Guy Harris db31932941 From Joerg Mayer:
Declares some variables static.

	Creates a new include file packet-rsvp.h, and make use of it
	(change some extern decls to #inlcude).

	Move the file packet-pgm.h into packet-pgm.c as it is not used
	by anything outside packet-pgm.c.

svn path=/trunk/; revision=5162
2002-04-14 23:04:04 +00:00
Gilbert Ramirez 5c10ad55a8 More static-ization.
svn path=/trunk/; revision=5131
2002-04-08 20:30:56 +00:00