diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2014-12-12 11:24:44 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2014-12-18 11:03:05 +0000 |
commit | f5cd21543d332f6c14da88ebd50730750f791dd4 (patch) | |
tree | b10694bfabdbdb3d20bb0c011fe9c489676d59e6 /wiretap | |
parent | 4a467ff609f1b5ee99cbc1aaccdc7b78d3cbecbc (diff) |
Bluetooth: Add generic Bluetooth dissector
Bluetooth dissector is used to add ability to filter all bluetooth
payload from capture files (there are many transport like:
hci_h4, hci_h1, hci_usb, hci_mon, btle). Also it is used to placeholder for
all data tree used to store additional informations like bd_addrs, names, etc.
Finally it is used to be one point for Bluetooth
Endpoints/Conversation filtering what is enabled now.
Also add Master/Slave Role and Connection Mode tracking.
Change-Id: I67048080fb8ee16fa0f4ec429c1257de81ddd737
Reviewed-on: https://code.wireshark.org/review/5771
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/btsnoop.c | 1 | ||||
-rw-r--r-- | wiretap/packetlogger.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/wiretap/btsnoop.c b/wiretap/btsnoop.c index 8c3212cc51..98e151d9cd 100644 --- a/wiretap/btsnoop.c +++ b/wiretap/btsnoop.c @@ -200,6 +200,7 @@ static gboolean btsnoop_read_record(wtap *wth, FILE_T fh, ts -= KUnixTimeBase; phdr->rec_type = REC_TYPE_PACKET; + phdr->pkt_encap = wth->file_encap; phdr->presence_flags = WTAP_HAS_TS|WTAP_HAS_CAP_LEN; phdr->ts.secs = (guint)(ts / 1000000); phdr->ts.nsecs = (guint)((ts % 1000000) * 1000); diff --git a/wiretap/packetlogger.c b/wiretap/packetlogger.c index e94b9c1c04..d863315b46 100644 --- a/wiretap/packetlogger.c +++ b/wiretap/packetlogger.c @@ -51,7 +51,7 @@ static gboolean packetlogger_seek_read(wtap *wth, gint64 seek_off, Buffer *buf, int *err, gchar **err_info); static gboolean packetlogger_read_header(packetlogger_header_t *pl_hdr, FILE_T fh, int *err, gchar **err_info); -static gboolean packetlogger_read_packet(FILE_T fh, struct wtap_pkthdr *phdr, +static gboolean packetlogger_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info); @@ -97,7 +97,7 @@ packetlogger_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) { *data_offset = file_tell(wth->fh); - return packetlogger_read_packet(wth->fh, &wth->phdr, + return packetlogger_read_packet(wth, wth->fh, &wth->phdr, wth->frame_buffer, err, err_info); } @@ -108,7 +108,7 @@ packetlogger_seek_read(wtap *wth, gint64 seek_off, struct wtap_pkthdr *phdr, if(file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1) return FALSE; - if(!packetlogger_read_packet(wth->random_fh, phdr, buf, err, err_info)) { + if(!packetlogger_read_packet(wth, wth->random_fh, phdr, buf, err, err_info)) { if(*err == 0) *err = WTAP_ERR_SHORT_READ; @@ -134,7 +134,7 @@ packetlogger_read_header(packetlogger_header_t *pl_hdr, FILE_T fh, int *err, } static gboolean -packetlogger_read_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, +packetlogger_read_packet(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, int *err, gchar **err_info) { packetlogger_header_t pl_hdr; @@ -159,6 +159,7 @@ packetlogger_read_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf, } phdr->rec_type = REC_TYPE_PACKET; + phdr->pkt_encap = wth->file_encap; phdr->presence_flags = WTAP_HAS_TS; phdr->len = pl_hdr.len - 8; |