diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-02-12 19:59:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-02-12 19:59:41 +0000 |
commit | a595f69ce4ed6114beefc5d9e753c11ff7be1918 (patch) | |
tree | 8f369db2ef33d817abf53f91afd6e9ce962db7b1 /epan/dissectors/packet-btl2cap.c | |
parent | b83634d5a93cfda6f94ea2defe1940fd50f05c61 (diff) | |
download | wireshark-a595f69ce4ed6114beefc5d9e753c11ff7be1918.tar.gz |
The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's no
pseudo-header, and hence there's no direction indication. Don't set
pinfo->p2p_dir for it. Use WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, not
WTAP_ENCAP_BLUETOOTH_H4, for capture files where we have the direction.
Don't assume pinfo->p2p_dir is either P2P_DIR_SENT or P2P_DIR_RECV when
setting the info column in various Bluetooth dissectors; it might be
unknown.
In the HCI H4 dissector, put the direction into the info column
regardless of whether we have a type match or not; the dissectors for
HCI packet types appear to assume it's been set (as they put a blank at
the beginning of the stuff they append to the direction).
svn path=/trunk/; revision=35933
Diffstat (limited to 'epan/dissectors/packet-btl2cap.c')
-rw-r--r-- | epan/dissectors/packet-btl2cap.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index c4a4bf9fed..f3bad29491 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -1095,7 +1095,25 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void* pd_save; col_set_str(pinfo->cinfo, COL_PROTOCOL, "L2CAP"); - col_set_str(pinfo->cinfo, COL_INFO, pinfo->p2p_dir == P2P_DIR_SENT ? "Sent " : "Rcvd "); + switch (pinfo->p2p_dir) { + + case P2P_DIR_SENT: + col_add_str(pinfo->cinfo, COL_INFO, "Sent "); + break; + + case P2P_DIR_RECV: + col_add_str(pinfo->cinfo, COL_INFO, "Rcvd "); + break; + + case P2P_DIR_UNKNOWN: + col_clear(pinfo->cinfo, COL_INFO); + break; + + default: + col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown direction %d ", + pinfo->p2p_dir); + break; + } if(tree){ ti=proto_tree_add_item(tree, proto_btl2cap, tvb, offset, -1, FALSE); |