Ethereal-dev: [Ethereal-dev] MPLS over CHDLC patch ...
hi,
pls find attached a [mini] patch that registers the MPLS
dissector within the C-HDLC dissector;
/hannes
Index: packet-mpls.c
===================================================================
RCS file: /cvsroot/ethereal/packet-mpls.c,v
retrieving revision 1.28
diff -u -r1.28 packet-mpls.c
--- packet-mpls.c 28 Aug 2002 21:00:22 -0000 1.28
+++ packet-mpls.c 26 Jan 2003 18:16:29 -0000
@@ -217,4 +217,6 @@
mpls_handle = create_dissector_handle(dissect_mpls, proto_mpls);
dissector_add("ethertype", ETHERTYPE_MPLS, mpls_handle);
dissector_add("ppp.protocol", PPP_MPLS_UNI, mpls_handle);
+ dissector_add("chdlctype", ETHERTYPE_MPLS, mpls_handle);
+ dissector_add("chdlctype", ETHERTYPE_MPLS_MULTI, mpls_handle);
}
Index: packet-chdlc.c
===================================================================
RCS file: /cvsroot/ethereal/packet-chdlc.c,v
retrieving revision 1.18
diff -u -r1.18 packet-chdlc.c
--- packet-chdlc.c 11 Jan 2003 10:16:22 -0000 1.18
+++ packet-chdlc.c 26 Jan 2003 18:16:30 -0000
@@ -87,17 +87,19 @@
};
const value_string chdlc_vals[] = {
- {0x2000, "Cisco Discovery Protocol"},
- {ETHERTYPE_IP, "IP"},
- {CISCO_SLARP, "SLARP"},
- {ETHERTYPE_DEC_LB, "DEC LanBridge"},
- {CHDLCTYPE_BPDU, "Spanning Tree BPDU"},
- {ETHERTYPE_ATALK, "Appletalk"},
- {ETHERTYPE_AARP, "AARP"},
- {ETHERTYPE_IPX, "Netware IPX/SPX"},
- {ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
- {CHDLCTYPE_OSI, "OSI" },
- {0, NULL}
+ {0x2000, "Cisco Discovery Protocol"},
+ {ETHERTYPE_IP, "IP"},
+ {CISCO_SLARP, "SLARP"},
+ {ETHERTYPE_DEC_LB, "DEC LanBridge"},
+ {CHDLCTYPE_BPDU, "Spanning Tree BPDU"},
+ {ETHERTYPE_ATALK, "Appletalk"},
+ {ETHERTYPE_AARP, "AARP"},
+ {ETHERTYPE_IPX, "Netware IPX/SPX"},
+ {ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
+ {CHDLCTYPE_OSI, "OSI" },
+ {ETHERTYPE_MPLS, "MPLS unicast"},
+ {ETHERTYPE_MPLS_MULTI, "MPLS multicast"},
+ {0, NULL}
};
void