try to dissect the ms cldap netlogon rpc flags bits.
[obnox/wireshark/wip.git] / packet-gre.c
index 6d32b48eabcd66aeacc7d99a249b40c70f4ea686..4d45bfd503d556d60031349a05f67747fcd18f0b 100644 (file)
@@ -2,22 +2,22 @@
  * Routines for the Generic Routing Encapsulation (GRE) protocol
  * Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
  *
- * $Id: packet-gre.c,v 1.50 2002/01/21 07:36:34 guy Exp $
+ * $Id: packet-gre.c,v 1.55 2004/01/29 03:51:25 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Copyright 1998 Gerald Combs
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
 #include <glib.h>
 #include <epan/packet.h>
 #include "packet-wccp.h"
@@ -41,6 +34,7 @@
 #include "etypes.h"
 #include "greproto.h"
 #include "ipproto.h"
+#include "llcsaps.h"
 
 /*
  * See RFC 1701 "Generic Routing Encapsulation (GRE)", RFC 1702
@@ -78,10 +72,12 @@ static void dissect_gre_wccp2_redirect_header(tvbuff_t *, int, proto_tree *);
 static const value_string typevals[] = {
        { ETHERTYPE_PPP,       "PPP" },
        { ETHERTYPE_IP,        "IP" },
+       { SAP_OSINL5,          "OSI"},
        { GRE_WCCP,            "WCCP"},
        { ETHERTYPE_IPX,       "IPX"},
        { ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
        { GRE_FR,              "Frame Relay"},
+       { ETHERTYPE_IPv6,      "IPv6" },
        { 0,                   NULL }
 };
 
@@ -212,7 +208,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       offset += 4;
     }
   }
-    
+
   if (flags_and_ver & GH_B_S) {
     if (tree) {
       proto_tree_add_text(gre_tree, tvb, offset, 4,
@@ -285,11 +281,11 @@ add_flags_and_ver(proto_tree *tree, guint16 flags_and_ver, tvbuff_t *tvb,
   proto_item * ti;
   proto_tree * fv_tree;
   int          nbits = sizeof(flags_and_ver) * 8;
-  
-  ti = proto_tree_add_text(tree, tvb, offset, 2, 
+
+  ti = proto_tree_add_text(tree, tvb, offset, 2,
                           "Flags and version: %#04x", flags_and_ver);
   fv_tree = proto_item_add_subtree(ti, ett_gre_flags);
-  
+
   proto_tree_add_text(fv_tree, tvb, offset, sizeof(flags_and_ver), "%s",
                      decode_boolean_bitfield(flags_and_ver, GH_B_C, nbits,
                                              "Checksum", "No checksum"));
@@ -333,7 +329,7 @@ dissect_gre_wccp2_redirect_header(tvbuff_t *tvb, int offset, proto_tree *tree)
   proto_item * ti;
   proto_tree * rh_tree;
   guint8       rh_flags;
-  
+
   ti = proto_tree_add_text(tree, tvb, offset, 4, "Redirect header");
   rh_tree = proto_item_add_subtree(ti, ett_gre_wccp2_redirect_header);
 
@@ -353,7 +349,7 @@ dissect_gre_wccp2_redirect_header(tvbuff_t *tvb, int offset, proto_tree *tree)
   proto_tree_add_text(rh_tree, tvb, offset + 3, 1, "Primary bucket index: %u",
                        tvb_get_guint8(tvb, offset + 3));
 }
+
 void
 proto_register_gre(void)
 {