GIOP CosNaming support, from Frank Singleton.
[obnox/wireshark/wip.git] / packet-llc.c
index f6b6a5cbf03c9169f1264541f8d678d16c191130..d13fcde9528ee557659f04cfcc2a30edf5ea45fc 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for IEEE 802.2 LLC layer
  * Gilbert Ramirez <gram@xiexie.org>
  *
- * $Id: packet-llc.c,v 1.80 2001/01/11 07:24:17 guy Exp $
+ * $Id: packet-llc.c,v 1.87 2001/06/18 02:17:48 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -42,8 +42,7 @@
 #include "packet-ip.h"
 #include "packet-ipx.h"
 #include "packet-netbios.h"
-#include "packet-osi.h"
-#include "packet-sna.h"
+#include "sna-utils.h"
 
 #include "packet-llc.h"
 
@@ -170,8 +169,8 @@ http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/ibm_r
        { OUI_BRIDGED,     "Frame Relay or ATM bridged frames" },
                                /* RFC 2427, RFC 2684 */
        { OUI_ATM_FORUM,   "ATM Forum" },
-       { OUI_APPLE_ATALK, "Apple (AppleTalk)" },
        { OUI_CABLE_BPDU,  "DOCSIS Spanning Tree" }, /* DOCSIS spanning tree BPDU */
+       { OUI_APPLE_ATALK, "Apple (AppleTalk)" },
        { 0,               NULL }
 };
 
@@ -231,6 +230,7 @@ capture_llc(const u_char *pd, int offset, packet_counts *ld) {
                        switch (oui) {
 
                        case OUI_ENCAP_ETHER:
+                       case OUI_CISCO_90:
                        case OUI_APPLE_ATALK:
                                /* No, I have no idea why Apple used
                                   one of their own OUIs, rather than
@@ -280,10 +280,6 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint8          dsap, ssap;
        tvbuff_t        *next_tvb;
 
-       CHECK_DISPLAY_AS_DATA(proto_llc, tvb, pinfo, tree);
-    
-       pinfo->current_proto = "LLC";
-
        if (check_col(pinfo->fd, COL_PROTOCOL)) {
                col_set_str(pinfo->fd, COL_PROTOCOL, "LLC");
        }
@@ -388,6 +384,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
        switch (oui) {
 
        case OUI_ENCAP_ETHER:
+       case OUI_CISCO_90:
        case OUI_APPLE_ATALK:
                /* No, I have no idea why Apple used
                   one of their own OUIs, rather than
@@ -398,7 +395,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
                   packet type for AARP packets. */
                if (XDLC_IS_INFORMATION(control)) {
                        ethertype(etype, tvb, offset+5,
-                           pinfo, tree, snap_tree, hf_type);
+                           pinfo, tree, snap_tree, hf_type, -1);
                } else {
                        next_tvb = tvb_new_subset(tvb, offset+5, -1, -1);
                        dissect_data(next_tvb, 0, pinfo, tree);
@@ -512,36 +509,36 @@ proto_register_llc(void)
        static hf_register_info hf[] = {
                { &hf_llc_dsap,
                { "DSAP",       "llc.dsap", FT_UINT8, BASE_HEX, 
-                       VALS(sap_vals), 0x0, "" }},
+                       VALS(sap_vals), 0x0, "", HFILL }},
 
                { &hf_llc_dsap_ig,
                { "IG Bit",     "llc.dsap.ig", FT_BOOLEAN, BASE_HEX, 
-                       &ig_bit, 0x0, "Individual/Group" }},
+                       &ig_bit, 0x0, "Individual/Group", HFILL }},
 
                { &hf_llc_ssap,
                { "SSAP", "llc.ssap", FT_UINT8, BASE_HEX, 
-                       VALS(sap_vals), 0x0, "" }},
+                       VALS(sap_vals), 0x0, "", HFILL }},
 
                { &hf_llc_ssap_cr,
                { "CR Bit", "llc.ssap.cr", FT_BOOLEAN, BASE_HEX, 
-                       &cr_bit, 0x0, "Command/Response" }},
+                       &cr_bit, 0x0, "Command/Response", HFILL }},
 
                { &hf_llc_ctrl,
                { "Control", "llc.control", FT_UINT16, BASE_HEX, 
-                       NULL, 0x0, "" }},
+                       NULL, 0x0, "", HFILL }},
 
                /* registered here but handled in ethertype.c */
                { &hf_llc_type,
                { "Type", "llc.type", FT_UINT16, BASE_HEX, 
-                       VALS(etype_vals), 0x0, "" }},
+                       VALS(etype_vals), 0x0, "", HFILL }},
 
                { &hf_llc_oui,
                { "Organization Code",  "llc.oui", FT_UINT24, BASE_HEX, 
-                       VALS(oui_vals), 0x0, ""}},
+                       VALS(oui_vals), 0x0, "", HFILL }},
 
                { &hf_llc_pid,
                { "Protocol ID", "llc.pid", FT_UINT16, BASE_HEX, 
-                       NULL, 0x0, ""}}
+                       NULL, 0x0, "", HFILL }}
        };
        static gint *ett[] = {
                &ett_llc,