Revert revision 44921.

See discussion on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728

svn path=/trunk/; revision=45791
This commit is contained in:
Evan Huus 2012-10-26 00:42:34 +00:00
parent d97b4ec325
commit c6b522bc70
7 changed files with 25 additions and 50 deletions

View File

@ -62,28 +62,14 @@ typedef enum {
/* (the long addresses are EUI-64's */
} 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); \
}

View File

@ -1441,22 +1441,11 @@ col_set_addr(packet_info *pinfo, const int col, const address *addr, const gbool
break;
case AT_ETHER:
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;
}
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_IPv4:

View File

@ -11399,15 +11399,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_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);
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);
/* for tap */
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);
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);
whdr->type = frame_type_subtype;
seq_control = tvb_get_letohs(tvb, 22);
@ -11779,16 +11779,16 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
break;
}
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);
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);
/* for tap */
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);
SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, bssid);
SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
whdr->type = frame_type_subtype;
seq_control = tvb_get_letohs(tvb, 22);

View File

@ -1396,7 +1396,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, AT_SUB_NONE, 0, NULL };
static address null_address = { AT_NONE, 0, NULL };
tvb_previous_offset = 0;
tvb_len = tvb_length(tvb);
tvb_current_len = tvb_len;

View File

@ -1356,7 +1356,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, AT_SUB_NONE, 0, NULL };
static address null_address = { AT_NONE, 0, NULL };
/* does this look like radius ? */
if(!is_radius(tvb)){

View File

@ -1547,7 +1547,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, AT_SUB_NONE, 0, NULL };
static address null_address = { AT_NONE, 0, NULL };
rpc_proc_info_key key;
rpc_proc_info_value *value;
rpc_call_info_value *rpc_call;
@ -1697,7 +1697,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, AT_SUB_NONE, 0, NULL };
static address null_address = { AT_NONE, 0, NULL };
rpc_call_info_value *rpc_call;
char *procname=NULL;
dissect_function_t *dissect_function = NULL;
@ -1929,7 +1929,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, AT_SUB_NONE, 0, NULL };
static address null_address = { AT_NONE, 0, NULL };
nstime_t ns;
dissect_function_t *dissect_function = NULL;

View File

@ -64,7 +64,7 @@ extern gboolean include_cor2_changes;
gint man_ofdma = 1;
address bs_address = {0,0,0,0};
address bs_address = {0,0,0};
/* The following variables are local to the function, but serve as
elements for the global ett_tlv[] array */