Don't export wtap_encap_dissector_table from packet-frame.c.

Dissectors that need it should fetch it with
find_dissector_table("wtap_encap").

Change-Id: I4b12888f20182aa529274b934b81d36f7697e1a6
Reviewed-on: https://code.wireshark.org/review/13323
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-01-15 19:00:06 -08:00
parent 91b6718f82
commit 0802f12f42
4 changed files with 9 additions and 10 deletions

View File

@ -148,7 +148,7 @@ static const value_string packet_word_reception_types[] = {
{ 0, NULL }
};
dissector_table_t wtap_encap_dissector_table;
static dissector_table_t wtap_encap_dissector_table;
static dissector_table_t wtap_fts_rec_dissector_table;
/*

View File

@ -30,8 +30,3 @@
*/
void
register_frame_end_routine(packet_info *pinfo, void (*func)(void));
/*
* The frame dissector and the PPI dissector both use this
*/
extern dissector_table_t wtap_encap_dissector_table;

View File

@ -28,8 +28,6 @@
#include <epan/expert.h>
#include <wsutil/pint.h>
#include "packet-frame.h"
#include "packet-eth.h"
/* Needed for wtap_pcap_encap_to_wtap_encap(). */
@ -82,6 +80,8 @@ static expert_field ei_pktap_hdrlen_too_short = EI_INIT;
static dissector_handle_t pktap_handle;
static dissector_table_t wtap_encap_dissector_table;
/*
* XXX - these are little-endian in the captures I've seen, but Apple
* no longer make any big-endian machines (Macs use x86, iOS machines
@ -277,6 +277,8 @@ proto_register_pktap(void)
void
proto_reg_handoff_pktap(void)
{
wtap_encap_dissector_table = find_dissector_table("wtap_encap");
dissector_add_uint("wtap_encap", WTAP_ENCAP_PKTAP, pktap_handle);
/* XXX - WTAP_ENCAP_USER2 to handle Mavericks' botch wherein it

View File

@ -59,8 +59,6 @@
/* Needed for wtap_pcap_encap_to_wtap_encap(). */
#include <wiretap/pcap-encap.h>
#include "packet-frame.h"
/*
* Per-Packet Information (PPI) header.
* See the PPI Packet Header documentation at http://www.cacetech.com/documents
@ -353,6 +351,8 @@ static dissector_handle_t ieee80211_radio_handle;
static dissector_handle_t ppi_gps_handle, ppi_vector_handle, ppi_sensor_handle, ppi_antenna_handle;
static dissector_handle_t ppi_fnet_handle;
static dissector_table_t wtap_encap_dissector_table;
static const true_false_string tfs_ppi_head_flag_alignment = { "32-bit aligned", "Not aligned" };
static const true_false_string tfs_tsft_ms = { "milliseconds", "microseconds" };
static const true_false_string tfs_ht20_40 = { "HT40", "HT20" };
@ -1543,6 +1543,8 @@ proto_register_ppi(void)
void
proto_reg_handoff_ppi(void)
{
wtap_encap_dissector_table = find_dissector_table("wtap_encap");
data_handle = find_dissector("data");
ieee80211_radio_handle = find_dissector("wlan_radio");
ppi_gps_handle = find_dissector("ppi_gps");