First changes to properly support RFC1964 so that GSSAPI GetMIC and other
authorsharpe <sharpe@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 23 May 2003 17:46:06 +0000 (17:46 +0000)
committersharpe <sharpe@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 23 May 2003 17:46:06 +0000 (17:46 +0000)
tokens can be handled.

Really, dissect-spnego-krb5 or whatever, should be renamed to something like
dissect-gssapi-tokens or dissect-gssapi-rfc1964 ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7724 f5534014-38df-0310-8fa8-9805f1628bb7

packet-rpc.c
packet-spnego.c

index 20f1a7550d289492d95b8e9336ee7f329a82507d..97adf3a4204354fa31ae51a5565d2efddd1889a5 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for rpc dissection
  * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
  *
- * $Id: packet-rpc.c,v 1.130 2003/05/22 21:39:44 sharpe Exp $
+ * $Id: packet-rpc.c,v 1.131 2003/05/23 17:46:05 sharpe Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -1062,7 +1062,6 @@ dissect_rpc_authgss_token(tvbuff_t* tvb, proto_tree* tree, int offset,
        len_consumed = call_dissector(gssapi_handle, new_tvb, pinfo, gtree);
        offset += len_consumed;
        offset = rpc_roundup(offset);
-
        return offset;
 }
 
@@ -2477,11 +2476,15 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                break;
        }
 
-       /* dissect any remaining bytes (incomplete dissection) as pure data in
-          the ptree */
-       call_dissector(data_handle,
-           tvb_new_subset(tvb, offset, -1, -1), pinfo, ptree);
+        if (tvb_length_remaining(tvb, offset) > 0) {  
+          /* 
+           * dissect any remaining bytes (incomplete dissection) as pure 
+           * data in the ptree 
+           */
 
+          call_dissector(data_handle,
+              tvb_new_subset(tvb, offset, -1, -1), pinfo, ptree);
+        }
 
        /* XXX this should really loop over all fhandles registred for the frame */
        if(nfs_fhandle_reqrep_matching){
index aab1093e2dde9ad32b2f7ed0f7bae4486bb11948..bf2557192c4c947c7d32f31babc53ce7d0abe567 100644 (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.42 2003/02/17 17:32:59 sharpe Exp $
+ * $Id: packet-spnego.c,v 1.43 2003/05/23 17:46:06 sharpe Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -176,6 +176,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        ASN1_SCK hnd;
        gboolean def;
        guint len1, cls, con, tag, oid_len, nbytes;
+       guint16 token_id = 0;
        subid_t *oid;
        gchar *oid_string;
        gssapi_oid_value *value;
@@ -269,6 +270,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                /* Next, the token ID ... */
 
+               token_id = tvb_get_letohs(tvb, offset);
                proto_tree_add_item(subtree, hf_spnego_krb5_tok_id, tvb, offset, 2,
                                    TRUE);
 
@@ -291,6 +293,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        } else {
            /* Next, the token ID ... */
 
+           token_id = tvb_get_letohs(tvb, offset);
            proto_tree_add_item(subtree, hf_spnego_krb5_tok_id, tvb, offset, 2,
                                TRUE);
 
@@ -299,9 +302,31 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            offset += 2;
        }
 
-       krb5_tvb = tvb_new_subset(tvb, offset, -1, -1); 
+       switch (token_id) {
 
-       offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE);
+       case KRB_TOKEN_AP_REQ:
+       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);
+         break;
+
+       case KRB_TOKEN_GETMIC:
+
+         break;
+
+       case KRB_TOKEN_WRAP:
+
+         break;
+
+       case KRB_TOKEN_DELETE_SEC_CONTEXT:
+
+         break;
+
+       default:
+
+         break;
+       }
 
  done:
        return;