diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2015-03-04 16:11:50 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-03-04 16:03:33 +0000 |
commit | 23b07cb3ca4b54e83f0e161a263f64ce98b2fa5a (patch) | |
tree | a557d0cb80d6a576777740c7fc66dcc856d9f36c /wiretap | |
parent | d63df873b236d483e5f008a5b6aca5484602a613 (diff) | |
download | wireshark-23b07cb3ca4b54e83f0e161a263f64ce98b2fa5a.tar.gz wireshark-23b07cb3ca4b54e83f0e161a263f64ce98b2fa5a.tar.bz2 wireshark-23b07cb3ca4b54e83f0e161a263f64ce98b2fa5a.zip |
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')
-rw-r--r-- | wiretap/hcidump.c | 7 |
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) |