From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728
Make right-click + apply-as-filter work in the packet list for non-ethernet frames (such as ieee 802.11 frames). svn path=/trunk/; revision=44921
This commit is contained in:
parent
37f0380998
commit
826bba705b
1
AUTHORS
1
AUTHORS
|
@ -3674,6 +3674,7 @@ Bodo Petermann <bp245[AT]hotmail.com>
|
|||
Martin Kupec <martin.kupec[AT]kupson.cz>
|
||||
Litao Gao <ltgao[AT]juniper.net>
|
||||
Niels Widger <niels[AT]qacafe.com>
|
||||
Pontus Fuchs <pontus.fuchs[AT]gmail.com>
|
||||
|
||||
Dan Lasley <dlasley[AT]promus.com> gave permission for his
|
||||
dumpit() hex-dump routine to be used.
|
||||
|
|
|
@ -60,14 +60,28 @@ typedef enum {
|
|||
AT_AX25 /* AX.25 */
|
||||
} address_type;
|
||||
|
||||
typedef enum {
|
||||
AT_SUB_NONE, /* no sub type */
|
||||
AT_SUB_IEEE80211, /* 802.11 */
|
||||
} address_stype;
|
||||
|
||||
typedef struct _address {
|
||||
address_type type; /* type of address */
|
||||
address_stype subtype;
|
||||
int len; /* length of address, in bytes */
|
||||
const void *data; /* pointer to address data */
|
||||
} address;
|
||||
|
||||
#define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \
|
||||
(addr)->type = (addr_type); \
|
||||
(addr)->subtype = AT_SUB_NONE; \
|
||||
(addr)->len = (addr_len); \
|
||||
(addr)->data = (addr_data); \
|
||||
}
|
||||
|
||||
#define SET_ADDRESS_SUB(addr, addr_type, addr_subtype, addr_len, addr_data) { \
|
||||
(addr)->type = (addr_type); \
|
||||
(addr)->subtype = addr_subtype; \
|
||||
(addr)->len = (addr_len); \
|
||||
(addr)->data = (addr_data); \
|
||||
}
|
||||
|
|
|
@ -1397,11 +1397,22 @@ col_set_addr(packet_info *pinfo, const int col, const address *addr, const gbool
|
|||
break;
|
||||
|
||||
case AT_ETHER:
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "eth.src";
|
||||
else
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "eth.dst";
|
||||
address_to_str_buf(addr, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
switch(addr->subtype) {
|
||||
default:
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "eth.src";
|
||||
else
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "eth.dst";
|
||||
address_to_str_buf(addr, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
break;
|
||||
case AT_SUB_IEEE80211:
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "wlan.sa";
|
||||
else
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "wlan.da";
|
||||
address_to_str_buf(addr, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case AT_IPv4:
|
||||
|
|
|
@ -10069,15 +10069,15 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
|
|||
src = tvb_get_ptr (tvb, 10, 6);
|
||||
dst = tvb_get_ptr (tvb, 4, 6);
|
||||
|
||||
SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
|
||||
SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
|
||||
SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
|
||||
SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
|
||||
SET_ADDRESS_SUB(&pinfo->dl_src, AT_ETHER, AT_SUB_IEEE80211, 6, src);
|
||||
SET_ADDRESS_SUB(&pinfo->src, AT_ETHER, AT_SUB_IEEE80211, 6, src);
|
||||
SET_ADDRESS_SUB(&pinfo->dl_dst, AT_ETHER, AT_SUB_IEEE80211, 6, dst);
|
||||
SET_ADDRESS_SUB(&pinfo->dst, AT_ETHER, AT_SUB_IEEE80211, 6, dst);
|
||||
|
||||
/* for tap */
|
||||
SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, tvb_get_ptr(tvb, 16,6));
|
||||
SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
|
||||
SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
|
||||
SET_ADDRESS_SUB(&whdr->bssid, AT_ETHER, AT_SUB_IEEE80211, 6, tvb_get_ptr(tvb, 16,6));
|
||||
SET_ADDRESS_SUB(&whdr->src, AT_ETHER, AT_SUB_IEEE80211, 6, src);
|
||||
SET_ADDRESS_SUB(&whdr->dst, AT_ETHER, AT_SUB_IEEE80211, 6, dst);
|
||||
whdr->type = frame_type_subtype;
|
||||
|
||||
seq_control = tvb_get_letohs(tvb, 22);
|
||||
|
@ -10449,16 +10449,16 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
|
|||
break;
|
||||
}
|
||||
|
||||
SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
|
||||
SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
|
||||
SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
|
||||
SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
|
||||
SET_ADDRESS_SUB(&pinfo->dl_src, AT_ETHER, AT_SUB_IEEE80211, 6, src);
|
||||
SET_ADDRESS_SUB(&pinfo->src, AT_ETHER, AT_SUB_IEEE80211, 6, src);
|
||||
SET_ADDRESS_SUB(&pinfo->dl_dst, AT_ETHER, AT_SUB_IEEE80211, 6, dst);
|
||||
SET_ADDRESS_SUB(&pinfo->dst, AT_ETHER, AT_SUB_IEEE80211, 6, dst);
|
||||
|
||||
/* for tap */
|
||||
|
||||
SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, bssid);
|
||||
SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
|
||||
SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
|
||||
SET_ADDRESS_SUB(&whdr->bssid, AT_ETHER, AT_SUB_IEEE80211, 6, bssid);
|
||||
SET_ADDRESS_SUB(&whdr->src, AT_ETHER, AT_SUB_IEEE80211, 6, src);
|
||||
SET_ADDRESS_SUB(&whdr->dst, AT_ETHER, AT_SUB_IEEE80211, 6, dst);
|
||||
whdr->type = frame_type_subtype;
|
||||
|
||||
seq_control = tvb_get_letohs(tvb, 22);
|
||||
|
|
|
@ -1398,7 +1398,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
const gchar *verb_description = "";
|
||||
char code_with_verb[64] = ""; /* To fit "<4-letter-code> (<longest-verb>)" */
|
||||
|
||||
static address null_address = { AT_NONE, 0, NULL };
|
||||
static address null_address = { AT_NONE, AT_SUB_NONE, 0, NULL };
|
||||
tvb_previous_offset = 0;
|
||||
tvb_len = tvb_length(tvb);
|
||||
tvb_current_len = tvb_len;
|
||||
|
|
|
@ -1360,7 +1360,7 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
|||
radius_call_info_key radius_call_key;
|
||||
radius_call_info_key *new_radius_call_key;
|
||||
radius_call_t *radius_call = NULL;
|
||||
static address null_address = { AT_NONE, 0, NULL };
|
||||
static address null_address = { AT_NONE, AT_SUB_NONE, 0, NULL };
|
||||
|
||||
/* does this look like radius ? */
|
||||
if(!is_radius(tvb)){
|
||||
|
|
|
@ -1549,7 +1549,7 @@ dissect_rpc_indir_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset, int args_id, guint32 prog, guint32 vers, guint32 proc)
|
||||
{
|
||||
conversation_t* conversation;
|
||||
static address null_address = { AT_NONE, 0, NULL };
|
||||
static address null_address = { AT_NONE, AT_SUB_NONE, 0, NULL };
|
||||
rpc_proc_info_key key;
|
||||
rpc_proc_info_value *value;
|
||||
rpc_call_info_value *rpc_call;
|
||||
|
@ -1699,7 +1699,7 @@ dissect_rpc_indir_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset, int result_id, int prog_id, int vers_id, int proc_id)
|
||||
{
|
||||
conversation_t* conversation;
|
||||
static address null_address = { AT_NONE, 0, NULL };
|
||||
static address null_address = { AT_NONE, AT_SUB_NONE, 0, NULL };
|
||||
rpc_call_info_value *rpc_call;
|
||||
char *procname=NULL;
|
||||
dissect_function_t *dissect_function = NULL;
|
||||
|
@ -1931,7 +1931,7 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
rpc_proc_info_key key;
|
||||
rpc_proc_info_value *value = NULL;
|
||||
conversation_t* conversation;
|
||||
static address null_address = { AT_NONE, 0, NULL };
|
||||
static address null_address = { AT_NONE, AT_SUB_NONE, 0, NULL };
|
||||
nstime_t ns;
|
||||
|
||||
dissect_function_t *dissect_function = NULL;
|
||||
|
|
|
@ -66,7 +66,7 @@ extern gboolean include_cor2_changes;
|
|||
|
||||
gint man_ofdma = 1;
|
||||
|
||||
address bs_address = {0,0,0};
|
||||
address bs_address = {0,0,0,0};
|
||||
|
||||
/* The following variables are local to the function, but serve as
|
||||
elements for the global ett_tlv[] array */
|
||||
|
|
Loading…
Reference in New Issue