#include <sys/types.h>
#endif
-#ifdef HAVE_LIBZ
-#include <zlib.h>
-#endif
-
#include "wtap-int.h"
#include "file_wrappers.h"
#include <wsutil/file_util.h>
#include <wsutil/buffer.h>
+#include <wsutil/ws_diag_control.h>
#ifdef HAVE_PLUGINS
check_for_wtap_plugin(GModule *handle)
{
gpointer gp;
- void (*register_wtap_module)(void);
wtap_plugin *plugin;
/*
/*
* Yes - this plugin includes one or more wiretap modules.
- */
- register_wtap_module = (void (*)(void))gp;
-
- /*
* Add this one to the list of wiretap module plugins.
*/
plugin = (wtap_plugin *)g_malloc(sizeof (wtap_plugin));
- plugin->register_wtap_module = register_wtap_module;
+DIAG_OFF(pedantic)
+ plugin->register_wtap_module = (void (*)(void))gp;
+DIAG_ON(pedantic)
wtap_plugins = g_slist_append(wtap_plugins, plugin);
return TRUE;
}
/* WTAP_ENCAP_IXVERIWAVE */
{ "IxVeriWave header and stats block", "ixveriwave" },
- /* WTAP_ENCAP_IEEE_802_11_AIROPEEK */
- { "IEEE 802.11 plus AiroPeek radio header", "ieee-802-11-airopeek" },
-
/* WTAP_ENCAP_SDH */
{ "SDH", "sdh" },
/* WTAP_ENCAP_NSTRACE_3_5 */
{ "NetScaler Encapsulation 3.5 of Ethernet", "nstrace35" },
+
+ /* WTAP_ENCAP_ISO14443 */
+ { "ISO 14443 contactless smartcard standards", "iso14443" },
+
+ /* WTAP_ENCAP_GFP_T */
+ { "ITU-T G.7041/Y.1303 Generic Framing Procedure Transparent mode", "gfp-t" },
+
+ /* WTAP_ENCAP_GFP_F */
+ { "ITU-T G.7041/Y.1303 Generic Framing Procedure Frame-mapped mode", "gfp-f" }
+
};
WS_DLL_LOCAL
"Files can't be saved in that format",
/* WTAP_ERR_UNWRITABLE_ENCAP */
- "Files from that network type can't be saved in that format",
+ "Packets with that network type can't be saved in that format",
/* WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED */
"That file format doesn't support per-packet encapsulations",
wtap_seek_read(wtap *wth, gint64 seek_off,
struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info)
{
+ /*
+ * Set the packet encapsulation to the file's encapsulation
+ * value; if that's not WTAP_ENCAP_PER_PACKET, it's the
+ * right answer (and means that the read routine for this
+ * capture file type doesn't have to set it), and if it
+ * *is* WTAP_ENCAP_PER_PACKET, the caller needs to set it
+ * anyway.
+ *
+ * Do the same for the packet time stamp resolution.
+ */
+ phdr->pkt_encap = wth->file_encap;
+ phdr->pkt_tsprec = wth->file_tsprec;
+
if (!wth->subtype_seek_read(wth, seek_off, phdr, buf, err, err_info))
return FALSE;