aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-netlink-nl80211.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2018-11-25 15:38:26 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-27 04:36:04 +0000
commitfc1e2ac66d0fcd91e653d2bd71826dff60837cd2 (patch)
tree0f01a95e873b67af491c24ef0434f51694c13936 /epan/dissectors/packet-netlink-nl80211.c
parent7f80b7a2ad72745c8c541f6f256771b086c4ea7f (diff)
nl80211: display interface name as a string
The attribute value of the ifname attribute is a 0-terminated string that contains the interface name. Add an hf variable for this name and display it as a string. Change-Id: I0bd4caae49274f3e471a6eefb210db8d56f020f7 Reviewed-on: https://code.wireshark.org/review/30789 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-netlink-nl80211.c')
-rw-r--r--epan/dissectors/packet-netlink-nl80211.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-netlink-nl80211.c b/epan/dissectors/packet-netlink-nl80211.c
index 6fff3680af..5710b432dc 100644
--- a/epan/dissectors/packet-netlink-nl80211.c
+++ b/epan/dissectors/packet-netlink-nl80211.c
@@ -2490,6 +2490,10 @@ static header_field_info hfi_nl80211_attr_value32 NETLINK_NL80211_HFI_INIT =
{ "Attribute Value", "nl80211.attr_value32", FT_UINT32, BASE_HEX_DEC,
NULL, 0x00, NULL, HFILL };
+static header_field_info hfi_nl80211_ifname NETLINK_NL80211_HFI_INIT =
+ { "Interface Name", "nl80211.ifname", FT_STRINGZ, STR_ASCII,
+ NULL, 0x00, NULL, HFILL };
+
static int
dissect_nl80211_generic(tvbuff_t *tvb, void *data, proto_tree *tree, _U_ int nla_type, int offset, int len)
{
@@ -2758,6 +2762,7 @@ dissect_nl80211_attrs(tvbuff_t *tvb, void *data, proto_tree *tree, int nla_type,
static const struct attr_lookup values[] = {
{ WS_NL80211_ATTR_CHANNEL_WIDTH, &hfi_nl80211_chan_width, NULL, NULL },
{ WS_NL80211_ATTR_WIPHY_CHANNEL_TYPE, &hfi_nl80211_channel_type, NULL, NULL },
+ { WS_NL80211_ATTR_IFNAME, &hfi_nl80211_ifname, NULL, NULL },
{ WS_NL80211_ATTR_IFTYPE, &hfi_nl80211_iftype, NULL, NULL },
{ WS_NL80211_ATTR_STA_PLINK_ACTION, &hfi_plink_actions, NULL, NULL },
{ WS_NL80211_ATTR_MPATH_INFO, &hfi_nl80211_mpath_info, NULL, NULL },
@@ -2848,6 +2853,7 @@ proto_register_netlink_nl80211(void)
&hfi_nl80211_attr_value,
&hfi_nl80211_attr_value16,
&hfi_nl80211_attr_value32,
+ &hfi_nl80211_ifname,
/* Extracted using tools/generate-nl80211-fields.py */
/* Definitions from linux/nl80211.h {{{ */
&hfi_nl80211_commands,