OK, now have KRB5 dissector playing nice.

svn path=/trunk/; revision=6209
This commit is contained in:
Richard Sharpe 2002-09-07 03:32:49 +00:00
parent 0a749ca6b4
commit 5739c418b7
3 changed files with 15 additions and 12 deletions

View File

@ -3,7 +3,7 @@
* Wes Hardaker (c) 2000
* wjhardaker@ucdavis.edu
*
* $Id: packet-kerberos.c,v 1.31 2002/09/05 03:49:03 sharpe Exp $
* $Id: packet-kerberos.c,v 1.32 2002/09/07 03:32:49 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -342,7 +342,7 @@ static const value_string krb5_msg_types[] = {
static int dissect_PrincipalName(char *title, ASN1_SCK *asn1p,
packet_info *pinfo, proto_tree *tree,
int start_offset);
int dissect_Ticket(ASN1_SCK *asn1p, packet_info *pinfo,
static int dissect_Ticket(ASN1_SCK *asn1p, packet_info *pinfo,
proto_tree *tree, int start_offset);
static int dissect_EncryptedData(char *title, ASN1_SCK *asn1p,
packet_info *pinfo, proto_tree *tree,
@ -536,8 +536,8 @@ dissect_type_value_pair(ASN1_SCK *asn1p, int *inoff,
*inoff = offset + *val_len;
}
static gboolean
dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean
dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int do_col_info)
{
int offset = 0;
proto_tree *kerberos_tree = NULL;
@ -607,7 +607,7 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
offset += length;
if (check_col(pinfo->cinfo, COL_INFO))
if (do_col_info & check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(msg_type, krb5_msg_types,
"Unknown msg type %#x"));
@ -1028,7 +1028,7 @@ dissect_kerberos(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "KRB5");
dissect_kerberos_main(tvb, pinfo, tree);
dissect_kerberos_main(tvb, pinfo, tree, TRUE);
}
static int
@ -1267,7 +1267,7 @@ dissect_EncryptedData(char *title, ASN1_SCK *asn1p, packet_info *pinfo,
return offset - start_offset;
}
int
static int
dissect_Ticket(ASN1_SCK *asn1p, packet_info *pinfo,
proto_tree *tree, int start_offset)
{

View File

@ -1,6 +1,6 @@
/* packet-gssapi.h
*
* $Id: packet-kerberos.h,v 1.4 2002/09/07 00:29:28 jmayer Exp $
* $Id: packet-kerberos.h,v 1.5 2002/09/07 03:32:49 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,7 +26,7 @@
/* Function prototypes */
int dissect_Ticket(ASN1_SCK *asn1p, packet_info *pinfo,
proto_tree *tree, int start_offset);
gboolean
dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int do_col_info);
#endif /* __PACKET_KERBEROS_H */

View File

@ -4,7 +4,7 @@
* Copyright 2002, Tim Potter <tpot@samba.org>
* Copyright 2002, Richard Sharpe <rsharpe@ns.aus.com>
*
* $Id: packet-spnego.c,v 1.30 2002/09/07 00:29:29 jmayer Exp $
* $Id: packet-spnego.c,v 1.31 2002/09/07 03:32:49 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -136,6 +136,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
subid_t *oid;
gchar *oid_string;
gssapi_oid_value *value;
tvbuff_t *krb5_tvb;
item = proto_tree_add_item(tree, hf_spnego_krb5, tvb, offset,
length, FALSE);
@ -208,7 +209,9 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
offset += 2;
offset = dissect_Ticket(&hnd, pinfo, subtree, offset);
krb5_tvb = tvb_new_subset(tvb, offset, -1, -1);
offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE);
done:
return;