diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-07-05 09:29:06 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-07-05 09:29:06 +0000 |
commit | b373ded136367f49569569272830e32e0bdd49da (patch) | |
tree | 247f2f159d9c4d41a67eeb39dc171aba78a48184 /packet-wlancap.c | |
parent | 074c978ab54db36b6dd426550bf558c3ad098482 (diff) |
From Jouni Malinen: add columns for the 802.11 data rate and signal
strength for AVS headers.
Also add them for the Prism and Radiotap headers, and for the
pseudo-header from non-native captures.
svn path=/trunk/; revision=11316
Diffstat (limited to 'packet-wlancap.c')
-rw-r--r-- | packet-wlancap.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/packet-wlancap.c b/packet-wlancap.c index 508c0de623..24e0a00404 100644 --- a/packet-wlancap.c +++ b/packet-wlancap.c @@ -7,10 +7,14 @@ * additional fields, is designed to be non-hardware-specific, and more * importantly, version and length fields so it can be extended later * without breaking anything. + * + * See + * + * http://www.shaftnet.org/~pizza/software/capturefrm.txt * * By Solomon Peachy * - * $Id: packet-wlancap.c,v 1.4 2004/01/29 10:58:28 guy Exp $ + * $Id: packet-wlancap.c,v 1.5 2004/07/05 09:29:05 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -206,6 +210,17 @@ dissect_wlancap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "AVS WLAN Capture v%x, Length %d",version, length); + if (check_col(pinfo->cinfo, COL_TX_RATE)) { + guint32 txrate = tvb_get_ntohl(tvb, offset + 32); + col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%d.%d", + txrate / 10, txrate % 10); + } + if (check_col(pinfo->cinfo, COL_RSSI)) { + /* XXX cook ssi_signal (Based on type; ie format) */ + col_add_fstr(pinfo->cinfo, COL_RSSI, "%d", + tvb_get_ntohl(tvb, offset + 48)); + } + /* Dissect the packet */ if (tree) { ti = proto_tree_add_protocol_format(tree, proto_wlancap, |