aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/hcidump.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-03-04 16:11:50 +0100
committerMichal Labedzki <michal.labedzki@tieto.com>2015-03-04 16:03:33 +0000
commit23b07cb3ca4b54e83f0e161a263f64ce98b2fa5a (patch)
treea557d0cb80d6a576777740c7fc66dcc856d9f36c /wiretap/hcidump.c
parentd63df873b236d483e5f008a5b6aca5484602a613 (diff)
Set packet encapsulation for HCIDUMP captures
Change-Id: I2a523694a38b6fe296b6dbceb5a00e4202364e99 Reviewed-on: https://code.wireshark.org/review/7523 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'wiretap/hcidump.c')
-rw-r--r--wiretap/hcidump.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/hcidump.c b/wiretap/hcidump.c
index a7b2e0fbfc..760456ed05 100644
--- a/wiretap/hcidump.c
+++ b/wiretap/hcidump.c
@@ -33,7 +33,7 @@ struct dump_hdr {
#define DUMP_HDR_SIZE (sizeof(struct dump_hdr))
-static gboolean hcidump_process_packet(FILE_T fh, struct wtap_pkthdr *phdr,
+static gboolean hcidump_process_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
Buffer *buf, int *err, gchar **err_info)
{
struct dump_hdr dh;
@@ -55,6 +55,7 @@ static gboolean hcidump_process_packet(FILE_T fh, struct wtap_pkthdr *phdr,
}
phdr->rec_type = REC_TYPE_PACKET;
+ phdr->pkt_encap = wth->file_encap;
phdr->presence_flags = WTAP_HAS_TS;
phdr->ts.secs = GUINT32_FROM_LE(dh.ts_sec);
phdr->ts.nsecs = GUINT32_FROM_LE(dh.ts_usec) * 1000;
@@ -71,7 +72,7 @@ static gboolean hcidump_read(wtap *wth, int *err, gchar **err_info,
{
*data_offset = file_tell(wth->fh);
- return hcidump_process_packet(wth->fh, &wth->phdr, wth->frame_buffer,
+ return hcidump_process_packet(wth, wth->fh, &wth->phdr, wth->frame_buffer,
err, err_info);
}
@@ -81,7 +82,7 @@ static gboolean hcidump_seek_read(wtap *wth, gint64 seek_off,
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;
- return hcidump_process_packet(wth->random_fh, phdr, buf, err, err_info);
+ return hcidump_process_packet(wth, wth->random_fh, phdr, buf, err, err_info);
}
wtap_open_return_val hcidump_open(wtap *wth, int *err, gchar **err_info)