aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-snort.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-13 16:10:53 -0800
committerPeter Wu <peter@lekensteyn.nl>2018-11-16 02:18:26 +0000
commit4e17bd6229a09c149c4e0ac7e5a090febfc15c10 (patch)
tree3a389fbe89a5ee12abfe6d3ab1a770c830643d03 /epan/dissectors/packet-snort.c
parent658c30dc4b98c7afd1f0a7a5f8380a9399cbb082 (diff)
Use the dump parameters structure for non-pcapng-specific stuff.
Use it for all the per-file information, including the per-file link-layer type and the per-file snapshot length. Change-Id: Id75687c7faa6418a2bfcf7f8198206a9f95db629 Reviewed-on: https://code.wireshark.org/review/30616 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/dissectors/packet-snort.c')
-rw-r--r--epan/dissectors/packet-snort.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-snort.c b/epan/dissectors/packet-snort.c
index 9e1d2ad88d..d868defec4 100644
--- a/epan/dissectors/packet-snort.c
+++ b/epan/dissectors/packet-snort.c
@@ -1144,13 +1144,13 @@ snort_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
else {
/* We expect alerts from Snort. Pass frame into snort on first pass. */
if (!pinfo->fd->flags.visited && current_session.working) {
- wtapng_dump_params params;
int write_err = 0;
gchar *err_info;
wtap_rec rec;
/* First time, open current_session.in to write to for dumping into snort with */
if (!current_session.pdh) {
+ wtap_dump_params params = WTAP_DUMP_PARAMS_INIT;
int open_err;
/* Older versions of Snort don't support capture file with several encapsulations (like pcapng),
@@ -1164,11 +1164,10 @@ snort_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
* versions of Snort" wouldn't handle multiple encapsulation
* types.
*/
- wtap_dump_params_init(&params, NULL);
+ params.encap = pinfo->rec->rec_header.packet_header.pkt_encap;
+ params.snaplen = WTAP_MAX_PACKET_SIZE_STANDARD;
current_session.pdh = wtap_dump_fdopen(current_session.in,
WTAP_FILE_TYPE_SUBTYPE_PCAP,
- pinfo->rec->rec_header.packet_header.pkt_encap,
- WTAP_MAX_PACKET_SIZE_STANDARD,
FALSE, /* compressed */
&params,
&open_err);