summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-xmpp-gtalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-xmpp-gtalk.c')
-rw-r--r--epan/dissectors/packet-xmpp-gtalk.c186
1 files changed, 93 insertions, 93 deletions
diff --git a/epan/dissectors/packet-xmpp-gtalk.c b/epan/dissectors/packet-xmpp-gtalk.c
index 26516609..76803fe4 100644
--- a/epan/dissectors/packet-xmpp-gtalk.c
+++ b/epan/dissectors/packet-xmpp-gtalk.c
@@ -43,10 +43,10 @@ xmpp_gtalk_session(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_ele
proto_tree *session_tree;
xmpp_attr_info attrs_info [] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, FALSE, NULL, NULL},
- {"type", &hf_xmpp_gtalk_session_type, TRUE, TRUE, NULL, NULL},
- {"initiator", NULL, FALSE, TRUE, NULL, NULL},
- {"id", NULL, TRUE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, true, false, NULL, NULL},
+ {"type", &hf_xmpp_gtalk_session_type, true, true, NULL, NULL},
+ {"initiator", NULL, false, true, NULL, NULL},
+ {"id", NULL, true, true, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
@@ -75,8 +75,8 @@ xmpp_gtalk_session_desc(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmp
proto_tree *desc_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
- {"xml:lang", NULL, FALSE, FALSE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, true, true, NULL, NULL},
+ {"xml:lang", NULL, false, false, NULL, NULL}
};
xmpp_elem_info elems_info[] = {
@@ -95,15 +95,15 @@ xmpp_gtalk_session_desc_payload(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
proto_tree *payload_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, FALSE, TRUE, NULL, NULL},
- {"id", NULL, FALSE, TRUE, NULL, NULL},
- {"name", NULL, FALSE, TRUE, NULL, NULL},
- {"channels", NULL, FALSE, FALSE, NULL, NULL},
- {"clockrate", NULL, FALSE, FALSE, NULL, NULL},
- {"bitrate", NULL, FALSE, FALSE, NULL, NULL},
- {"width", NULL, FALSE, FALSE, NULL, NULL},
- {"height", NULL, FALSE, FALSE, NULL, NULL},
- {"framerate", NULL, FALSE, FALSE, NULL, NULL},
+ {"xmlns", &hf_xmpp_xmlns, false, true, NULL, NULL},
+ {"id", NULL, false, true, NULL, NULL},
+ {"name", NULL, false, true, NULL, NULL},
+ {"channels", NULL, false, false, NULL, NULL},
+ {"clockrate", NULL, false, false, NULL, NULL},
+ {"bitrate", NULL, false, false, NULL, NULL},
+ {"width", NULL, false, false, NULL, NULL},
+ {"height", NULL, false, false, NULL, NULL},
+ {"framerate", NULL, false, false, NULL, NULL},
};
payload_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_session_desc_payload, NULL, "PAYLOAD-TYPE");
@@ -118,18 +118,18 @@ xmpp_gtalk_session_cand(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmp
proto_tree *cand_tree;
xmpp_attr_info attrs_info[] = {
- {"name", NULL, TRUE, TRUE, NULL, NULL},
- {"address", NULL, TRUE, FALSE, NULL, NULL},
- {"port", NULL, TRUE, FALSE, NULL, NULL},
- {"preference", NULL, TRUE, FALSE, NULL, NULL},
- {"type", NULL, TRUE, TRUE, NULL, NULL},
- {"protocol", NULL, TRUE, TRUE, NULL, NULL},
- {"network", NULL, TRUE, FALSE, NULL, NULL},
- {"username", NULL, TRUE, FALSE, NULL, NULL},
- {"password", NULL, TRUE, FALSE, NULL, NULL},
- {"generation", NULL, TRUE, FALSE, NULL, NULL},
- {"foundation", NULL, FALSE, FALSE, NULL, NULL},
- {"component", NULL, FALSE, FALSE, NULL, NULL}
+ {"name", NULL, true, true, NULL, NULL},
+ {"address", NULL, true, false, NULL, NULL},
+ {"port", NULL, true, false, NULL, NULL},
+ {"preference", NULL, true, false, NULL, NULL},
+ {"type", NULL, true, true, NULL, NULL},
+ {"protocol", NULL, true, true, NULL, NULL},
+ {"network", NULL, true, false, NULL, NULL},
+ {"username", NULL, true, false, NULL, NULL},
+ {"password", NULL, true, false, NULL, NULL},
+ {"generation", NULL, true, false, NULL, NULL},
+ {"foundation", NULL, false, false, NULL, NULL},
+ {"component", NULL, false, false, NULL, NULL}
};
cand_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_session_cand, NULL, "CANDIDATE");
@@ -144,14 +144,14 @@ xmpp_gtalk_session_reason(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, x
proto_tree *reason_tree;
xmpp_attr_info attrs_info[] = {
- {"condition", NULL, TRUE, TRUE, NULL, NULL},
- {"text", NULL, FALSE, FALSE, NULL, NULL}
+ {"condition", NULL, true, true, NULL, NULL},
+ {"text", NULL, false, false, NULL, NULL}
};
xmpp_element_t *condition;
xmpp_element_t *text;
- static const gchar *reason_names[] = { "success", "busy", "cancel"};
+ static const char *reason_names[] = { "success", "busy", "cancel"};
reason_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_session_reason, NULL, "REASON");
@@ -160,14 +160,14 @@ xmpp_gtalk_session_reason(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, x
if((condition = xmpp_steal_element_by_names(element, reason_names, array_length(reason_names)))!=NULL)
{
xmpp_attr_t *fake_cond = xmpp_ep_init_attr_t(pinfo->pool, condition->name, condition->offset, condition->length);
- g_hash_table_insert(element->attrs, (gpointer)"condition", fake_cond);
+ g_hash_table_insert(element->attrs, (void *)"condition", fake_cond);
}
if((text = xmpp_steal_element_by_name(element, "text"))!=NULL)
{
xmpp_attr_t *fake_text = xmpp_ep_init_attr_t(pinfo->pool, text->data?text->data->value:"", text->offset, text->length);
- g_hash_table_insert(element->attrs, (gpointer)"text", fake_text);
+ g_hash_table_insert(element->attrs, (void *)"text", fake_text);
}
xmpp_display_attrs(reason_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
@@ -182,7 +182,7 @@ xmpp_gtalk_jingleinfo_query(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo,
proto_tree *query_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, true, true, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
@@ -222,8 +222,8 @@ xmpp_gtalk_jingleinfo_server(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo
proto_tree *serv_tree;
xmpp_attr_info attrs_info[] = {
- {"host", NULL, TRUE, TRUE, NULL, NULL},
- {"udp", NULL, TRUE, TRUE, NULL, NULL}
+ {"host", NULL, true, true, NULL, NULL},
+ {"udp", NULL, true, true, NULL, NULL}
};
serv_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_jingleinfo_server, NULL, "SERVER");
@@ -238,7 +238,7 @@ xmpp_gtalk_jingleinfo_relay(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo,
proto_tree *relay_tree;
xmpp_attr_info attrs_info[] = {
- {"token", NULL, FALSE, FALSE, NULL, NULL}
+ {"token", NULL, false, false, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
@@ -252,7 +252,7 @@ xmpp_gtalk_jingleinfo_relay(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo,
if((token = xmpp_steal_element_by_name(element, "token"))!=NULL)
{
xmpp_attr_t *fake_token = xmpp_ep_init_attr_t(pinfo->pool, token->data?token->data->value:"", token->offset, token->length);
- g_hash_table_insert(element->attrs, (gpointer)"token", fake_token);
+ g_hash_table_insert(element->attrs, (void *)"token", fake_token);
}
xmpp_display_attrs(relay_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
@@ -265,10 +265,10 @@ xmpp_gtalk_jingleinfo_relay_serv(proto_tree* tree, tvbuff_t* tvb, packet_info* p
proto_tree *serv_tree;
xmpp_attr_info attrs_info[] = {
- {"host", NULL, TRUE, TRUE, NULL, NULL},
- {"udp", NULL, FALSE, TRUE, NULL, NULL},
- {"tcp", NULL, FALSE, TRUE, NULL, NULL},
- {"tcpssl", NULL, FALSE, TRUE, NULL, NULL}
+ {"host", NULL, true, true, NULL, NULL},
+ {"udp", NULL, false, true, NULL, NULL},
+ {"tcp", NULL, false, true, NULL, NULL},
+ {"tcpssl", NULL, false, true, NULL, NULL}
};
serv_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_jingleinfo_relay_serv, NULL, "SERVER");
@@ -284,10 +284,10 @@ xmpp_gtalk_usersetting(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp
proto_tree *sett_tree;
xmpp_attr_info attrs_info [] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, true, true, NULL, NULL}
};
- guint i;
+ unsigned i;
sett_item = proto_tree_add_item(tree, hf_xmpp_gtalk_setting, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
sett_tree = proto_item_add_subtree(sett_item, ett_xmpp_gtalk_setting);
@@ -315,8 +315,8 @@ xmpp_gtalk_nosave_x(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_el
proto_tree *x_tree;
xmpp_attr_info attrs_info [] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
- {"value", NULL, FALSE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, true, true, NULL, NULL},
+ {"value", NULL, false, true, NULL, NULL}
};
x_item = proto_tree_add_item(tree, hf_xmpp_gtalk_nosave_x, tvb, element->offset, element->length,
@@ -334,10 +334,10 @@ xmpp_gtalk_mail_query(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_
proto_tree *query_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
- {"newer-than-time", NULL, FALSE, TRUE, NULL, NULL},
- {"newer-than-tid", NULL, FALSE, TRUE, NULL, NULL},
- {"q", NULL, FALSE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, true, true, NULL, NULL},
+ {"newer-than-time", NULL, false, true, NULL, NULL},
+ {"newer-than-tid", NULL, false, true, NULL, NULL},
+ {"q", NULL, false, true, NULL, NULL}
};
col_append_str(pinfo->cinfo, COL_INFO, "QUERY(google:mail:notify) ");
@@ -357,11 +357,11 @@ xmpp_gtalk_mail_mailbox(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmp
proto_tree *mail_tree;
xmpp_attr_info attrs_info [] = {
- {"xmlns", &hf_xmpp_xmlns, FALSE, TRUE, NULL, NULL},
- {"result-time", NULL, FALSE, TRUE, NULL, NULL},
- {"total-matched", NULL, FALSE, TRUE, NULL, NULL},
- {"total-estimate", NULL, FALSE, TRUE, NULL, NULL},
- {"url", NULL, FALSE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, false, true, NULL, NULL},
+ {"result-time", NULL, false, true, NULL, NULL},
+ {"total-matched", NULL, false, true, NULL, NULL},
+ {"total-estimate", NULL, false, true, NULL, NULL},
+ {"url", NULL, false, true, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
@@ -383,13 +383,13 @@ xmpp_gtalk_mail_mail_info(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, x
proto_tree *mail_info_tree;
xmpp_attr_info attrs_info [] = {
- {"tid", NULL, FALSE, FALSE, NULL, NULL},
- {"participation", NULL, FALSE, FALSE, NULL, NULL},
- {"messages", NULL, FALSE, TRUE, NULL, NULL},
- {"date", NULL, FALSE, TRUE, NULL, NULL},
- {"url", NULL, FALSE, FALSE, NULL, NULL},
- {"labels", NULL, FALSE, FALSE, NULL, NULL},
- {"subject", NULL, FALSE, TRUE, NULL, NULL}
+ {"tid", NULL, false, false, NULL, NULL},
+ {"participation", NULL, false, false, NULL, NULL},
+ {"messages", NULL, false, true, NULL, NULL},
+ {"date", NULL, false, true, NULL, NULL},
+ {"url", NULL, false, false, NULL, NULL},
+ {"labels", NULL, false, false, NULL, NULL},
+ {"subject", NULL, false, true, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
@@ -404,12 +404,12 @@ xmpp_gtalk_mail_mail_info(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, x
if((labels = xmpp_steal_element_by_name(element,"labels"))!=NULL)
{
xmpp_attr_t *fake_labels = xmpp_ep_init_attr_t(pinfo->pool, labels->data?labels->data->value:"",labels->offset, labels->length);
- g_hash_table_insert(element->attrs, (gpointer)"labels", fake_labels);
+ g_hash_table_insert(element->attrs, (void *)"labels", fake_labels);
}
if((subject = xmpp_steal_element_by_name(element,"subject"))!=NULL)
{
xmpp_attr_t *fake_subject = xmpp_ep_init_attr_t(pinfo->pool, subject->data?subject->data->value:"",subject->offset, subject->length);
- g_hash_table_insert(element->attrs, (gpointer)"subject", fake_subject);
+ g_hash_table_insert(element->attrs, (void *)"subject", fake_subject);
}
xmpp_display_attrs(mail_info_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
@@ -438,10 +438,10 @@ xmpp_gtalk_mail_sender(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp
proto_tree *sender_tree;
xmpp_attr_info attrs_info [] = {
- {"name", NULL, FALSE, TRUE, NULL, NULL},
- {"address", NULL, FALSE, TRUE, NULL, NULL},
- {"originator", NULL, FALSE, TRUE, NULL, NULL},
- {"unread", NULL, FALSE, TRUE, NULL, NULL}
+ {"name", NULL, false, true, NULL, NULL},
+ {"address", NULL, false, true, NULL, NULL},
+ {"originator", NULL, false, true, NULL, NULL},
+ {"unread", NULL, false, true, NULL, NULL}
};
sender_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_mail_sender, NULL, "SENDER");
@@ -474,15 +474,15 @@ xmpp_gtalk_status_query(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmp
proto_tree *query_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
- {"version", NULL, FALSE, TRUE, NULL, NULL},
- {"status-max", NULL, FALSE, FALSE, NULL, NULL},
- {"status-list-max", NULL, FALSE, FALSE, NULL, NULL},
- {"status-list-contents-max", NULL, FALSE, FALSE, NULL, NULL},
- {"status-min-ver", NULL, FALSE, TRUE, NULL, NULL},
- {"show", NULL, FALSE, TRUE, NULL, NULL},
- {"status", NULL, FALSE, TRUE, NULL, NULL},
- {"invisible", NULL, FALSE, TRUE, NULL, NULL},
+ {"xmlns", &hf_xmpp_xmlns, true, true, NULL, NULL},
+ {"version", NULL, false, true, NULL, NULL},
+ {"status-max", NULL, false, false, NULL, NULL},
+ {"status-list-max", NULL, false, false, NULL, NULL},
+ {"status-list-contents-max", NULL, false, false, NULL, NULL},
+ {"status-min-ver", NULL, false, true, NULL, NULL},
+ {"show", NULL, false, true, NULL, NULL},
+ {"status", NULL, false, true, NULL, NULL},
+ {"invisible", NULL, false, true, NULL, NULL},
};
xmpp_elem_info elems_info [] = {
@@ -500,20 +500,20 @@ xmpp_gtalk_status_query(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmp
if((status = xmpp_steal_element_by_name(element,"status"))!=NULL)
{
xmpp_attr_t *fake_status = xmpp_ep_init_attr_t(pinfo->pool, status->data?status->data->value:"",status->offset, status->length);
- g_hash_table_insert(element->attrs, (gpointer)"status", fake_status);
+ g_hash_table_insert(element->attrs, (void *)"status", fake_status);
}
if((show = xmpp_steal_element_by_name(element,"show"))!=NULL)
{
xmpp_attr_t *fake_show = xmpp_ep_init_attr_t(pinfo->pool, show->data?show->data->value:"",show->offset, show->length);
- g_hash_table_insert(element->attrs, (gpointer)"show", fake_show);
+ g_hash_table_insert(element->attrs, (void *)"show", fake_show);
}
if((invisible = xmpp_steal_element_by_name(element,"invisible"))!=NULL)
{
xmpp_attr_t *value = xmpp_get_attr(invisible, "value");
xmpp_attr_t *fake_invisible = xmpp_ep_init_attr_t(pinfo->pool, value?value->value:"",invisible->offset, invisible->length);
- g_hash_table_insert(element->attrs, (gpointer)"invisible", fake_invisible);
+ g_hash_table_insert(element->attrs, (void *)"invisible", fake_invisible);
}
xmpp_display_attrs(query_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
@@ -526,7 +526,7 @@ xmpp_gtalk_status_status_list(proto_tree* tree, tvbuff_t* tvb, packet_info* pinf
proto_tree *list_tree;
xmpp_attr_info attrs_info [] = {
- {"show", NULL, TRUE, TRUE, NULL, NULL}
+ {"show", NULL, true, true, NULL, NULL}
};
xmpp_element_t *status;
@@ -550,7 +550,7 @@ xmpp_gtalk_transport_p2p(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xm
proto_tree *trans_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, FALSE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, false, true, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
@@ -570,18 +570,18 @@ xmpp_gtalk_transport_p2p_cand(proto_tree* tree, tvbuff_t* tvb, packet_info* pinf
proto_tree *cand_tree;
xmpp_attr_info attrs_info[] = {
- {"xmlns", &hf_xmpp_xmlns, FALSE, FALSE, NULL, NULL},
- {"name", NULL, FALSE, TRUE, NULL, NULL},
- {"generation", NULL, FALSE, FALSE, NULL, NULL},
- {"network", NULL, FALSE, FALSE, NULL, NULL},
- {"component", NULL, FALSE, FALSE, NULL, NULL},
- {"type", NULL, FALSE, FALSE, NULL, NULL},
- {"protocol", NULL, FALSE, TRUE, NULL, NULL},
- {"preference", NULL, FALSE, FALSE, NULL, NULL},
- {"password", NULL, FALSE, FALSE, NULL, NULL},
- {"username", NULL, FALSE, FALSE, NULL, NULL},
- {"port", NULL, FALSE, TRUE, NULL, NULL},
- {"address", NULL, FALSE, TRUE, NULL, NULL}
+ {"xmlns", &hf_xmpp_xmlns, false, false, NULL, NULL},
+ {"name", NULL, false, true, NULL, NULL},
+ {"generation", NULL, false, false, NULL, NULL},
+ {"network", NULL, false, false, NULL, NULL},
+ {"component", NULL, false, false, NULL, NULL},
+ {"type", NULL, false, false, NULL, NULL},
+ {"protocol", NULL, false, true, NULL, NULL},
+ {"preference", NULL, false, false, NULL, NULL},
+ {"password", NULL, false, false, NULL, NULL},
+ {"username", NULL, false, false, NULL, NULL},
+ {"port", NULL, false, true, NULL, NULL},
+ {"address", NULL, false, true, NULL, NULL}
};
cand_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_transport_p2p_cand, NULL, "CANDIDATE");