aboutsummaryrefslogtreecommitdiffstats
path: root/packet-kerberos.c
AgeCommit message (Collapse)AuthorFilesLines
2001-04-15Assorted cleanups.Guy Harris1-5/+5
svn path=/trunk/; revision=3305
2001-04-15Tvbuffify the ASN.1 code and the Kerberos, LDAP, and SNMP dissectors.Guy Harris1-209/+253
Clean up some problems that revealed. svn path=/trunk/; revision=3301
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-3/+5
"{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-03Ensure that all value_string arrays end in {0, NULL}. Dissectors got awayGilbert Ramirez1-4/+10
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-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-2/+2
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
2000-12-26added KRB-ERROR response dissectionNathan Neulinger1-16/+269
svn path=/trunk/; revision=2785
2000-12-25If a PrincipalName has at least one name-string, put the first of theGuy Harris1-1/+19
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-24Added kerberos name types and lookup in PrincName dissectNathan Neulinger1-20/+75
Cipher: to CipherText: ETYPE to ENCTYPE to agree with krb5 headers Added additional preauth types svn path=/trunk/; revision=2779
2000-12-24Rename "asn1_octet_string_value_decode()" toGuy Harris1-358/+649
"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-22added a couple of msg types - in particular - ERROR responseNathan Neulinger1-2/+14
svn path=/trunk/; revision=2770
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris1-2/+2
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-13Move "bytes_to_str()" to "strutil.c" from "packet.c" - it's just aGuy Harris1-1/+3
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-09-06Check that columns are enabled and that COL_INFO exists before addingGilbert Ramirez1-4/+7
to it (in the *_OR_DIE macros). svn path=/trunk/; revision=2390
2000-08-13Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel1-1/+3
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-11Not all compilers like zero-length arrays; comment out the definition ofGuy Harris1-1/+5
"hf[]", and the reference to it, for now. svn path=/trunk/; revision=2253
2000-08-11Kerberos 5 dissector, from Wes Hardaker.Guy Harris1-0/+944
svn path=/trunk/; revision=2250