本文整理汇总了C++中proto_tree_add_subtree函数的典型用法代码示例。如果您正苦于以下问题:C++ proto_tree_add_subtree函数的具体用法?C++ proto_tree_add_subtree怎么用?C++ proto_tree_add_subtree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了proto_tree_add_subtree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dissect_path_data_tlv
static void
dissect_path_data_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)
{
proto_item *ti, *flag_item;
guint length_TLV, IDcount, i;
guint16 type, flag;
proto_tree *tlv_tree, *path_data_tree, *flag_tree;
while (tvb_reported_length_remaining(tvb, offset) >= TLV_TL_LENGTH)
{
tlv_tree = proto_tree_add_subtree(tree, tvb, offset, TLV_TL_LENGTH, ett_forces_path_data_tlv, &ti, "TLV");
type = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tlv_tree, hf_forces_lfbselect_tlv_type_operation_path_type,
tvb, offset, 2, ENC_BIG_ENDIAN);
length_TLV = tvb_get_ntohs(tvb, offset+2);
proto_tree_add_item(tlv_tree, hf_forces_lfbselect_tlv_type_operation_path_length,
tvb, offset+2, 2, ENC_BIG_ENDIAN);
if (length_TLV < TLV_TL_LENGTH)
{
expert_add_info_format(pinfo, ti, &ei_forces_lfbselect_tlv_type_operation_path_length, "Bogus TLV length: %u", length_TLV);
break;
}
proto_item_set_len(ti, length_TLV);
if (type == PATH_DATA_TLV)
{
path_data_tree = proto_tree_add_subtree(tree, tvb, offset+TLV_TL_LENGTH, length_TLV-TLV_TL_LENGTH,
ett_forces_path_data_tlv, NULL, "Path Data TLV");
flag = tvb_get_ntohs(tvb, offset+TLV_TL_LENGTH);
flag_item = proto_tree_add_item(path_data_tree, hf_forces_lfbselect_tlv_type_operation_path_flags,
tvb, offset+TLV_TL_LENGTH, 2, ENC_BIG_ENDIAN);
flag_tree = proto_item_add_subtree(flag_item, ett_forces_path_data_tlv_flags);
proto_tree_add_item(flag_tree, hf_forces_lfbselect_tlv_type_operation_path_flags_selector,
tvb, offset+TLV_TL_LENGTH, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_forces_lfbselect_tlv_type_operation_path_flags_reserved,
tvb, offset+TLV_TL_LENGTH, 2, ENC_BIG_ENDIAN);
IDcount = tvb_get_ntohs(tvb, offset + TLV_TL_LENGTH + 2);
proto_tree_add_item(path_data_tree, hf_forces_lfbselect_tlv_type_operation_path_IDcount,
tvb, offset+TLV_TL_LENGTH+2, 2, ENC_BIG_ENDIAN);
for (i = 0; i < IDcount; i++)
proto_tree_add_item(path_data_tree, hf_forces_lfbselect_tlv_type_operation_path_IDs,
tvb, offset+TLV_TL_LENGTH+2+(i*4), 4, ENC_BIG_ENDIAN);
}
else
{
flag = 0;
proto_tree_add_item(tree, hf_forces_lfbselect_tlv_type_operation_path_data,
tvb, offset+TLV_TL_LENGTH, length_TLV-TLV_TL_LENGTH, ENC_NA);
}
if ((flag & FLAG_SELECTOR) == 0)
break;
offset += length_TLV;
}
}
开发者ID:acaceres2176,项目名称:wireshark,代码行数:60,代码来源:packet-forces.c
示例2: dissect_aodv_rerr
static void
dissect_aodv_rerr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
gboolean is_ipv6)
{
int offset = 1;
proto_item *tj;
proto_tree *aodv_flags_tree;
proto_tree *aodv_unreach_dest_tree;
guint8 flags;
guint8 dest_count;
int i;
flags = tvb_get_guint8(tvb, offset);
if (aodv_tree) {
aodv_flags_tree = proto_tree_add_subtree(aodv_tree, tvb, offset, 1, ett_aodv_flags, &tj, "Flags:");
proto_tree_add_boolean(aodv_flags_tree, hf_aodv_flags_rerr_nodelete,
tvb, offset, 1, flags);
if (flags & RERR_NODEL)
proto_item_append_text(tj, " N");
}
offset += 2; /* skip reserved byte */
dest_count = tvb_get_guint8(tvb, offset);
if (aodv_tree)
proto_tree_add_uint(aodv_tree, hf_aodv_destcount, tvb, offset, 1,
dest_count);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Dest Count=%u",
dest_count);
offset += 1;
if (is_ipv6) {
aodv_unreach_dest_tree = proto_tree_add_subtree(aodv_tree, tvb, offset,
(INET6_ADDRLEN + 4)*dest_count, ett_aodv_unreach_dest, NULL,
"Unreachable Destinations");
for (i = 0; i < dest_count; i++) {
proto_tree_add_item(aodv_unreach_dest_tree,
hf_aodv_unreach_dest_ipv6,
tvb, offset, INET6_ADDRLEN, ENC_NA);
offset += INET6_ADDRLEN;
proto_tree_add_item(aodv_unreach_dest_tree, hf_aodv_dest_seqno,
tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
} else {
aodv_unreach_dest_tree = proto_tree_add_subtree(aodv_tree, tvb, offset, (4 + 4)*dest_count,
ett_aodv_unreach_dest, NULL, "Unreachable Destinations");
for (i = 0; i < dest_count; i++) {
proto_tree_add_item(aodv_unreach_dest_tree, hf_aodv_unreach_dest_ip,
tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(aodv_unreach_dest_tree, hf_aodv_dest_seqno,
tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
}
}
开发者ID:Sherkyoung,项目名称:wireshark,代码行数:56,代码来源:packet-aodv.c
示例3: dissect_dsmcc_adaptation_header
static void
dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tvbuff_t *sub_tvb;
guint offset = 0;
proto_item *pi;
proto_tree *sub_tree;
guint8 type, tmp;
guint16 ca_len;
type = tvb_get_guint8(tvb, offset);
if (1 == type) {
sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dsmcc_adaptation_header, NULL, "Adaptation Header");
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
offset, 1, ENC_BIG_ENDIAN);
offset +=1;
tmp = tvb_get_guint8(tvb, offset);
pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_reserved, tvb,
offset, 1, ENC_BIG_ENDIAN);
if (0xff != tmp) {
expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value,
"Invalid value - should be 0xff");
}
offset +=1;
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_system_id, tvb,
offset, 2, ENC_BIG_ENDIAN);
offset += 2;
ca_len = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_length, tvb,
offset, 2, ENC_BIG_ENDIAN);
offset += 2;
sub_tvb = tvb_new_subset_length(tvb, offset, ca_len);
call_dissector(data_handle, sub_tvb, pinfo, tree);
} else if (2 == type) {
sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dsmcc_adaptation_header, NULL, "Adaptation Header");
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
offset, 1, ENC_BIG_ENDIAN);
offset +=1;
tmp = tvb_get_guint8(tvb, offset);
pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_user_id_reserved, tvb,
offset, 1, ENC_BIG_ENDIAN);
if (0xff != tmp) {
expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value,
"Invalid value - should be 0xff");
}
/*offset +=1;*/
/* TODO: handle the userId */
} else {
sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dsmcc_adaptation_header, NULL, "Unknown Adaptation Header");
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
offset, 1, ENC_BIG_ENDIAN);
}
}
开发者ID:danielwhite84,项目名称:wireshark,代码行数:54,代码来源:packet-mpeg-dsmcc.c
示例4: dissect_zbee_zdp_req_end_device_bind
/**
*ZigBee Device Profile dissector for the end device bind
*
*@param tvb pointer to buffer containing raw packet.
*@param pinfo pointer to packet information fields
*@param tree pointer to data tree Wireshark uses to display packet.
*/
void
dissect_zbee_zdp_req_end_device_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 version)
{
guint sizeof_cluster = (version >= ZBEE_VERSION_2007)?(int)sizeof(guint16):(int)sizeof(guint8);
guint i;
proto_tree *field_tree = NULL;
guint offset = 0;
guint32 target, in_count, out_count;
guint64 ext_addr = 0;
proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_target, tvb, offset, 2, ENC_LITTLE_ENDIAN, &target);
offset += 2;
if (version >= ZBEE_VERSION_2007) {
/* Extended address present on ZigBee 2006 & later. */
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (guint)sizeof(guint64), NULL);
}
proto_tree_add_item(tree, hf_zbee_zdp_endpoint, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_zbee_zdp_profile, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_in_count, tvb, offset, 2, ENC_LITTLE_ENDIAN, &in_count);
offset += 1;
if ((tree) && (in_count)) {
field_tree = proto_tree_add_subtree(tree, tvb, offset, (int)(in_count*sizeof_cluster),
ett_zbee_zdp_bind_end_in, NULL, "Input Cluster List");
}
for (i=0; i<in_count; i++) {
proto_tree_add_item(field_tree, hf_zbee_zdp_in_cluster, tvb, offset, sizeof_cluster, ENC_LITTLE_ENDIAN);
offset += sizeof_cluster;
}
proto_tree_add_item_ret_uint(tree, hf_zbee_zdp_out_count, tvb, offset, 2, ENC_LITTLE_ENDIAN, &out_count);
offset += 1;
if ((tree) && (out_count)) {
field_tree = proto_tree_add_subtree(tree, tvb, offset, (int)(out_count*sizeof_cluster),
ett_zbee_zdp_bind_end_out, NULL, "Output Cluster List");
}
for (i=0; i<out_count; i++) {
proto_tree_add_item(field_tree, hf_zbee_zdp_out_cluster, tvb, offset, sizeof_cluster, ENC_LITTLE_ENDIAN);
offset += sizeof_cluster;
}
if (version >= ZBEE_VERSION_2007) {
zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
}
zbee_append_info(tree, pinfo, ", Target: 0x%04x", target);
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
} /* dissect_zbee_zdp_req_end_device_bind */
开发者ID:wireshark,项目名称:wireshark,代码行数:57,代码来源:packet-zbee-zdp-binding.c
示例5: dissect_norm_cmd_cc
/* code to dissect NORM cmd(cc) packets */
static guint dissect_norm_cmd_cc(proto_tree *tree, packet_info *pinfo,
tvbuff_t *tvb, guint offset, guint8 hlen)
{
proto_tree_add_item(tree, hf_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1;
proto_tree_add_item(tree, hf_cc_sequence, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2;
proto_tree_add_item(tree, hf_cc_sts, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4;
proto_tree_add_item(tree, hf_cc_stus, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4;
if (offset < hdrlen2bytes(hlen)) {
offset = dissect_norm_hdrext(tree, pinfo, tvb, offset, hlen);
}
while (offset < hdrlen2bytes(hlen)) {
proto_item *tif;
proto_tree *cc_tree, *flag_tree;
double grtt;
cc_tree = proto_tree_add_subtree(tree, tvb, offset, 8, ett_congestioncontrol, NULL, "Congestion Control");
proto_tree_add_item(cc_tree, hf_cc_node_id, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4;
tif = proto_tree_add_item(cc_tree, hf_cc_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
flag_tree = proto_item_add_subtree(tif, ett_flags);
proto_tree_add_item(flag_tree, hf_cc_flags_clr, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_cc_flags_plr, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_cc_flags_rtt, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_cc_flags_start, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_cc_flags_leave, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
grtt = UnquantizeRtt(tvb_get_guint8(tvb, offset));
proto_tree_add_double(cc_tree, hf_cc_rtt, tvb, offset, 1, grtt); offset += 1;
grtt = rmt_decode_send_rate(tvb_get_ntohs(tvb, offset));
proto_tree_add_double(cc_tree, hf_cc_rate, tvb, offset, 2, grtt); offset += 2;
}
return offset;
}
开发者ID:DHODoS,项目名称:wireshark,代码行数:33,代码来源:packet-rmt-norm.c
示例6: dissect_nack_data
static guint dissect_nack_data(proto_tree *tree, tvbuff_t *tvb, guint offset,
packet_info *pinfo)
{
proto_item *ti, *tif;
proto_tree *nack_tree, *flag_tree;
guint16 len;
nack_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_nackdata, &ti, "NACK Data");
proto_tree_add_item(nack_tree, hf_nack_form, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1;
tif = proto_tree_add_item(nack_tree, hf_nack_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
flag_tree = proto_item_add_subtree(tif, ett_flags);
proto_tree_add_item(flag_tree, hf_nack_flags_segment, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_nack_flags_block, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_nack_flags_info, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flag_tree, hf_nack_flags_object, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
len = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(nack_tree, hf_nack_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2;
proto_item_set_len(ti, 4+len);
if (len > 4) {
dissect_feccode(nack_tree, tvb, offset, pinfo, 1);
}
offset += len;
return offset;
}
开发者ID:DHODoS,项目名称:wireshark,代码行数:26,代码来源:packet-rmt-norm.c
示例7: dissect_data_payload
static guint
dissect_data_payload(tvbuff_t *tvb, proto_item *tree, guint offset, guint len)
{
guint end = offset + len;
guint blklen = 0;
guint xdmx, stc;
while(offset < end)
{
proto_item *ti;
proto_tree *data_tree = proto_tree_add_subtree(tree, tvb, offset, 0, ett_pp_data, &ti, "xDMX Data: ");
proto_tree_add_item(data_tree, hf_pp_data_encoding, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
blklen = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(data_tree, hf_pp_data_len, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(data_tree, hf_pp_reserved, tvb, offset++, 1, ENC_NA);
stc = tvb_get_guint8(tvb, offset);
proto_tree_add_item(data_tree, hf_pp_data_start_code, tvb, offset++, 1, ENC_BIG_ENDIAN);
xdmx = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(data_tree, hf_pp_data_dst, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(data_tree, hf_pp_data_levels, tvb, offset, blklen, ENC_NA);
proto_item_append_text(ti, "%d Channels at xDMX %d (Univ %d.%d) StartCode: %d ", blklen, xdmx, xdmx / 512 + 1, xdmx % 512, stc);
offset += roof4(blklen);
}
return len;
}
开发者ID:MultipathDTLS,项目名称:wireshark,代码行数:28,代码来源:packet-pathport.c
示例8: dissect_report_ack_segment
static int
dissect_report_ack_segment(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset){
gint64 rpt_sno;
int rpt_sno_size;
int segment_offset = 0;
proto_tree *ltp_rpt_ack_tree;
/* Extracing receipt serial number info */
rpt_sno = evaluate_sdnv_64(tvb,frame_offset, &rpt_sno_size);
/* XXX - verify that this does not overflow */
segment_offset += rpt_sno_size;
if((unsigned)(frame_offset + segment_offset) > tvb_captured_length(tvb)){
return 0;
}
/* Creating tree for the report ack segment */
ltp_rpt_ack_tree = proto_tree_add_subtree(ltp_tree, tvb,frame_offset, segment_offset,
ett_rpt_ack_segm, NULL, "Report Ack Segment");
proto_tree_add_uint64(ltp_rpt_ack_tree, hf_ltp_rpt_ack_sno, tvb, frame_offset,rpt_sno_size, (guint64)rpt_sno);
return segment_offset;
}
开发者ID:HeartFlying,项目名称:wireshark,代码行数:25,代码来源:packet-ltp.c
示例9: dissect_getnamebyaddr_request
static void dissect_getnamebyaddr_request(tvbuff_t* tvb, proto_tree* lwres_tree)
{
guint32 flags,family;
guint16 addrlen, slen;
const char* addrs;
proto_tree* nba_request_tree;
flags = tvb_get_ntohl(tvb, LWRES_LWPACKET_LENGTH);
family = tvb_get_ntohl(tvb, LWRES_LWPACKET_LENGTH + 4);
addrlen = tvb_get_ntohs(tvb, LWRES_LWPACKET_LENGTH + 8);
addrs = tvb_ip_to_str(tvb, LWRES_LWPACKET_LENGTH + 10);
slen = (int)strlen(addrs);
if (lwres_tree == NULL)
return;
nba_request_tree = proto_tree_add_subtree(lwres_tree,tvb,LWRES_LWPACKET_LENGTH,LWRES_LWPACKET_LENGTH+14,
ett_nba_request,NULL,"getnamebyaddr parameters");
proto_tree_add_uint(nba_request_tree, hf_adn_flags, tvb,
LWRES_LWPACKET_LENGTH, 4, flags);
proto_tree_add_uint(nba_request_tree, hf_adn_family, tvb,
LWRES_LWPACKET_LENGTH + 4, 4, family);
proto_tree_add_uint(nba_request_tree, hf_adn_addr_len, tvb,
LWRES_LWPACKET_LENGTH + 8, 2, addrlen);
proto_tree_add_string(nba_request_tree, hf_adn_addr_addr, tvb,
LWRES_LWPACKET_LENGTH + 10, slen, addrs);
}
开发者ID:danielwhite84,项目名称:wireshark,代码行数:33,代码来源:packet-lwres.c
示例10: dissect_unregister_pdu
static int
dissect_unregister_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, int len, guint8 flags)
{
proto_tree* subtree;
guint encoding = (flags & NETWORK_BYTE_ORDER) ? ENC_BIG_ENDIAN : ENC_LITTLE_ENDIAN;
subtree = proto_tree_add_subtree(tree, tvb, offset, len, ett_unregister, NULL, "Unregister-PDU");
if(flags & NON_DEFAULT_CONTEXT) {
/* show context */
offset += dissect_octet_string(tvb, subtree, offset, flags);
}
proto_tree_add_item(subtree, hf_unreg_timeout, tvb, offset, 1, encoding);
proto_tree_add_item(subtree, hf_unreg_prio, tvb, offset+1, 1, encoding);
proto_tree_add_item(subtree, hf_unreg_rsid, tvb, offset+2, 1, encoding);
offset+=4;
/* Region */
offset += dissect_object_id(tvb, subtree, offset, flags, OID_EXACT);
len += PDU_HDR_LEN;
if(len > offset) {
/* Upper bound (opt) */
proto_tree_add_item(subtree, hf_unreg_ubound, tvb, offset, 4, encoding);
offset += 4;
}
return offset;
}
开发者ID:ARK1988,项目名称:wireshark,代码行数:30,代码来源:packet-agentx.c
示例11: dissect_etv_bif_platform_ids
static guint
dissect_etv_bif_platform_ids(tvbuff_t *tvb, proto_tree *tree, guint offset)
{
proto_tree *platform_tree;
platform_tree = proto_tree_add_subtree(tree, tvb, offset, 15, ett_eiss_platform_id, NULL, "Platform Id");
proto_tree_add_item(platform_tree, hf_pdtHWManufacturer, tvb, offset, 3, ENC_BIG_ENDIAN);
offset += 3;
proto_tree_add_item(platform_tree, hf_pdtHWModel, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(platform_tree, hf_pdtHWVersionMajor, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(platform_tree, hf_pdtHWVersionMinor, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(platform_tree, hf_pdtSWManufacturer, tvb, offset, 3, ENC_BIG_ENDIAN);
offset += 3;
proto_tree_add_item(platform_tree, hf_pdtSWModel, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(platform_tree, hf_pdtSWVersionMajor, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(platform_tree, hf_pdtSWVersionMinor, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item(platform_tree, hf_pdtProfile, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
return 15;
}
开发者ID:appneta,项目名称:wireshark,代码行数:27,代码来源:packet-eiss.c
示例12: dissect_abort_request
static void
dissect_abort_request(tvbuff_t *tvb, proto_tree *fcgi_tree, gint offset, guint16 len)
{
proto_tree_add_subtree(fcgi_tree, tvb, offset, len, ett_fcgi_abort_request, NULL, "Abort Request:");
return;
}
开发者ID:acaceres2176,项目名称:wireshark,代码行数:7,代码来源:packet-fcgi.c
示例13: xmpp_gtalk_transport_p2p_cand
static void
xmpp_gtalk_transport_p2p_cand(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element) {
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}
};
cand_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_transport_p2p_cand, NULL, "CANDIDATE");
xmpp_display_attrs(cand_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(cand_tree, element, pinfo, tvb, NULL, 0);
}
开发者ID:ARK1988,项目名称:wireshark,代码行数:25,代码来源:packet-xmpp-gtalk.c
示例14: xmpp_gtalk_jingleinfo_relay
static void
xmpp_gtalk_jingleinfo_relay(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, xmpp_element_t* element)
{
proto_tree *relay_tree;
xmpp_attr_info attrs_info[] = {
{"token", NULL, FALSE, FALSE, NULL, NULL}
};
xmpp_elem_info elems_info [] = {
{NAME, "server", xmpp_gtalk_jingleinfo_relay_serv, ONE}
};
xmpp_element_t *token;
relay_tree = proto_tree_add_subtree(tree, tvb, element->offset, element->length, ett_xmpp_gtalk_jingleinfo_relay, NULL, "RELAY");
if((token = xmpp_steal_element_by_name(element, "token"))!=NULL)
{
xmpp_attr_t *fake_token = xmpp_ep_init_attr_t(token->data?token->data->value:"", token->offset, token->length);
g_hash_table_insert(element->attrs, (gpointer)"token", fake_token);
}
xmpp_display_attrs(relay_tree, element, pinfo, tvb, attrs_info, array_length(attrs_info));
xmpp_display_elems(relay_tree, element, pinfo, tvb, elems_info, array_length(elems_info));
}
开发者ID:ARK1988,项目名称:wireshark,代码行数:26,代码来源:packet-xmpp-gtalk.c
示例15: dissect_error_status_t
static int
dissect_error_status_t (tvbuff_t * tvb, int offset,
packet_info * pinfo, proto_tree * parent_tree,
dcerpc_info *di, guint8 * drep)
{
proto_item *item;
proto_tree *tree;
int old_offset = offset;
guint32 st;
const char *st_str;
if (di->conformant_run)
{
return offset;
}
tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_error_status_t, &item, "error_status_t");
offset =
dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_error_status_t,
&st);
st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");
col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);
proto_item_set_len (item, offset - old_offset);
return offset;
}
开发者ID:DHODoS,项目名称:wireshark,代码行数:28,代码来源:packet-dcerpc-rs_pgo.c
示例16: dissect_zbee_zdp_rsp_recover_source_bind
/**
*ZigBee Device Profile dissector for the recover source binding
*
*@param tvb pointer to buffer containing raw packet.
*@param pinfo pointer to packet information fields
*@param tree pointer to data tree Wireshark uses to display packet.
*/
void
dissect_zbee_zdp_rsp_recover_source_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *field_tree = NULL;
guint offset = 0;
guint i;
guint8 status;
/*guint16 table_size;*/
/*guint16 idx;*/
guint16 table_count;
status = zdp_parse_status(tree, tvb, &offset);
/*table_size = */ zbee_parse_uint(tree, hf_zbee_zdp_table_size, tvb, &offset, (int)sizeof(guint16), NULL);
/*idx = */ zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, (int)sizeof(guint16), NULL);
table_count = zbee_parse_uint(tree, hf_zbee_zdp_table_count, tvb, &offset, (int)sizeof(guint16), NULL);
if (tree && table_count) {
field_tree = proto_tree_add_subtree(tree, tvb, offset, table_count * (int)sizeof(guint64),
ett_zbee_zdp_bind_source, NULL, "Source Table");
}
for (i=0; i<table_count; i++) {
(void)zbee_parse_eui64(field_tree, hf_zbee_zdp_bind_src64, tvb, &offset, (int)sizeof(guint64), NULL);
} /* for */
zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
} /* dissect_zbee_zdp_rsp_recover_source_bind */
开发者ID:CharaD7,项目名称:wireshark,代码行数:37,代码来源:packet-zbee-zdp-binding.c
示例17: xmpp_unknown_items
static void
xmpp_unknown_items(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *element, guint level)
{
GList *childs = element->elements;
DISSECTOR_ASSERT( level < ETT_UNKNOWN_LEN );
xmpp_unknown_attrs(tree, tvb, pinfo, element, TRUE);
if(element->data)
{
proto_tree_add_text(tree, tvb, element->data->offset, element->data->length, "CDATA: %s",element->data->value);
}
while(childs)
{
xmpp_element_t *child = (xmpp_element_t *)childs->data;
proto_item *child_item;
proto_tree *child_tree = proto_tree_add_subtree(tree, tvb, child->offset, child->length,
ett_unknown[level], &child_item, xmpp_ep_string_upcase(child->name));
if(child->default_ns_abbrev)
proto_item_append_text(child_item, "(%s)", child->default_ns_abbrev);
xmpp_unknown_items(child_tree, tvb, pinfo, child, level +1);
childs = childs->next;
}
}
开发者ID:ARK1988,项目名称:wireshark,代码行数:29,代码来源:packet-xmpp-utils.c
示例18: dissect_cell_id_list_ie
static void
dissect_cell_id_list_ie(tvbuff_t *tvb, packet_info *pinfo, guint offset, guint len, proto_tree *tree,
proto_item *parent_ti)
{
guint base_offs = offset;
guint32 discr;
guint count = 0;
/* list-global discriminator */
proto_tree_add_item_ret_uint(tree, hf_cbsp_cell_id_disc, tvb, offset, 1, ENC_NA, &discr);
discr &= 0x0f;
offset++;
/* iterate over list items */
while (offset - base_offs < len) {
proto_tree *elem_tree;
proto_item *ti;
int rc;
guint remain_len = len - (offset - base_offs);
elem_tree = proto_tree_add_subtree(tree, tvb, offset, cell_id_len(discr),
ett_cbsp_cell_list, &ti,
"Cell List Item");
rc = dissect_cell_id_elem(discr, tvb, pinfo, offset, remain_len, elem_tree, ti);
if (rc <= 0)
break;
offset += rc;
count++;
}
proto_item_append_text(parent_ti, " (%s): %u items",
val_to_str_const(discr, cbsp_cell_id_disc_vals, ""), count);
}
开发者ID:ssyram,项目名称:wireshark,代码行数:32,代码来源:packet-gsm_cbsp.c
示例19: dissect_dsi_attention
static gint
dissect_dsi_attention(tvbuff_t *tvb, proto_tree *dsi_tree, gint offset)
{
proto_tree *tree;
proto_item *ti;
guint16 flag;
if (!tvb_reported_length_remaining(tvb,offset))
return offset;
flag = tvb_get_ntohs(tvb, offset);
tree = proto_tree_add_subtree(dsi_tree, tvb, offset, -1, ett_dsi_attn, NULL, "Attention");
ti = proto_tree_add_item(tree, hf_dsi_attn_flag, tvb, offset, 2, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(ti, ett_dsi_attn_flag);
proto_tree_add_item(tree, hf_dsi_attn_flag_shutdown, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_dsi_attn_flag_crash, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_dsi_attn_flag_msg, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_dsi_attn_flag_reconnect, tvb, offset, 2, ENC_BIG_ENDIAN);
/* FIXME */
if ((flag & 0xf000) != 0x3000)
proto_tree_add_item(tree, hf_dsi_attn_flag_time, tvb, offset, 2, ENC_BIG_ENDIAN);
else
proto_tree_add_item(tree, hf_dsi_attn_flag_bitmap, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
return offset;
}
开发者ID:MultipathDTLS,项目名称:wireshark,代码行数:27,代码来源:packet-dsi.c
示例20: dissect_failure_list_ie
static void
dissect_failure_list_ie(tvbuff_t *tvb, packet_info *pinfo, guint offset, guint len, proto_tree *tree,
proto_item *parent_ti)
{
guint base_offs = offset;
guint count = 0;
/* iterate over list items, each with its own discriminator */
while (offset - base_offs < len) {
proto_tree *elem_tree;
proto_item *ti;
guint remain_len, cause;
int rc;
guint8 discr = tvb_get_guint8(tvb, offset) & 0x0f;
elem_tree = proto_tree_add_subtree(tree, tvb, offset, cell_id_len(discr)+2,
ett_cbsp_fail_list, &ti,
"Failure List Item");
proto_tree_add_item(elem_tree, hf_cbsp_cell_id_disc, tvb, offset++, 1, ENC_NA);
remain_len = len - (offset - base_offs);
rc = dissect_cell_id_elem(discr, tvb, pinfo, offset, remain_len, elem_tree, ti);
if (rc <= 0)
break;
offset += rc;
proto_tree_add_item_ret_uint(elem_tree, hf_cbsp_cause, tvb, offset++, 1, ENC_NA, &cause);
proto_item_append_text(ti, ": Cause %s",
val_to_str_const(cause, cbsp_cause_vals, "Undefined"));
count++;
}
proto_item_append_text(parent_ti, ": %u items", count);
}
开发者ID:ssyram,项目名称:wireshark,代码行数:33,代码来源:packet-gsm_cbsp.c
注:本文中的proto_tree_add_subtree函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论