Esempio n. 1
0
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));
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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));

}
Esempio n. 4
0
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);
}
Esempio n. 5
0
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));
}
Esempio n. 6
0
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);
}
Esempio n. 7
0
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);
}
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);

}
Esempio n. 9
0
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);
}
Esempio n. 10
0
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);
}
Esempio n. 11
0
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);
}
Esempio n. 12
0
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);
}
Esempio n. 13
0
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));
}
Esempio n. 14
0
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);
}
Esempio n. 15
0
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);
}
static void
xmpp_conf_users(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
    proto_tree *users_tree;

    xmpp_attr_info attrs_info [] = {
        {"state", NULL, FALSE, TRUE, NULL, NULL}
    };

    xmpp_elem_info elems_info [] = {
        {NAME, "user", xmpp_conf_user, MANY}
    };

    users_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_conf_users, NULL, "USERS");

    xmpp_display_attrs(users_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(users_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
void
xmpp_conferece_info_advert(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
    proto_item *cinfo_item;
    proto_tree *cinfo_tree;

    xmpp_attr_info attrs_info [] = {
        {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
        {"isfocus", NULL, TRUE, TRUE, NULL, NULL}
    };

    cinfo_item = proto_tree_add_item(tree, hf_xmpp_conf_info, tvb, element->offset, element->length,
        ENC_BIG_ENDIAN);
    cinfo_tree = proto_item_add_subtree(cinfo_item, ett_xmpp_conf_info);

    xmpp_display_attrs(cinfo_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(cinfo_tree, element, pinfo, tvb, NULL, 0);
}
Esempio n. 18
0
/*XEP-0261: Jingle In-Band Bytestreams Transport Method urn:xmpp:jingle:transports:ibb:1*/
static void
xmpp_jingle_cont_trans_ibb(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element) {
    proto_item *trans_item;
    proto_tree *trans_tree;

    xmpp_attr_info attrs_info[] = {
        {"xmlns", hf_xmpp_xmlns, FALSE, TRUE, NULL, NULL},
        {"block-size", -1, TRUE, TRUE, NULL, NULL},
        {"sid", -1, TRUE, TRUE, NULL, NULL},
        {"stanza", -1, FALSE, TRUE, NULL, NULL}
    };

    trans_item = proto_tree_add_item(tree, hf_xmpp_jingle_cont_trans, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    trans_tree = proto_item_add_subtree(trans_item, ett_xmpp_jingle_cont_trans);

    xmpp_display_attrs(trans_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(trans_tree, element, pinfo, tvb, NULL, 0);
}
Esempio n. 19
0
static void
xmpp_gtalk_session_desc(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
    proto_tree *desc_tree;

    xmpp_attr_info attrs_info[] = {
        {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL},
        {"xml:lang", NULL, FALSE, FALSE, NULL, NULL}
    };

    xmpp_elem_info elems_info[] = {
        {NAME, "payload-type", xmpp_gtalk_session_desc_payload, MANY}
    };

    desc_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_session_desc, NULL, "DESCRIPTION");

    xmpp_display_attrs(desc_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(desc_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
Esempio n. 20
0
static void
xmpp_gtalk_jingleinfo_relay_serv(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
    proto_item *serv_item;
    proto_tree *serv_tree;

    xmpp_attr_info attrs_info[] = {
        {"host", -1, TRUE, TRUE, NULL, NULL},
        {"udp", -1, FALSE, TRUE, NULL, NULL},
        {"tcp", -1, FALSE, TRUE, NULL, NULL},
        {"tcpssl", -1, FALSE, TRUE, NULL, NULL}
    };

    serv_item = proto_tree_add_text(tree, tvb, element->offset, element->length, "SERVER");
    serv_tree = proto_item_add_subtree(serv_item, ett_xmpp_gtalk_jingleinfo_relay_serv);

    xmpp_display_attrs(serv_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(serv_tree, element, pinfo, tvb, NULL, 0);
}
Esempio n. 21
0
static void
xmpp_disco_items_item(proto_tree *tree, tvbuff_t *tvb, packet_info* pinfo, xmpp_element_t *element)
{
    proto_item *item_item;
    proto_tree *item_tree;

    xmpp_attr_info attrs_info[] = {
        {"jid", hf_xmpp_query_item_jid, TRUE, TRUE, NULL, NULL},
        {"name", hf_xmpp_query_item_name, FALSE, TRUE, NULL, NULL},
        {"node", hf_xmpp_query_item_node, FALSE, TRUE, NULL, NULL}
    };

    item_item = proto_tree_add_item(tree, hf_xmpp_query_item, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    item_tree = proto_item_add_subtree(item_item, ett_xmpp_query_item);

    xmpp_display_attrs(item_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));

    xmpp_unknown(item_tree, tvb, pinfo, element);
}
Esempio n. 22
0
/*XEP-0166: Jingle urn:xmpp:jingle:1*/
void
xmpp_jingle(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
    proto_item *jingle_item;
    proto_tree *jingle_tree;

    const gchar *rtp_info_msgs[] = {"active", "hold", "mute", "ringing", "unhold", "unmute"};

    const gchar *action_enums[] = {"content-accept","content-add", "content-modify",
        "content-modify", "content-remove", "description-info", "security-info",
        "session-accept", "session-info", "session-initiate", "session-terminate",
        "transport-accept", "transport-info", "transport-reject", "transport-replace"
    };

    xmpp_array_t *action_array = xmpp_ep_init_array_t(action_enums,array_length(action_enums));
    xmpp_array_t *rtp_info_array = xmpp_ep_init_array_t(rtp_info_msgs, array_length(rtp_info_msgs));

    xmpp_attr_info attrs_info[] = {
        {"xmlns", hf_xmpp_xmlns, TRUE, FALSE, NULL, NULL},
        {"action", hf_xmpp_jingle_action, TRUE, TRUE, xmpp_val_enum_list, action_array},
        {"sid", hf_xmpp_jingle_sid, TRUE, FALSE, NULL, NULL},
        {"initiator", hf_xmpp_jingle_initiator, FALSE, FALSE, NULL, NULL},
        {"responder", hf_xmpp_jingle_responder, FALSE, FALSE, NULL, NULL}
    };

    xmpp_elem_info elems_info [] = {
        {NAME, "content", xmpp_jingle_content, MANY},
        {NAME, "reason", xmpp_jingle_reason, MANY},
        {NAMES, rtp_info_array, xmpp_jingle_rtp_info, ONE},
        {NAME, "conference-info", xmpp_conferece_info_advert, ONE}
    };

     xmpp_attr_t *action = xmpp_get_attr(element,"action");
     col_append_fstr(pinfo->cinfo, COL_INFO, "JINGLE(%s) ", action?action->value:"");


    jingle_item = proto_tree_add_item(tree, hf_xmpp_jingle, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    jingle_tree = proto_item_add_subtree(jingle_item, ett_xmpp_jingle);

    xmpp_display_attrs(jingle_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));

    xmpp_display_elems(jingle_item, element, pinfo, tvb, elems_info, array_length(elems_info));
}
Esempio n. 23
0
static void
xmpp_jingle_cont_trans_ice_remote_candidate(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
    proto_item *remote_cand_item;
    proto_tree *remote_cand_tree;

    xmpp_attr_info attrs_info[] = {
        {"component", -1, TRUE, FALSE, NULL, NULL},
        {"ip", -1, TRUE, FALSE, NULL, NULL},
        {"port", -1, TRUE, FALSE, NULL, NULL}
    };

    remote_cand_item = proto_tree_add_item(tree, hf_xmpp_jingle_cont_trans_rem_cand, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    remote_cand_tree = proto_item_add_subtree(remote_cand_item, ett_xmpp_jingle_cont_trans_rem_cand);

    xmpp_display_attrs(remote_cand_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));

    xmpp_unknown(remote_cand_tree, tvb, pinfo, element);
}
Esempio n. 24
0
static void
xmpp_disco_info_identity(proto_tree *tree, tvbuff_t *tvb, packet_info* pinfo, xmpp_element_t *element)
{
    proto_item *identity_item;
    proto_tree *identity_tree;

    xmpp_attr_info attrs_info[] = {
        {"category", hf_xmpp_query_identity_category, TRUE, TRUE, NULL, NULL},
        {"name", hf_xmpp_query_identity_name, FALSE, TRUE, NULL, NULL},
        {"type", hf_xmpp_query_identity_type, TRUE, TRUE, NULL, NULL}
    };

    identity_item = proto_tree_add_item(tree, hf_xmpp_query_identity, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    identity_tree = proto_item_add_subtree(identity_item, ett_xmpp_query_identity);

    xmpp_display_attrs(identity_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));

    xmpp_unknown(identity_tree, tvb, pinfo, element);

}
Esempio n. 25
0
/*XEP-0177: Jingle Raw UDP Transport Method urn:xmpp:jingle:transports:raw-udp:1*/
static void
xmpp_jingle_cont_trans_raw(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element)
{
    proto_item *trans_item;
    proto_tree *trans_tree;

    xmpp_attr_info attrs_info[] = {
        {"xmlns", hf_xmpp_xmlns, FALSE, TRUE, NULL, NULL}
    };

    xmpp_elem_info elems_info [] = {
        {NAME, "candidate", xmpp_jingle_cont_trans_raw_candidate, MANY}
    };

    trans_item = proto_tree_add_item(tree, hf_xmpp_jingle_cont_trans, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    trans_tree = proto_item_add_subtree(trans_item, ett_xmpp_jingle_cont_trans);

    xmpp_display_attrs(trans_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(trans_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
Esempio n. 26
0
static void
xmpp_jingle_cont_desc_rtp_payload_param(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo, xmpp_element_t* element)
{
    proto_item *param_item;
    proto_tree *param_tree;

    proto_item *parent_item;
    xmpp_attr_t *name, *value;

    xmpp_attr_info attrs_info[] = {
        {"xmlns", hf_xmpp_xmlns, FALSE, FALSE, NULL, NULL},
        {"name", hf_xmpp_jingle_cont_desc_payload_param_name, TRUE, TRUE, NULL, NULL},
        {"value", hf_xmpp_jingle_cont_desc_payload_param_value, TRUE, TRUE, NULL, NULL}
    };

    name = xmpp_get_attr(element, "name");
    value = xmpp_get_attr(element, "value");

    if(name && value)
    {
        gchar *parent_item_label;

        parent_item = proto_tree_get_parent(tree);

        parent_item_label = proto_item_get_text(parent_item);

        if(parent_item_label)
        {
            parent_item_label[strlen(parent_item_label)-1]= '\0';
            proto_item_set_text(parent_item, "%s param(\"%s\")=%s]", parent_item_label ,name->value, value->value);
        }
    }

    param_item = proto_tree_add_item(tree, hf_xmpp_jingle_cont_desc_payload_param, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    param_tree = proto_item_add_subtree(param_item, ett_xmpp_jingle_cont_desc_payload_param);

    xmpp_display_attrs(param_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));

    xmpp_unknown(param_tree, tvb, pinfo, element);

}
Esempio n. 27
0
static void
xmpp_jingle_cont_desc_rtp_enc_crypto(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo, xmpp_element_t* element)
{
    proto_item *crypto_item;
    proto_tree *crypto_tree;

     xmpp_attr_info attrs_info[] = {
        {"crypto-suite", -1, TRUE, TRUE, NULL, NULL},
        {"key-params", -1, TRUE, FALSE,NULL,NULL},
        {"session-params", -1, FALSE, TRUE, NULL, NULL},
        {"tag", -1, TRUE, FALSE, NULL, NULL}
    };

    crypto_item = proto_tree_add_item(tree, hf_xmpp_jingle_cont_desc_enc_crypto, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    crypto_tree = proto_item_add_subtree(crypto_item, ett_xmpp_jingle_cont_desc_enc_crypto);


    xmpp_display_attrs(crypto_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));

    xmpp_unknown(crypto_tree, tvb, pinfo, element);
}
Esempio n. 28
0
static void
xmpp_gtalk_status_status_list(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
    proto_tree *list_tree;

    xmpp_attr_info attrs_info [] = {
        {"show", NULL, TRUE, TRUE, NULL, NULL}
    };

    xmpp_element_t *status;

    list_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_status_status_list, NULL, "STATUS LIST");

    while((status = xmpp_steal_element_by_name(element, "status"))!=NULL)
    {
        proto_tree_add_text(list_tree, tvb, status->offset, status->length, "STATUS: %s",status->data?status->data->value:"");
    }

    xmpp_display_attrs(list_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(list_tree, element, pinfo, tvb, NULL, 0);
}
Esempio n. 29
0
void
xmpp_challenge_response_success(proto_tree *tree, tvbuff_t *tvb,
    packet_info *pinfo, xmpp_element_t *packet, expert_field* ei, gint ett,  const char *col_info)
{
    proto_item *item;
    proto_tree *subtree;

    xmpp_attr_info attrs_info[] = {
        {"xmlns", &hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL}
    };

    col_set_str(pinfo->cinfo, COL_INFO, col_info);

    item = proto_tree_add_expert(tree, pinfo, ei, tvb, packet->offset, packet->length);
    subtree = proto_item_add_subtree(item, ett);

    xmpp_display_attrs(subtree, packet, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_cdata(subtree, tvb, packet, -1);

    xmpp_unknown(subtree, tvb, pinfo, packet);
}
Esempio n. 30
0
/*XEP-0234: Jingle File Transfer urn:xmpp:jingle:apps:file-transfer:3*/
static void
xmpp_jingle_file_transfer_desc(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
    proto_item *desc_item;
    proto_tree *desc_tree;

    xmpp_attr_info attrs_info[] = {
        {"xmlns", hf_xmpp_xmlns, TRUE, TRUE, NULL, NULL}
    };

    xmpp_elem_info elems_info[] = {
        {NAME, "offer", xmpp_jingle_file_transfer_offer, ONE},
        {NAME, "request", xmpp_jingle_file_transfer_request, ONE}
    };

    desc_item = proto_tree_add_item(tree, hf_xmpp_jingle_content_description, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
    desc_tree = proto_item_add_subtree(desc_item, ett_xmpp_jingle_content_description);

    xmpp_display_attrs(desc_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
    xmpp_display_elems(desc_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}