All: Fix proto_tree_add_item() encoding parameter:
- Use 'ENC_(LITTLE|BIG)_ENDIAN' instead of locally defined 'bo_(little|big)_endian'; - Use ENC_NA for hf fields with type FT_NONE or FT_BYTES. packet-wsp.c: - #if 0 unused hf fields; -Fix two minor bugs in "sir" dissection. svn path=/trunk/; revision=39276
This commit is contained in:
parent
5b8891604f
commit
a70163fa5c
|
@ -73,12 +73,6 @@
|
|||
#define HF_EMPTY ( -1 )
|
||||
#define ETT_EMPTY ( -1 )
|
||||
|
||||
enum
|
||||
{
|
||||
bo_big_endian = 0,
|
||||
bo_little_endian = 1
|
||||
};
|
||||
|
||||
/* Utility function for reading Uintvar encoded values */
|
||||
guint tvb_get_guintvar (tvbuff_t *, guint , guint *);
|
||||
|
||||
|
|
|
@ -268,10 +268,14 @@ static int hf_wsp_parameter_mac = HF_EMPTY;
|
|||
static int hf_wsp_parameter_upart_type = HF_EMPTY;
|
||||
static int hf_wsp_parameter_level = HF_EMPTY;
|
||||
static int hf_wsp_parameter_size = HF_EMPTY;
|
||||
#if 0
|
||||
static int hf_wsp_reply_data = HF_EMPTY;
|
||||
#endif
|
||||
static int hf_wsp_post_data = HF_EMPTY;
|
||||
#if 0
|
||||
static int hf_wsp_push_data = HF_EMPTY;
|
||||
static int hf_wsp_multipart_data = HF_EMPTY;
|
||||
#endif
|
||||
static int hf_wsp_mpart = HF_EMPTY;
|
||||
|
||||
/* Header code page shift sequence */
|
||||
|
@ -1749,8 +1753,9 @@ add_headers (proto_tree *tree, tvbuff_t *tvb, int hf, packet_info *pinfo)
|
|||
if (offset >= tvb_len)
|
||||
return; /* No headers! */
|
||||
|
||||
/* XXX: the field pointed to by hf has a type of FT_NONE */
|
||||
ti = proto_tree_add_item(tree, hf,
|
||||
tvb, offset, tvb_len, bo_little_endian);
|
||||
tvb, offset, tvb_len, ENC_NA);
|
||||
wsp_headers = proto_item_add_subtree(ti, ett_headers);
|
||||
|
||||
while (offset < tvb_len) {
|
||||
|
@ -4511,7 +4516,7 @@ dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
*/
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, hf_redirect_addresses,
|
||||
tvb, 0, -1, bo_little_endian);
|
||||
tvb, 0, -1, ENC_NA);
|
||||
addresses_tree = proto_item_add_subtree(ti, ett_addresses);
|
||||
}
|
||||
|
||||
|
@ -4674,7 +4679,7 @@ dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
if (address_len != 0) {
|
||||
if (tree) {
|
||||
proto_tree_add_item (addr_tree, hf_address_addr,
|
||||
tvb, offset, address_len, bo_little_endian);
|
||||
tvb, offset, address_len, ENC_NA);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -4713,7 +4718,8 @@ add_addresses(proto_tree *tree, tvbuff_t *tvb, int hf)
|
|||
/*
|
||||
* Addresses.
|
||||
*/
|
||||
ti = proto_tree_add_item(tree, hf, tvb, 0, -1, bo_little_endian);
|
||||
/* XXX: the field pointed to by hf has a type of FT_NONE */
|
||||
ti = proto_tree_add_item(tree, hf, tvb, 0, -1, ENC_NA);
|
||||
addresses_tree = proto_item_add_subtree(ti, ett_addresses);
|
||||
|
||||
while (offset < tvb_len) {
|
||||
|
@ -4826,7 +4832,7 @@ add_addresses(proto_tree *tree, tvbuff_t *tvb, int hf)
|
|||
default:
|
||||
if (address_len != 0) {
|
||||
proto_tree_add_item (addr_tree, hf_address_addr,
|
||||
tvb, offset, address_len, bo_little_endian);
|
||||
tvb, offset, address_len, ENC_NA);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -4853,6 +4859,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
guint8 version;
|
||||
guint32 val_len;
|
||||
guint32 val_len_save;
|
||||
guint32 len;
|
||||
guint32 offset = 0;
|
||||
guint32 i;
|
||||
|
@ -4871,7 +4878,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
return;
|
||||
|
||||
ti = proto_tree_add_item(tree, hf_sir_section,
|
||||
tvb, 0, -1, bo_little_endian);
|
||||
tvb, 0, -1, ENC_NA);
|
||||
subtree = proto_item_add_subtree(ti, ett_sir);
|
||||
|
||||
/* Version */
|
||||
|
@ -4922,7 +4929,9 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += len;
|
||||
/* Protocol Options list.
|
||||
* Each protocol option is encoded as a guintvar */
|
||||
for (i = 0; i < val_len; i++) {
|
||||
|
||||
val_len_save = val_len;
|
||||
for (i = 0; i < val_len_save; i++) {
|
||||
val_len = tvb_get_guintvar(tvb, offset, &len);
|
||||
proto_tree_add_uint(subtree, hf_sir_protocol_options,
|
||||
tvb, offset, len, val_len);
|
||||
|
@ -4937,7 +4946,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* ProvURL */
|
||||
tvb_ensure_bytes_exist(tvb, offset, val_len);
|
||||
ti = proto_tree_add_item (tree, hf_sir_prov_url,
|
||||
tvb, offset, val_len, bo_little_endian);
|
||||
tvb, offset, val_len, FALSE);
|
||||
offset += val_len;
|
||||
|
||||
/* Number of entries in the CPITag list */
|
||||
|
@ -4945,14 +4954,14 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_uint(subtree, hf_sir_cpi_tag_len,
|
||||
tvb, offset, len, val_len);
|
||||
offset += len;
|
||||
|
||||
/* CPITag list.
|
||||
* Each CPITag is encoded as 4 octets of opaque data.
|
||||
* In OTA-HTTP, it is conveyed in the X-Wap-CPITag header
|
||||
* but with a Base64 encoding of the 4 bytes. */
|
||||
for (i = 0; i < val_len; i++) {
|
||||
val_len = tvb_get_guintvar(tvb, offset, &len);
|
||||
proto_tree_add_item(subtree, hf_sir_cpi_tag,
|
||||
tvb, offset, 4, val_len);
|
||||
tvb, offset, 4, ENC_NA);
|
||||
offset += 4;
|
||||
}
|
||||
}
|
||||
|
@ -5026,7 +5035,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
proto_tree_set_visible(tree, TRUE);
|
||||
|
||||
proto_ti = proto_tree_add_item(tree, proto_wsp,
|
||||
tvb, 0, -1, bo_little_endian);
|
||||
tvb, 0, -1, ENC_NA);
|
||||
wsp_tree = proto_item_add_subtree(proto_ti, ett_wsp);
|
||||
proto_item_append_text(proto_ti, ", Method: %s (0x%02x)",
|
||||
val_to_str_ext (pdut, &wsp_vals_pdu_type_ext, "Unknown (0x%02x)"),
|
||||
|
@ -5038,10 +5047,10 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (is_connectionless)
|
||||
{
|
||||
proto_tree_add_item (wsp_tree, hf_wsp_header_tid,
|
||||
tvb, 0, 1, bo_little_endian);
|
||||
tvb, 0, 1, ENC_LITTLE_ENDIAN);
|
||||
}
|
||||
proto_tree_add_item( wsp_tree, hf_wsp_header_pdu_type,
|
||||
tvb, offset, 1, bo_little_endian);
|
||||
tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
}
|
||||
offset++;
|
||||
|
||||
|
@ -5061,9 +5070,9 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (pdut == WSP_PDU_CONNECT)
|
||||
{
|
||||
proto_tree_add_item (wsp_tree, hf_wsp_version_major,
|
||||
tvb, offset, 1, bo_little_endian);
|
||||
tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item (wsp_tree, hf_wsp_version_minor,
|
||||
tvb, offset, 1, bo_little_endian);
|
||||
tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
{
|
||||
guint8 ver = tvb_get_guint8(tvb, offset);
|
||||
proto_item_append_text(proto_ti, ", Version: %u.%u",
|
||||
|
@ -5252,7 +5261,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
reply_status_str = val_to_str_ext_const (reply_status, &wsp_vals_status_ext, "(Unknown response status)");
|
||||
if (tree) {
|
||||
proto_tree_add_item (wsp_tree, hf_wsp_header_status,
|
||||
tvb, offset, 1, bo_little_endian);
|
||||
tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(proto_ti, ", Status: %s (0x%02x)",
|
||||
reply_status_str, reply_status);
|
||||
}
|
||||
|
@ -5330,7 +5339,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (tree) / * Only display if needed * /
|
||||
proto_tree_add_item (wsp_tree,
|
||||
hf_wsp_reply_data,
|
||||
tmp_tvb, 0, -1, bo_little_endian);
|
||||
tmp_tvb, 0, -1, ENC_NA);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -5414,7 +5423,7 @@ dissect_wsp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (tree) /* Only display if needed */
|
||||
proto_tree_add_item (wsp_tree,
|
||||
hf_wsp_push_data,
|
||||
tmp_tvb, 0, -1, bo_little_endian);
|
||||
tmp_tvb, 0, -1, ENC_NA);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -5487,7 +5496,7 @@ add_uri (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
tvb_ensure_bytes_exist(tvb, URIOffset, uriLen);
|
||||
if (tree)
|
||||
proto_tree_add_item (tree, hf_wsp_header_uri,
|
||||
tvb, URIOffset, uriLen, bo_little_endian);
|
||||
tvb, URIOffset, uriLen, ENC_LITTLE_ENDIAN);
|
||||
|
||||
str = tvb_format_text (tvb, URIOffset, uriLen);
|
||||
/* XXX - tvb_format_text() returns a pointer to a static text string
|
||||
|
@ -5543,7 +5552,7 @@ add_capabilities (proto_tree *tree, tvbuff_t *tvb, guint8 pdu_type)
|
|||
DebugLog(("add_capabilities(): capabilities to process\n"));
|
||||
|
||||
ti = proto_tree_add_item(tree, hf_capabilities_section,
|
||||
tvb, 0, tvb_len, bo_little_endian);
|
||||
tvb, 0, tvb_len, ENC_NA);
|
||||
wsp_capabilities = proto_item_add_subtree(ti, ett_capabilities);
|
||||
|
||||
while (offset < tvb_len) {
|
||||
|
@ -5795,7 +5804,7 @@ add_capabilities (proto_tree *tree, tvbuff_t *tvb, guint8 pdu_type)
|
|||
case WSP_CAPA_ALIASES:
|
||||
/* TODO - same format as redirect addresses */
|
||||
proto_tree_add_item(wsp_capabilities, hf_capa_aliases,
|
||||
tvb, capaStart, capaLen, bo_little_endian);
|
||||
tvb, capaStart, capaLen, ENC_NA);
|
||||
break;
|
||||
case WSP_CAPA_CLIENT_MESSAGE_SIZE:
|
||||
value = tvb_get_guintvar(tvb, offset, &len);
|
||||
|
@ -5836,10 +5845,10 @@ add_post_data (proto_tree *tree, tvbuff_t *tvb, guint contentType,
|
|||
|
||||
DebugLog(("add_post_data() - START\n"));
|
||||
|
||||
/* VERIFY ti = proto_tree_add_item (tree, hf_wsp_post_data,tvb,offset,-1,bo_little_endian); */
|
||||
/* VERIFY ti = proto_tree_add_item (tree, hf_wsp_post_data,tvb,offset,-1,ENC_NA); */
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item (tree, hf_wsp_post_data,
|
||||
tvb, offset, -1, bo_little_endian);
|
||||
tvb, offset, -1, ENC_NA);
|
||||
sub_tree = proto_item_add_subtree(ti, ett_post);
|
||||
}
|
||||
|
||||
|
@ -6022,7 +6031,7 @@ add_multipart_data (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo)
|
|||
#if 0
|
||||
if (tree) /* Only display if needed */
|
||||
proto_tree_add_item (mpart_tree, hf_wsp_multipart_data,
|
||||
tvb, offset, DataLen, bo_little_endian);
|
||||
tvb, offset, DataLen, ENC_NA);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -6215,6 +6224,7 @@ proto_register_wsp(void)
|
|||
"Size parameter", HFILL
|
||||
}
|
||||
},
|
||||
#if 0
|
||||
{ &hf_wsp_reply_data,
|
||||
{ "Data",
|
||||
"wsp.reply.data",
|
||||
|
@ -6222,6 +6232,7 @@ proto_register_wsp(void)
|
|||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
#endif
|
||||
{ &hf_wsp_header_shift_code,
|
||||
{ "Switching to WSP header code-page",
|
||||
"wsp.code_page",
|
||||
|
@ -6344,6 +6355,7 @@ proto_register_wsp(void)
|
|||
"Post Data", HFILL
|
||||
}
|
||||
},
|
||||
#if 0
|
||||
{ &hf_wsp_push_data,
|
||||
{ "Push Data",
|
||||
"wsp.push.data",
|
||||
|
@ -6358,6 +6370,7 @@ proto_register_wsp(void)
|
|||
"The data of 1 MIME-multipart part.", HFILL
|
||||
}
|
||||
},
|
||||
#endif
|
||||
{ &hf_wsp_mpart,
|
||||
{ "Part",
|
||||
"wsp.multipart",
|
||||
|
@ -7291,7 +7304,8 @@ proto_register_wsp(void)
|
|||
}
|
||||
},
|
||||
|
||||
/* Not used for now
|
||||
#if 0
|
||||
/* Not used for now */
|
||||
{ &hf_hdr_openwave_x_up_proxy_client_id,
|
||||
{ "x-up-proxy-client-id",
|
||||
"wsp.header.x_up_1.x_up_proxy_client_id",
|
||||
|
@ -7299,7 +7313,7 @@ proto_register_wsp(void)
|
|||
"WSP Openwave header x-up-proxy-client-id", HFILL
|
||||
}
|
||||
},
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Header value parameters
|
||||
|
|
|
@ -352,7 +352,7 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_wtls, tvb, offset_wtls,
|
||||
-1, bo_little_endian);
|
||||
-1, ENC_LITTLE_ENDIAN);
|
||||
wtls_tree = proto_item_add_subtree(ti, ett_wtls);
|
||||
|
||||
for (offset_wtls=0; offset_wtls < (tvb_reported_length(tvb)-1);) {
|
||||
|
@ -378,7 +378,7 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset = offset_wtls;
|
||||
|
||||
proto_tree_add_item (wtls_rec_tree, hf_wtls_record_type,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
|
||||
offset++;
|
||||
|
||||
|
@ -386,13 +386,13 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (pdut & WTLS_RECORD_TYPE_SEQUENCE) {
|
||||
proto_tree_add_item (wtls_rec_tree, hf_wtls_record_sequence,
|
||||
tvb,offset,2,bo_big_endian);
|
||||
tvb,offset,2,ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
}
|
||||
if (pdut & WTLS_RECORD_TYPE_LENGTH) {
|
||||
count = tvb_get_ntohs(tvb, offset);
|
||||
proto_tree_add_item (wtls_rec_tree, hf_wtls_record_length,
|
||||
tvb,offset,2,bo_big_endian);
|
||||
tvb,offset,2,ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
}
|
||||
else {
|
||||
|
@ -401,7 +401,7 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (pdut & WTLS_RECORD_TYPE_CIPHER_CUR) {
|
||||
proto_tree_add_item (wtls_rec_tree, hf_wtls_record_ciphered,
|
||||
tvb,offset,count,bo_big_endian);
|
||||
tvb,offset,count,ENC_NA);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -411,14 +411,14 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
case WTLS_ALERT :
|
||||
ti = proto_tree_add_item(wtls_rec_tree, hf_wtls_alert, tvb, offset,
|
||||
count, bo_little_endian);
|
||||
count, ENC_NA);
|
||||
wtls_msg_type_tree = proto_item_add_subtree(ti, ett_wtls_msg_type);
|
||||
proto_tree_add_item (wtls_msg_type_tree, hf_wtls_alert_level,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset+=1;
|
||||
count = tvb_get_ntohs (tvb, offset);
|
||||
proto_tree_add_item (wtls_msg_type_tree, hf_wtls_alert_description,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset+=1;
|
||||
default:
|
||||
offset+=count;
|
||||
|
@ -435,12 +435,12 @@ add_text_identifier(tvbuff_t *tvb, int offset, int hf_charset,
|
|||
guint8 size;
|
||||
int client_size = 0;
|
||||
|
||||
proto_tree_add_item(tree, hf_charset, tvb, offset, 2, bo_big_endian);
|
||||
proto_tree_add_item(tree, hf_charset, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
size = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(tree, hf_size, tvb, offset, 1, bo_big_endian);
|
||||
proto_tree_add_item(tree, hf_size, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(tree, hf_str, tvb, offset, size, bo_big_endian);
|
||||
proto_tree_add_item(tree, hf_str, tvb, offset, size, ENC_BIG_ENDIAN);
|
||||
offset+=size;
|
||||
client_size+=size+3;
|
||||
#ifdef DEBUG
|
||||
|
@ -499,19 +499,19 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
wtls_msg_type_tree = proto_item_add_subtree(ti, ett_wtls_msg_type);
|
||||
|
||||
proto_tree_add_item (wtls_msg_type_tree, hf_wtls_hands_type,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset+=1;
|
||||
count = tvb_get_ntohs (tvb, offset);
|
||||
proto_tree_add_item (wtls_msg_type_tree, hf_wtls_hands_length,
|
||||
tvb,offset,2,bo_big_endian);
|
||||
tvb,offset,2,ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
switch(pdu_msg_type) {
|
||||
case WTLS_HANDSHAKE_CLIENT_HELLO :
|
||||
ti = proto_tree_add_item(wtls_msg_type_tree, hf_wtls_hands_cli_hello, tvb, offset,
|
||||
count, bo_little_endian);
|
||||
count, ENC_NA);
|
||||
wtls_msg_type_item_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item);
|
||||
proto_tree_add_item (wtls_msg_type_item_tree, hf_wtls_hands_cli_hello_version,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
timeValue.secs = tvb_get_ntohl (tvb, offset);
|
||||
timeValue.nsecs = 0;
|
||||
|
@ -519,7 +519,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
offset, 4, &timeValue);
|
||||
offset+=4;
|
||||
proto_tree_add_item (wtls_msg_type_item_tree, hf_wtls_hands_cli_hello_random,
|
||||
tvb,offset,12,bo_big_endian);
|
||||
tvb,offset,12,ENC_NA);
|
||||
offset+=12;
|
||||
offset = add_session_id (wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_session,
|
||||
|
@ -530,13 +530,13 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
count = tvb_get_ntohs (tvb, offset);
|
||||
ti = proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_cli_key_id, tvb, offset,
|
||||
count+2, bo_little_endian);
|
||||
count+2, ENC_NA);
|
||||
wtls_msg_type_item_sub_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item_sub);
|
||||
|
||||
/* display length of client_key_ids structure */
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_cli_hello_cli_key_len,
|
||||
tvb,offset,2,bo_big_endian);
|
||||
tvb,offset,2,ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
|
||||
/* cycle through client_key_ids entries */
|
||||
|
@ -561,7 +561,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_parameter_index,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
#ifdef DEBUG
|
||||
|
@ -573,7 +573,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
size = tvb_get_ntohs (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_parameter_set,
|
||||
tvb,offset,size+2,bo_big_endian);
|
||||
tvb,offset,size+2,ENC_BIG_ENDIAN);
|
||||
offset+=size+2;
|
||||
client_size+=size+2;
|
||||
}
|
||||
|
@ -582,7 +582,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier_type,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
#ifdef DEBUG
|
||||
|
@ -609,11 +609,11 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
size = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier_size,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier,
|
||||
tvb,offset,size,bo_big_endian);
|
||||
tvb,offset,size,ENC_NA);
|
||||
offset+=size;
|
||||
client_size+=size+1;
|
||||
#ifdef DEBUG
|
||||
|
@ -625,7 +625,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
/* SHA-1 hash of the public key */
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier,
|
||||
tvb,offset,20,bo_big_endian);
|
||||
tvb,offset,20,ENC_NA);
|
||||
offset+=20;
|
||||
client_size+=20;
|
||||
#ifdef DEBUG
|
||||
|
@ -639,11 +639,11 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
size = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier_size,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier,
|
||||
tvb,offset,size,bo_big_endian);
|
||||
tvb,offset,size,ENC_NA);
|
||||
offset+=size;
|
||||
client_size+=size+1;
|
||||
#ifdef DEBUG
|
||||
|
@ -660,13 +660,13 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
count = tvb_get_ntohs (tvb, offset);
|
||||
ti = proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_trust_key_id, tvb, offset,
|
||||
count+2, bo_little_endian);
|
||||
count+2, ENC_NA);
|
||||
wtls_msg_type_item_sub_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item_sub);
|
||||
|
||||
/* display length of trusted_keys structure */
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_cli_hello_cli_key_len,
|
||||
tvb,offset,2,bo_big_endian);
|
||||
tvb,offset,2,ENC_BIG_ENDIAN);
|
||||
|
||||
offset+=2;
|
||||
for (;count > 0;count-=client_size) {
|
||||
|
@ -690,7 +690,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_parameter_index,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
#ifdef DEBUG
|
||||
|
@ -702,7 +702,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
size = tvb_get_ntohs (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_parameter_set,
|
||||
tvb,offset,size+2,bo_big_endian);
|
||||
tvb,offset,size+2,ENC_BIG_ENDIAN);
|
||||
offset+=size+2;
|
||||
client_size+=size+2;
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier_type,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
#ifdef DEBUG
|
||||
|
@ -738,11 +738,11 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
size = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier_size,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier,
|
||||
tvb,offset,size,bo_big_endian);
|
||||
tvb,offset,size,ENC_NA);
|
||||
offset+=size;
|
||||
client_size+=size+1;
|
||||
#ifdef DEBUG
|
||||
|
@ -754,7 +754,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
/* SHA-1 hash of the public key */
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier,
|
||||
tvb,offset,20,bo_big_endian);
|
||||
tvb,offset,20,ENC_NA);
|
||||
offset+=20;
|
||||
client_size+=20;
|
||||
#ifdef DEBUG
|
||||
|
@ -769,11 +769,11 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
/* need to fetch identifier and display it */
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier_size,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
|
||||
hf_wtls_hands_cli_hello_key_identifier,
|
||||
tvb,offset,size,bo_big_endian);
|
||||
tvb,offset,size,ENC_NA);
|
||||
offset+=size;
|
||||
client_size+=size+1;
|
||||
#ifdef DEBUG
|
||||
|
@ -789,7 +789,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
count = tvb_get_guint8 (tvb, offset);
|
||||
ti = proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_cipher_suite, tvb, offset,
|
||||
count+1, bo_little_endian);
|
||||
count+1, ENC_NA);
|
||||
wtls_msg_type_item_sub_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item_sub);
|
||||
offset+=1;
|
||||
for (;count > 0;count-=client_size) {
|
||||
|
@ -830,31 +830,31 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
count = tvb_get_guint8 (tvb, offset);
|
||||
ti = proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_compression_methods, tvb, offset,
|
||||
count+1, bo_little_endian);
|
||||
count+1, ENC_NA);
|
||||
wtls_msg_type_item_sub_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item_sub);
|
||||
offset+=1;
|
||||
for (;count > 0;count-=client_size) {
|
||||
client_size=0;
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_cli_hello_compression, tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
}
|
||||
proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_sequence_mode, tvb, offset,
|
||||
1, bo_little_endian);
|
||||
1, ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_cli_hello_key_refresh, tvb, offset,
|
||||
1, bo_little_endian);
|
||||
1, ENC_LITTLE_ENDIAN);
|
||||
break;
|
||||
case WTLS_HANDSHAKE_SERVER_HELLO :
|
||||
ti = proto_tree_add_item(wtls_msg_type_tree, hf_wtls_hands_serv_hello, tvb, offset,
|
||||
count, bo_little_endian);
|
||||
count, ENC_NA);
|
||||
wtls_msg_type_item_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item);
|
||||
proto_tree_add_item (wtls_msg_type_item_tree, hf_wtls_hands_serv_hello_version,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
timeValue.secs = tvb_get_ntohl (tvb, offset);
|
||||
timeValue.nsecs = 0;
|
||||
|
@ -862,7 +862,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
offset, 4, &timeValue);
|
||||
offset+=4;
|
||||
proto_tree_add_item (wtls_msg_type_item_tree, hf_wtls_hands_serv_hello_random,
|
||||
tvb,offset,12,bo_big_endian);
|
||||
tvb,offset,12,ENC_NA);
|
||||
offset+=12;
|
||||
offset = add_session_id (wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_serv_hello_session,
|
||||
|
@ -870,45 +870,45 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_serv_hello_cli_key_id,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
cli_key_item = proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_serv_hello_cipher_suite_item, tvb, offset,2,
|
||||
bo_little_endian);
|
||||
ENC_NA);
|
||||
wtls_msg_type_item_sub_tree = proto_item_add_subtree(cli_key_item,
|
||||
ett_wtls_msg_type_item_sub);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_serv_hello_cipher_bulk,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_serv_hello_cipher_mac,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_serv_hello_compression, tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_serv_hello_sequence_mode, tvb, offset,
|
||||
1, bo_little_endian);
|
||||
1, ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_serv_hello_key_refresh, tvb, offset,
|
||||
1, bo_little_endian);
|
||||
1, ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
break;
|
||||
case WTLS_HANDSHAKE_CERTIFICATE :
|
||||
ti = proto_tree_add_item(wtls_msg_type_tree, hf_wtls_hands_certificates,
|
||||
tvb, offset,count, bo_little_endian);
|
||||
tvb, offset,count, ENC_NA);
|
||||
wtls_msg_type_item_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item);
|
||||
count = tvb_get_ntohs (tvb, offset);
|
||||
offset+=2;
|
||||
for (;count > 0;count-=client_size) {
|
||||
cli_key_item = proto_tree_add_item(wtls_msg_type_item_tree,
|
||||
hf_wtls_hands_certificate, tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_NA);
|
||||
client_size=0;
|
||||
wtls_msg_type_item_sub_tree = proto_item_add_subtree(cli_key_item,
|
||||
ett_wtls_msg_type_item_sub);
|
||||
|
@ -916,7 +916,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_type, tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
switch(value) {
|
||||
|
@ -924,20 +924,20 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_version,
|
||||
tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_signature_type,
|
||||
tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_issuer_type,
|
||||
tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
switch (value) {
|
||||
|
@ -977,7 +977,7 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_subject_type,
|
||||
tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
switch (value) {
|
||||
|
@ -1003,20 +1003,20 @@ dissect_wtls_handshake(proto_tree *tree, tvbuff_t *tvb, guint offset, guint coun
|
|||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_public_key_type,
|
||||
tvb, offset,1,
|
||||
bo_little_endian);
|
||||
ENC_LITTLE_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
value = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_key_parameter_index,
|
||||
tvb,offset,1,bo_big_endian);
|
||||
tvb,offset,1,ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
client_size++;
|
||||
if (value == 0xff) {
|
||||
size = tvb_get_ntohs (tvb, offset);
|
||||
proto_tree_add_item(wtls_msg_type_item_sub_tree,
|
||||
hf_wtls_hands_certificate_wtls_key_parameter_set,
|
||||
tvb,offset,size+2,bo_big_endian);
|
||||
tvb,offset,size+2,ENC_BIG_ENDIAN);
|
||||
offset+=size+2;
|
||||
client_size+=size+2;
|
||||
}
|
||||
|
|
|
@ -284,17 +284,17 @@ wtp_handle_tpi(proto_tree *tree, tvbuff_t *tvb)
|
|||
case 0x01: /* Info */
|
||||
/* Beware, untested case here */
|
||||
proto_tree_add_item(subTree, hf_wtp_tpi_info,
|
||||
tvb, offset, tLen, bo_little_endian);
|
||||
tvb, offset, tLen, ENC_NA);
|
||||
break;
|
||||
case 0x02: /* Option */
|
||||
proto_tree_add_item(subTree, hf_wtp_tpi_opt,
|
||||
tvb, offset++, 1, bo_little_endian);
|
||||
tvb, offset++, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(subTree, hf_wtp_tpi_optval,
|
||||
tvb, offset, tLen - 1, bo_little_endian);
|
||||
tvb, offset, tLen - 1, ENC_NA);
|
||||
break;
|
||||
case 0x03: /* PSN */
|
||||
proto_tree_add_item(subTree, hf_wtp_tpi_psn,
|
||||
tvb, offset, 1, bo_little_endian);
|
||||
tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
break;
|
||||
case 0x04: /* SDU boundary */
|
||||
/* \todo */
|
||||
|
@ -350,7 +350,7 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_wtp,
|
||||
tvb, offCur, 1, bo_little_endian);
|
||||
tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
wtp_tree = proto_item_add_subtree(ti, ett_wtp_sub_pdu_tree);
|
||||
proto_item_append_text(ti, ", PDU concatenation");
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
fprintf(stderr, "dissect_wtp: cbHeader = %d\n", cbHeader);
|
||||
#endif
|
||||
/* NOTE - Length will be set when we process the TPI */
|
||||
ti = proto_tree_add_item(tree, proto_wtp, tvb, offCur, 0, bo_little_endian);
|
||||
ti = proto_tree_add_item(tree, proto_wtp, tvb, offCur, 0, ENC_LITTLE_ENDIAN);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "dissect_wtp: (7) Returned from proto_tree_add_item\n");
|
||||
#endif
|
||||
|
@ -487,20 +487,20 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
1, /* length of highlight*/
|
||||
b0 /* value */
|
||||
);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_pdu_type, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_pdu_type, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
|
||||
switch(pdut) {
|
||||
case INVOKE:
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_version , tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_flag_TIDNew, tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_flag_UP, tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_Reserved, tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_TransactionClass, tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_version , tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_flag_TIDNew, tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_flag_UP, tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_Reserved, tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Inv_TransactionClass, tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(ti,
|
||||
", PDU: Invoke (%u)"
|
||||
", Transaction Class: %s (%u)",
|
||||
|
@ -510,32 +510,32 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
|
||||
case RESULT:
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(ti, ", PDU: Result (%u)", RESULT);
|
||||
break;
|
||||
|
||||
case ACK:
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Ack_flag_TVETOK, tvb, offCur, 1, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Ack_flag_TVETOK, tvb, offCur, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(ti, ", PDU: ACK (%u)", ACK);
|
||||
break;
|
||||
|
||||
case ABORT:
|
||||
abortType = tvb_get_guint8 (tvb, offCur) & 0x07;
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Abort_type , tvb, offCur , 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Abort_type , tvb, offCur , 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
if (abortType == PROVIDER)
|
||||
{
|
||||
guint8 reason = tvb_get_guint8(tvb, offCur + 3);
|
||||
proto_tree_add_item( wtp_tree, hf_wtp_header_Abort_reason_provider , tvb, offCur + 3 , 1, bo_little_endian);
|
||||
proto_tree_add_item( wtp_tree, hf_wtp_header_Abort_reason_provider , tvb, offCur + 3 , 1, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(ti,
|
||||
", PDU: Abort (%u)"
|
||||
", Type: Provider (%u)"
|
||||
|
@ -548,7 +548,7 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
else if (abortType == USER)
|
||||
{
|
||||
guint8 reason = tvb_get_guint8(tvb, offCur + 3);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Abort_reason_user , tvb, offCur + 3 , 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_Abort_reason_user , tvb, offCur + 3 , 1, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(ti,
|
||||
", PDU: Abort (%u)"
|
||||
", Type: User (%u)"
|
||||
|
@ -561,12 +561,12 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
|
||||
case SEGMENTED_INVOKE:
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_sequence_number , tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_sequence_number , tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(ti,
|
||||
", PDU: Segmented Invoke (%u)"
|
||||
", Packet Sequence Number: %u",
|
||||
|
@ -574,12 +574,12 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
|
||||
case SEGMENTED_RESULT:
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_Trailer, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_sequence_number , tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_sequence_number , tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(ti,
|
||||
", PDU: Segmented Result (%u)"
|
||||
", Packet Sequence Number: %u",
|
||||
|
@ -587,15 +587,15 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
|
||||
case NEGATIVE_ACK:
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, bo_big_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_RID, tvb, offCur, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID_response, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_flag_TID, tvb, offCur + 1, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_missing_packets , tvb, offCur + 3, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_missing_packets , tvb, offCur + 3, 1, ENC_LITTLE_ENDIAN);
|
||||
/* Iterate through missing packets */
|
||||
for (i = 0; i < numMissing; i++)
|
||||
{
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_sequence_number, tvb, offCur + 4 + i, 1, bo_little_endian);
|
||||
proto_tree_add_item(wtp_tree, hf_wtp_header_sequence_number, tvb, offCur + 4 + i, 1, ENC_LITTLE_ENDIAN);
|
||||
}
|
||||
proto_item_append_text(ti,
|
||||
", PDU: Negative Ack (%u)"
|
||||
|
|
Loading…
Reference in New Issue