From 7ecac8fbd047f9bfaefd05287e1e6916c3d85bd9 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 15 Mar 2001 09:11:03 +0000 Subject: Add a new Wiretap encapsulation type for Cisco HDLC. Map the NetBSD DLT_HDLC to it. Make a separate dissector for Cisco HDLC, and add a dissector for Cisco SLARP. Have the PPP dissector call the Cisco HDLC dissector if the address field is the Cisco HDLC unicast or multicast address. Use the Cisco HDLC dissector for the Cisco HDLC Wiretap encapsulation type. Add a new dissector table "chdlctype", for Cisco HDLC packet types (they're *almost* the same as Ethernet types, but 0x8035 is SLARP, not Reverse ARP, and 0x2000 is the Cisco Discovery protocol, for example), replacing "fr.chdlc". Have a "chdlctype()" routine, similar to "ethertype()", used both by the Cisco HDLC and Frame Relay dissectors. Have a "chdlc_vals[]" "value_string" table for Cisco HDLC types and protocol names. Split the packet type field in the Frame Relay dissector into separate SNAP and Cisco HDLC fields, and give them the Ethernet type and Cisco HDLC type "value_string" tables, respectively. svn path=/trunk/; revision=3133 --- packet-chdlc.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 packet-chdlc.h (limited to 'packet-chdlc.h') diff --git a/packet-chdlc.h b/packet-chdlc.h new file mode 100644 index 0000000000..361be8a1b1 --- /dev/null +++ b/packet-chdlc.h @@ -0,0 +1,46 @@ +/* packet-chdlc.h + * + * $Id: packet-chdlc.h,v 1.1 2001/03/15 09:11:00 guy Exp $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs + * 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. + */ + +#ifndef __PACKET_CHDLC_H__ +#define __PACKET_CHDLC_H__ + +/* + * See section 4.3.1 of RFC 1547, and + * + * http://www.nethelp.no/net/cisco-hdlc.txt + */ + +#define CHDLC_ADDR_UNICAST 0x0f +#define CHDLC_ADDR_MULTICAST 0x8f + +void capture_chdlc(const u_char *, int, packet_counts *); + +const value_string chdlc_vals[]; + +void +chdlctype(guint16 chdlctype, tvbuff_t *tvb, int offset_after_chdlctype, + packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree, + int chdlctype_id); + +#endif -- cgit v1.2.3