Ethereal-dev: Re: [Ethereal-dev] kerberos stuff and nettle question

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 21 Feb 2004 01:17:57 -0800
On Fri, Feb 20, 2004 at 09:17:38PM +1100, Ronnie Sahlberg wrote:
> beware  i just checked in the completely new rewritten kerberos dissector
> together with asn.1 ber helpers in packet-ber.c

Why does "dissect_krb5_PA_DATA_value()" do

	if(ber_last_created_item){
		tree=proto_item_add_subtree(ber_last_created_item, ett_krb_PA_DATA_tree);
	}

That causes padata to show up as

    padata PA-TGS-REQ
        Type: PA-TGS-REQ (1)
            Value: 6E8204EB308204E7A003020105A10302...
                Pvno: 5
                MSG Type: AP-REQ (14)

			...

rather than as

    padata PA-TGS-REQ
        Type: PA-TGS-REQ (1)
        Value: 6E8204EB308204E7A003020105A10302...
            Pvno: 5
            MSG Type: AP-REQ (14)

		...

The type and value look as if they're at the same level in the hierarchy
(they're two members of a sequence), so the latter seems as if it's the
right way to display it - and that's what the old Kerberos dissector did:

    Pre-Authentication
        Type: PA-TGS-REQ
        Value: 6E8204EB308204E7A003020105A10302...

		...

It also simplifies the code (and gets rid of the necessity for the
global "ber_last_created_item" variable).