本文整理汇总了C++中xmpp_display_attrs函数的典型用法代码示例。如果您正苦于以下问题:C++ xmpp_display_attrs函数的具体用法?C++ xmpp_display_attrs怎么用?C++ xmpp_display_attrs使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xmpp_display_attrs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xmpp_gtalk_mail_senders
static void
xmpp_gtalk_mail_senders(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_tree *senders_tree;
xmpp_elem_info elems_info [] = {
{NAME, "sender", xmpp_gtalk_mail_sender, MANY}
};
senders_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_mail_senders, NULL, "SENDERS");
xmpp_display_attrs(senders_tree, element, pinfo, tvb, NULL, 0);
xmpp_display_elems(senders_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
示例2: xmpp_gtalk_jingleinfo_server
static void
xmpp_gtalk_jingleinfo_server(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_tree *serv_tree;
xmpp_attr_info attrs_info[] = {
{"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");
xmpp_display_attrs(serv_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(serv_tree, element, pinfo, tvb, NULL, 0);
}
示例3: xmpp_gtalk_jingleinfo_stun
static void
xmpp_gtalk_jingleinfo_stun(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_tree *stun_tree;
xmpp_elem_info elems_info [] = {
{NAME, "server", xmpp_gtalk_jingleinfo_server, MANY},
};
stun_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_jingleinfo_stun, NULL, "STUN");
xmpp_display_attrs(stun_tree, element, pinfo, tvb, NULL, 0);
xmpp_display_elems(stun_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
示例4: xmpp_bytestreams_query
void
xmpp_bytestreams_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
proto_item *query_item;
proto_tree *query_tree;
static const gchar *mode_enums[] = {"tcp", "udp"};
xmpp_array_t *mode_array = xmpp_ep_init_array_t(mode_enums, array_length(mode_enums));
xmpp_attr_info attrs_info[] = {
{"xmlns", hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
{"sid", -1, FALSE, TRUE, NULL, NULL},
{"mode", -1, FALSE, TRUE, xmpp_val_enum_list, mode_array},
{"dstaddr", -1, FALSE, TRUE, NULL, NULL}
};
xmpp_element_t *streamhost, *streamhost_used, *activate, *udpsuccess;
col_append_fstr(pinfo->cinfo, COL_INFO, "QUERY(bytestreams) ");
query_item = proto_tree_add_item(tree, hf_xmpp_query, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
query_tree = proto_item_add_subtree(query_item, ett_xmpp_query);
xmpp_display_attrs(query_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
while((streamhost = xmpp_steal_element_by_name(element, "streamhost")) != NULL)
{
xmpp_bytestreams_streamhost(query_tree, tvb, pinfo, streamhost);
}
if((streamhost_used = xmpp_steal_element_by_name(element, "streamhost-used")) != NULL)
{
xmpp_bytestreams_streamhost_used(query_tree, tvb, pinfo, streamhost_used);
}
if((activate = xmpp_steal_element_by_name(element, "activate")) != NULL)
{
xmpp_bytestreams_activate(query_tree, tvb, pinfo, activate);
}
if((udpsuccess = xmpp_steal_element_by_name(element, "udpsuccess")) != NULL)
{
xmpp_bytestreams_udpsuccess(query_tree, tvb, pinfo, udpsuccess);
}
xmpp_unknown(query_tree, tvb, pinfo, element);
}
示例5: xmpp_jingle_file_transfer_checksum
static void
xmpp_jingle_file_transfer_checksum(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_item *checksum_item;
proto_tree *checksum_tree;
xmpp_elem_info elems_info[] = {
{NAME, "file", xmpp_jingle_file_transfer_file, MANY},
};
checksum_item = proto_tree_add_item(tree, hf_xmpp_jingle_file_transfer_checksum, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
checksum_tree = proto_item_add_subtree(checksum_item, ett_xmpp_jingle_file_transfer_checksum);
xmpp_display_attrs(checksum_tree, element, pinfo, tvb, NULL, 0);
xmpp_display_elems(checksum_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
示例6: xmpp_error
static void
xmpp_error(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
proto_item *error_item;
proto_tree *error_tree;
xmpp_element_t *text_element, *cond_element;
xmpp_attr_info attrs_info[] = {
{"type", &hf_xmpp_error_type, TRUE, TRUE, NULL, NULL},
{"code", &hf_xmpp_error_code, FALSE, TRUE, NULL, NULL},
{"condition", &hf_xmpp_error_condition, TRUE, TRUE, NULL, NULL} /*TODO: validate list to the condition element*/
};
gchar *error_info;
xmpp_attr_t *fake_condition = NULL;
error_info = wmem_strdup(wmem_packet_scope(), "Stanza error");
error_item = proto_tree_add_item(tree, hf_xmpp_error, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
error_tree = proto_item_add_subtree(error_item, ett_xmpp_query_item);
cond_element = xmpp_steal_element_by_attr(element, "xmlns", "urn:ietf:params:xml:ns:xmpp-stanzas");
if(cond_element)
{
fake_condition = xmpp_ep_init_attr_t(cond_element->name, cond_element->offset, cond_element->length);
g_hash_table_insert(element->attrs, (gpointer)"condition", fake_condition);
error_info = wmem_strdup_printf(wmem_packet_scope(), "%s: %s;", error_info, cond_element->name);
}
xmpp_display_attrs(error_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
while((text_element = xmpp_steal_element_by_name(element, "text")) != NULL)
{
xmpp_error_text(error_tree, tvb, text_element);
error_info = wmem_strdup_printf(wmem_packet_scope(), "%s Text: %s", error_info, text_element->data?text_element->data->value:"");
}
expert_add_info_format(pinfo, error_item, &ei_xmpp_response, "%s", error_info);
xmpp_unknown(error_tree, tvb, pinfo, element);
}
示例7: xmpp_jinglenodes_relay_stun_tracker
static void
xmpp_jinglenodes_relay_stun_tracker(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
proto_tree *relay_tree;
xmpp_attr_info attrs_info[] = {
{"address", NULL, TRUE, TRUE, NULL, NULL},
{"port", NULL, FALSE, TRUE, NULL, NULL},
{"policy", NULL, TRUE, TRUE, NULL, NULL},
{"protocol", NULL, TRUE, TRUE, NULL, NULL},
};
relay_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_services_relay, NULL, element->name);
xmpp_display_attrs(relay_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(relay_tree, element, pinfo, tvb, NULL, 0);
}
示例8: xmpp_si_file_range
static void
xmpp_si_file_range(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_tree *range_tree;
xmpp_attr_info attrs_info[] = {
{"offset", NULL, FALSE, TRUE, NULL, NULL},
{"length", NULL, FALSE, TRUE, NULL, NULL}
};
range_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_si_file_range, NULL, "RANGE: ");
xmpp_display_attrs(range_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_unknown(range_tree, tvb, pinfo, element);
}
示例9: xmpp_bytestreams_streamhost_used
static void
xmpp_bytestreams_streamhost_used(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
proto_item *shu_item;
proto_tree *shu_tree;
xmpp_attr_info attrs_info[] = {
{"jid", -1, TRUE, TRUE, NULL, NULL}
};
shu_item = proto_tree_add_item(tree, hf_xmpp_query_streamhost_used, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
shu_tree = proto_item_add_subtree(shu_item, ett_xmpp_query_streamhost_used);
xmpp_display_attrs(shu_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_unknown(shu_tree, tvb, pinfo, element);
}
示例10: xmpp_bytestreams_udpsuccess
static void
xmpp_bytestreams_udpsuccess(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
proto_item *udps_item;
proto_tree *udps_tree;
xmpp_attr_info attrs_info[] = {
{"dstaddr", -1, TRUE, TRUE, NULL, NULL}
};
udps_item = proto_tree_add_item(tree, hf_xmpp_query_udpsuccess, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
udps_tree =proto_item_add_subtree(udps_item, ett_xmpp_query_udpsuccess);
xmpp_display_attrs(udps_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_unknown(udps_tree, tvb, pinfo, element);
}
示例11: xmpp_gtalk_mail_sender
static void
xmpp_gtalk_mail_sender(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
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}
};
sender_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_mail_sender, NULL, "SENDER");
xmpp_display_attrs(sender_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(sender_tree, element, pinfo, tvb, NULL, 0);
}
示例12: xmpp_gtalk_nosave_item
static void
xmpp_gtalk_nosave_item(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_tree *item_tree;
xmpp_attr_info attrs_info[] = {
{"xmlns", &hf_xmpp_xmlns, TRUE, FALSE, NULL,NULL},
{"jid", NULL, TRUE, TRUE, NULL, NULL},
{"source", NULL, FALSE, TRUE, NULL, NULL},
{"value", NULL, TRUE, TRUE, NULL, NULL}
};
item_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_query_item, NULL, "ITEM");
xmpp_display_attrs(item_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(item_tree, element, pinfo, tvb, NULL, 0);
}
示例13: xmpp_jingle_cont_desc_rtp_enc
static void
xmpp_jingle_cont_desc_rtp_enc(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo, xmpp_element_t* element)
{
proto_item *enc_item;
proto_tree *enc_tree;
xmpp_elem_info elems_info [] = {
{NAME, "zrtp-hash", xmpp_jingle_cont_desc_rtp_enc_zrtp_hash, MANY},
{NAME, "crypto", xmpp_jingle_cont_desc_rtp_enc_crypto, MANY}
};
enc_item = proto_tree_add_item(tree, hf_xmpp_jingle_cont_desc_enc, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
enc_tree = proto_item_add_subtree(enc_item, ett_xmpp_jingle_cont_desc_enc);
xmpp_display_attrs(enc_tree, element, pinfo, tvb, NULL, 0);
xmpp_display_elems(enc_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
示例14: xmpp_gtalk_nosave_x
void
xmpp_gtalk_nosave_x(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_item *x_item;
proto_tree *x_tree;
xmpp_attr_info attrs_info [] = {
{"xmlns", hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
{"value", -1, FALSE, TRUE, NULL, NULL}
};
x_item = proto_tree_add_item(tree, hf_xmpp_gtalk_nosave_x, tvb, element->offset, element->length,
ENC_BIG_ENDIAN);
x_tree = proto_item_add_subtree(x_item, ett_xmpp_gtalk_nosave_x);
xmpp_display_attrs(x_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(x_tree, element, pinfo, tvb, NULL, 0);
}
示例15: xmpp_session
void
xmpp_session(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
proto_item *session_item;
proto_tree *session_tree;
xmpp_attr_info attrs_info [] = {
{"xmlns", hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL}
};
session_item = proto_tree_add_item(tree, hf_xmpp_iq_session, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
session_tree = proto_item_add_subtree(session_item, ett_xmpp_iq_session);
col_append_fstr(pinfo->cinfo, COL_INFO, "SESSION ");
xmpp_display_attrs(session_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(session_tree, element, pinfo, tvb, NULL, 0);
}