* Copyright 2002, Richard Sharpe <rsharpe@ns.aus.com>
* Copyright 2003, Richard Sharpe <rsharpe@richardsharpe.com>
*
- * $Id: packet-spnego.c,v 1.54 2004/04/30 22:19:43 guy Exp $
+ * $Id: packet-spnego.c,v 1.56 2004/06/04 01:56:25 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
static dissector_handle_t data_handle;
+static dissector_handle_t
+gssapi_dissector_handle(gssapi_oid_value *next_level_value) {
+ if (next_level_value == NULL) {
+ return NULL;
+ }
+ return next_level_value->handle;
+}
+
static void
dissect_parse_error(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, const char *field_name, int ret)
* return.
*/
krb5_tvb = tvb_new_subset(tvb, offset, -1, -1);
- offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE);
+ offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE, NULL);
return;
default:
case KRB_TOKEN_AP_REP:
case KRB_TOKEN_AP_ERR:
krb5_tvb = tvb_new_subset(tvb, offset, -1, -1);
- offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE);
+ offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE, NULL);
break;
case KRB_TOKEN_GETMIC:
case SPNEGO_mechToken:
offset = dissect_spnego_mechToken(tvb, offset, pinfo, subtree,
- hnd, (*next_level_value_p)->handle);
+ hnd, gssapi_dissector_handle(*next_level_value_p));
break;
case SPNEGO_mechListMIC:
offset = dissect_spnego_mechListMIC(tvb, offset, pinfo, subtree,
- hnd, (*next_level_value_p)->handle);
+ hnd, gssapi_dissector_handle(*next_level_value_p));
break;
default:
case SPNEGO_responseToken:
offset = dissect_spnego_responseToken(tvb, offset, pinfo, subtree,
- hnd,
- (*next_level_value_p != NULL) ?
- (*next_level_value_p)->handle :
- NULL);
+ hnd, gssapi_dissector_handle(*next_level_value_p));
break;
case SPNEGO_mechListMIC:
offset = dissect_spnego_mechListMIC(tvb, offset, pinfo, subtree,
- hnd,
- (*next_level_value_p != NULL) ?
- (*next_level_value_p)->handle :
- NULL);
+ hnd, gssapi_dissector_handle(*next_level_value_p));
break;
default: