diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common index 6ab55f6e52..70fe5a0f05 100644 --- a/epan/dissectors/Makefile.common +++ b/epan/dissectors/Makefile.common @@ -1721,7 +1721,6 @@ DISSECTOR_INCLUDES = \ packet-umts_mac.h \ packet-usb.h \ packet-usb-hid.h \ - packet-vines.h \ packet-wap.h \ packet-wccp.h \ packet-windows-common.h \ diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 8972e3fbb2..7f6b7c3807 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -3203,6 +3203,7 @@ proto_reg_handoff_ip(void) register_capture_dissector("ax25.pid", AX25_P_IP, capture_ip, proto_ip); register_capture_dissector("enc", BSD_AF_INET, capture_ip, proto_ip); register_capture_dissector("ppp_hdlc", PPP_IP, capture_ip, proto_ip); + register_capture_dissector("llc.dsap", SAP_IP, capture_ip, proto_ip); } /* diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 7476ff2e5e..dff60bc75a 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -1627,6 +1627,8 @@ proto_reg_handoff_ipx(void) register_capture_dissector("ethertype", ETHERTYPE_IPX, capture_ipx, proto_ipx); register_capture_dissector("ppp_hdlc", PPP_IPX, capture_ipx, proto_ipx); register_capture_dissector("sll.ltype", LINUX_SLL_P_802_3, capture_ipx, proto_ipx); + register_capture_dissector("llc.dsap", SAP_NETWARE1, capture_ipx, proto_ipx); + register_capture_dissector("llc.dsap", SAP_NETWARE2, capture_ipx, proto_ipx); data_handle = find_dissector("data"); } diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c index c2fa07813e..dfd2b17863 100644 --- a/epan/dissectors/packet-llc.c +++ b/epan/dissectors/packet-llc.c @@ -38,7 +38,6 @@ #include "packet-ip.h" #include "packet-ipx.h" #include "packet-netbios.h" -#include "packet-vines.h" #include "packet-sll.h" #include "packet-juniper.h" @@ -282,23 +281,7 @@ capture_llc(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo return capture_snap(pd, offset+llc_header_len, len, cpinfo, pseudo_header); /* non-SNAP */ - switch (pd[offset]) { - - case SAP_IP: - return capture_ip(pd, offset + llc_header_len, len, cpinfo, pseudo_header); - - case SAP_NETWARE1: - case SAP_NETWARE2: - return capture_ipx(pd, offset + llc_header_len, len, cpinfo, pseudo_header); - - case SAP_NETBIOS: - return capture_netbios(pd, offset + llc_header_len, len, cpinfo, pseudo_header); - - case SAP_VINES1: - case SAP_VINES2: - return capture_vines(pd, offset + llc_header_len, len, cpinfo, pseudo_header); - } - return FALSE; + return try_capture_dissector("llc.dsap", pd[offset], pd, offset + llc_header_len, len, cpinfo, pseudo_header); } gboolean @@ -838,6 +821,7 @@ proto_register_llc(void) "LLC SAP", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); xid_subdissector_table = register_dissector_table("llc.xid_dsap", "LLC XID SAP", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); + register_capture_dissector_table("llc.dsap", "LLC"); register_dissector("llc", dissect_llc, proto_llc); } diff --git a/epan/dissectors/packet-netbios.c b/epan/dissectors/packet-netbios.c index 2617da36e7..6a3811bf3a 100644 --- a/epan/dissectors/packet-netbios.c +++ b/epan/dissectors/packet-netbios.c @@ -27,6 +27,7 @@ #include "config.h" #include +#include #include #include #include @@ -284,7 +285,7 @@ static const value_string max_frame_size_vals[] = { }; -gboolean +static gboolean capture_netbios(const guchar *pd _U_, int offset _U_, int len _U_, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_) { cpinfo->counts->netbios++; @@ -1488,6 +1489,7 @@ proto_reg_handoff_netbios(void) netbios_handle = create_dissector_handle(dissect_netbios, proto_netbios); dissector_add_uint("llc.dsap", SAP_NETBIOS, netbios_handle); + register_capture_dissector("llc.dsap", SAP_NETBIOS, capture_netbios, proto_netbios); data_handle = find_dissector("data"); } diff --git a/epan/dissectors/packet-netbios.h b/epan/dissectors/packet-netbios.h index ab1e56697a..9f145dacec 100644 --- a/epan/dissectors/packet-netbios.h +++ b/epan/dissectors/packet-netbios.h @@ -30,8 +30,6 @@ /* Length of NetBIOS names */ #define NETBIOS_NAME_LEN 16 -gboolean capture_netbios(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header); - extern int process_netbios_name(const guchar *name_ptr, char *name_ret, int name_ret_len); extern int get_netbios_name(tvbuff_t *tvb, int offset, char *name_ret, int name_ret_len); diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index dd578cafaa..dbf5c23654 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -38,7 +38,6 @@ #include "packet-chdlc.h" #include "packet-ip.h" #include "packet-ipx.h" -#include "packet-vines.h" #include #include #include diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c index 44b2cf4c38..7cafb52b2c 100644 --- a/epan/dissectors/packet-vines.c +++ b/epan/dissectors/packet-vines.c @@ -84,7 +84,6 @@ #include #include -#include "packet-vines.h" #include #include #include @@ -2022,6 +2021,8 @@ proto_reg_handoff_vines_icp(void) register_capture_dissector("ppp_hdlc", PPP_VINES, capture_vines, proto_vines_echo); register_capture_dissector("ip.proto", PPP_VINES, capture_vines, proto_vines_echo); register_capture_dissector("ipv6.nxt", PPP_VINES, capture_vines, proto_vines_echo); + register_capture_dissector("llc.dsap", SAP_VINES1, capture_vines, proto_vines_echo); + register_capture_dissector("llc.dsap", SAP_VINES2, capture_vines, proto_vines_echo); } /* diff --git a/epan/dissectors/packet-vines.h b/epan/dissectors/packet-vines.h deleted file mode 100644 index c6a81a1ab5..0000000000 --- a/epan/dissectors/packet-vines.h +++ /dev/null @@ -1,31 +0,0 @@ -/* packet-vines.h - * Definitions for packet disassembly structures and routines - * - * Don Lafontaine - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * Joerg Mayer (see AUTHORS file) - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __PACKETVINES_H__ -#define __PACKETVINES_H__ - -gboolean capture_vines(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header); - -#endif /* packet-vines.h */