Commit Graph

49 Commits

Author SHA1 Message Date
Ronnie Sahlberg 3353ca1d5a for netbios type addresses in kerberos
print the netbios type as hex and not decimal

svn path=/trunk/; revision=10235
2004-02-25 07:52:37 +00:00
Ronnie Sahlberg 0b94f16891 update to kerberos. now also decrypting the KRB_PRIB blobs
(application 21) of kerberos v5.
there are commonly found in Kpasswd packets.

Not too interesting yet until we start supporting decryption of kerberos
blobs using mit/heimdal kerveros shared libraries.

svn path=/trunk/; revision=10197
2004-02-23 08:39:42 +00:00
Ronnie Sahlberg dce73d4e1f Update to Kerberos.
Split kerberos prototype into two halves:
helpers to dissect ASN.1 BER in packet-ber.c
and kerberos stuff using those helpers in packet-kerberos.c

This new kerberos thing places filterable items for every single field
and also dissects the bitstring Option fields.

It is hoped that this will make it easier to extend kerberos to do decryption of service tickets.

svn path=/trunk/; revision=10122
2004-02-20 10:04:10 +00:00
Guy Harris 506a842a42 "%.*" requires an "int" argument for the length.
svn path=/trunk/; revision=9803
2004-01-23 09:50:47 +00:00
Guy Harris 0e88c900ff Fix a check.
svn path=/trunk/; revision=9761
2004-01-21 01:10:20 +00:00
Guy Harris f85630766d The offset argument to a "get_pdu_len" function is an "int", not a
"guint".

svn path=/trunk/; revision=9759
2004-01-20 20:32:25 +00:00
Jörg Mayer ccacfeebeb signed/unsigned warning fixes
svn path=/trunk/; revision=9754
2004-01-20 19:24:42 +00:00
Ronnie Sahlberg e83aeb6431 update to kerberos
if the kerberos blob contains a krb error, print the error string to COL_INFO

svn path=/trunk/; revision=9170
2003-12-04 08:15:20 +00:00
Guy Harris d1819d7c34 As "dissect_ap_options()" isn't compiled in, don't mark its arguments as
unused; presumably it'll either

	1) get written, in which case if an argument isn't used it
	   shouldn't be supplied

or

	2) be removed, in which case there aren't any arguments.

svn path=/trunk/; revision=7983
2003-07-08 06:39:13 +00:00
Tim Potter 05330d4ac9 Fix some unused parameter and function warnings.
svn path=/trunk/; revision=7981
2003-07-08 04:06:26 +00:00
Richard Sharpe 47817bcb26 Fix a small segmentation fault if we get an ASN.1 parse error, and
start to work on kerberos flags etc.

Also prettied up the case where the responseToken was an empty string.

svn path=/trunk/; revision=7767
2003-06-01 20:34:20 +00:00
Guy Harris a7b02e051a Show the URL of the I-D giving information on Kerberos-over-TCP.
svn path=/trunk/; revision=7565
2003-04-25 21:30:42 +00:00
Guy Harris 0e48f176af From Tony Schene: Kerberos-over-TCP support.
svn path=/trunk/; revision=7564
2003-04-25 21:29:19 +00:00
Guy Harris 5d3283f7e8 Fix a typo in Richard's name.
Add some additional information from

	http://www.isi.edu/people/bcn/krb-revisions/krbclar8-1.html

svn path=/trunk/; revision=6245
2002-09-10 08:55:34 +00:00
Guy Harris 9207c4b0c3 Add Microsoft's RC4-HMAC and exportable(?) RC4-HMAC encryption types.
svn path=/trunk/; revision=6242
2002-09-10 02:15:55 +00:00
Guy Harris deb560618d KRB_DECODE_STRING_OR_DIE, and variants thereof, set "val_len" to the
length of the string value and "item_len" to the length of the entire
BER item, including the type header.  As such, "val_len", not
"item_len", should be used when formatting the value, and "item_len",
not "val_len", should be used as the length when putting the item into
the protocol tree and when advancing the offset.

The kvno in an encryptedData item is unsigned; display it as such.

svn path=/trunk/; revision=6231
2002-09-08 22:41:23 +00:00
Richard Sharpe 95c2dfb4b3 Decode AP-REQ and AP-REP KRB5 message types ...
svn path=/trunk/; revision=6211
2002-09-07 08:43:04 +00:00
Richard Sharpe 5739c418b7 OK, now have KRB5 dissector playing nice.
svn path=/trunk/; revision=6209
2002-09-07 03:32:49 +00:00
Richard Sharpe 97a92267db Commit my changes to handle KRB5 in SPNEGO ...
Turns out it is a KRB5 AP-REQ ASN1 encoded, and the Kerberos dissector is
going to need to be re-architected to deal with this.

svn path=/trunk/; revision=6187
2002-09-05 03:49:03 +00:00
Richard Sharpe 174fb49854 Add some level of OID naming etc ...
svn path=/trunk/; revision=6180
2002-09-04 21:34:38 +00:00
Richard Sharpe 9e310b26b3 Add the OID that MS created for KRB5 in mistake.
svn path=/trunk/; revision=6164
2002-09-01 01:31:55 +00:00
Guy Harris 4e4000a12d Make "gssapi_init_oid()" take a dissector handle rather than a
registered dissector name; that means you don't have to register a
dissector by name to associate it with a GSS-API security mechanism OID.

svn path=/trunk/; revision=6163
2002-08-31 22:22:29 +00:00
Guy Harris d2143a880e Include "packet-gssapi.h" to declare routines we call.
svn path=/trunk/; revision=6142
2002-08-30 10:05:26 +00:00
Richard Sharpe 765bad85dc Some more SPNEGO fixes. Getting much closer ...
svn path=/trunk/; revision=6140
2002-08-30 06:11:35 +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 ccf2372350 Display NetBIOS names in standard NetBIOS-name style if they have the
right length, and display them with an error indication and using
"format_text()" if they're not ("format_text()" deals with the string
not being null-terminated, and handles non-printable characters).

svn path=/trunk/; revision=6061
2002-08-22 08:47:13 +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
Richard Sharpe 4298a1f07d Committing Kerberos NetBIOS address type stuff from Jim McDonough.
svn path=/trunk/; revision=5908
2002-07-29 02:03:54 +00:00
Guy Harris f2d63e674e From Joerg Mayer: get rid of unused "title" arguments for
"dissect_Ticket()" and "dissect_Addresses()".

svn path=/trunk/; revision=5319
2002-05-01 00:01:57 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Guy Harris bced8711f6 Make "dissector_add()", "dissector_delete()", and "dissector_change()"
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID.  Associate dissector handles with
dissector table entries.

svn path=/trunk/; revision=4308
2001-12-03 04:00:26 +00:00
Gilbert Ramirez 6de396c4a8 Fix the rest of the signed/unsigned comparison warnings.
svn path=/trunk/; revision=4088
2001-10-26 18:28:17 +00:00
Guy Harris 560c310237 Assorted cleanups.
svn path=/trunk/; revision=3305
2001-04-15 08:50:37 +00:00
Guy Harris b0e06bd8d1 Tvbuffify the ASN.1 code and the Kerberos, LDAP, and SNMP dissectors.
Clean up some problems that revealed.

svn path=/trunk/; revision=3301
2001-04-15 07:30:03 +00:00
Guy Harris 43ccfd8054 Add an additional "protocol index" argument to "{old_}dissector_add()",
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and
"register_dissector()", so that an entry in those tables has associated
with it the protocol index of the protocol the dissector handles (or -1,
if there is no protocol index for it).

This is for future use in a number of places.

(Arguably, "proto_register_protocol()" should take a dissector pointer
as an argument, but

	1) it'd have to handle both regular and heuristic dissectors;

	2) making it take either a "dissector_t" or a union of that and
	   a "heur_dissector_t" introduces some painful header-file
	   interdependencies

so I'm punting on that for now.  As with other Ethereal internal APIs,
these APIs are subject to change in the future, at least until Ethereal
1.0 comes out....)

svn path=/trunk/; revision=2849
2001-01-09 06:32:10 +00:00
Gilbert Ramirez 5b7f184296 Ensure that all value_string arrays end in {0, NULL}. Dissectors got away
with not terminating their arrays because they knew the limits of the
value used to look up strings in the value_string array, but the
dfilter_expr_dlg does not know these limits and must rely on the terminating
{0, NULL} record.

Also, in SNA fixed a bug in which a field should have been defined as FT_UINT8
but was defined as FT_BOOLEAN.

In WTP, fixed a value string which had duplicate keys.

svn path=/trunk/; revision=2817
2001-01-03 16:41:08 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2810
2001-01-03 06:56:03 +00:00
Nathan Neulinger 79434f2dcf added KRB-ERROR response dissection
svn path=/trunk/; revision=2785
2000-12-26 16:44:43 +00:00
Guy Harris 6de8fb2070 If a PrincipalName has at least one name-string, put the first of the
name strings into the top-level tree item for the PrincipalName, along
the lines of what was done earlier.

svn path=/trunk/; revision=2781
2000-12-25 06:59:33 +00:00
Nathan Neulinger 9314e65702 Added kerberos name types and lookup in PrincName dissect
Cipher: to CipherText:
ETYPE to ENCTYPE to agree with krb5 headers
Added additional preauth types

svn path=/trunk/; revision=2779
2000-12-24 22:00:55 +00:00
Guy Harris 60f9476740 Rename "asn1_octet_string_value_decode()" to
"asn1_string_value_decode()", as it can be used for various character
string types as well.

Turn "asn1_octet_string_decode()" into "asn1_string_decode()", which
takes an additional argument giving the tag expected for the string in
question, and make "asn1_octet_string_decode()" a wrapper around it.

Clean up the ASN.1 dissection in the Kerberos dissector, making more use
of the code in "asn1.c", wrapping more operations up in macros, and
doing some more type checking.

Use "REP" rather than "RESP" in names and strings; "REP" is what the
Kerberos spec uses.

Make the routines in the Kerberos dissector not used outside that
dissector static.

Fix some problems with the dissection of strings in the Kerberos
dissector (it was extracting the data from the wrong place in the
packet).

In Kerberos V5, the "kvno" item in the EncryptedData type is optional;
treat it as such.

Treat integers as unsigned in the Kerberos dissector.

svn path=/trunk/; revision=2777
2000-12-24 09:10:12 +00:00
Nathan Neulinger e7c08b87ae added a couple of msg types - in particular - ERROR response
svn path=/trunk/; revision=2770
2000-12-22 21:43:53 +00:00
Guy Harris 252d55d80f For each column, have both a buffer into which strings for that column
can be put, and a pointer to the string for the column, which might or
might not point to that buffer.

Add a routine "col_set_str()", which sets the string for the column to
the string passed to it as an argument; it should only be handed a
static string (a string constant would be ideal).  It doesn't do any
copying, so it's faster than "col_add_str()".

Make the routines that append to columns check whether the pointer to
the string for the column points to the buffer for the column and, if
not, copy the string for the column to the buffer for the column so that
you can append to it (so you can use "col_set_str()" and then use
"col_append_str()" or "col_append_fstr()").

Convert a bunch of "col_add_str()" calls that take a string constant as
an argument to "col_set_str()" calls.

Convert some "col_add_fstr()" calls that take a string constant as the
only argument - i.e., the format string doesn't have any "%" slots into
which to put strings for subsequent arguments to "col_set_str()" calls
(those calls are just like "col_add_str()" calls).

Replace an END_OF_FRAME reference in a tvbuffified dissector with a
"tvb_length(tvb)" call.

svn path=/trunk/; revision=2670
2000-11-19 08:54:37 +00:00
Guy Harris 99c98f9e74 Move "bytes_to_str()" to "strutil.c" from "packet.c" - it's just a
string formatter, like "format_text()", and, as "tvbuff.c" now calls it
(*vide infra*), we don't want to have to make "tvbuff.c" drag "packet.h"
in just to declare "bytes_to_str()".  It's now declared in "strutil.h",
so include it in modules that use "bytes_to_str()" and weren't already
including it.

Add a "tvb_bytes_to_str()" wrapper that calls "tvb_get_ptr()" to get a
pointer to a chunk of N bytes at a given offset in a tvbuff and then
hands that chunk to "bytes_to_str()".  Convert the code that was doing
that to use "tvb_bytes_to_str()" instead (which caught what I suspect is
a bug in the Q.2931 dissector, where it was handing an offset of 0 to
"tvb_get_ptr()" - a cut-and-pasteo, I think).

Tvbuffify the ARP dissector.

svn path=/trunk/; revision=2634
2000-11-13 07:19:37 +00:00
Gilbert Ramirez c50091ed92 Check that columns are enabled and that COL_INFO exists before adding
to it (in the *_OR_DIE macros).

svn path=/trunk/; revision=2390
2000-09-06 19:05:41 +00:00
Laurent Deniel cc36f0b931 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2267
2000-08-13 14:09:15 +00:00
Guy Harris 6ad00fc256 Not all compilers like zero-length arrays; comment out the definition of
"hf[]", and the reference to it, for now.

svn path=/trunk/; revision=2253
2000-08-11 08:21:07 +00:00
Guy Harris fa7f38180a Kerberos 5 dissector, from Wes Hardaker.
svn path=/trunk/; revision=2250
2000-08-11 03:32:53 +00:00