Use correct encoding for proto_tree_add_item().

svn path=/trunk/; revision=38107
This commit is contained in:
Stig Bjørlykke 2011-07-19 10:51:12 +00:00
parent 93abdd9804
commit f282154ab0
33 changed files with 433 additions and 558 deletions

View File

@ -231,7 +231,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* create display subtree for the connectionless protocol */
if(parent_tree)
{
item = proto_tree_add_item(parent_tree, proto_clacse, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_clacse, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_acse);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CL-ACSE");
@ -242,7 +242,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* create display subtree for the protocol */
if(parent_tree)
{
item = proto_tree_add_item(parent_tree, proto_acse, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_acse, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_acse);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACSE");

View File

@ -81,7 +81,7 @@ void dissect_cdt (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
top_tree = parent_tree;
if (parent_tree) {
cdt_item = proto_tree_add_item (parent_tree, proto_cdt, tvb, 0, -1, FALSE);
cdt_item = proto_tree_add_item (parent_tree, proto_cdt, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (cdt_item, ett_cdt_CompressedData);
}

View File

@ -101,7 +101,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_disp, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_disp, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_disp);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DISP");

View File

@ -139,7 +139,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_dop, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_dop, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_dop);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DOP");

View File

@ -95,7 +95,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_dsp, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_dsp, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_dsp);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DAP");

View File

@ -68,7 +68,7 @@ static gint ett_ftam = -1;
static void
dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), FALSE);
proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_BIG_ENDIAN);
}
/*
@ -77,7 +77,7 @@ dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
static void
dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), FALSE);
proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), ENC_BIG_ENDIAN);
}
/*
@ -95,7 +95,7 @@ dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_ftam, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_ftam, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_ftam);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FTAM");

View File

@ -521,7 +521,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
(void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE);
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1_additional_information);
proto_item_append_text(tree, " (The use of this field is \"strongly deprecated\".)");
@ -1259,7 +1259,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
(void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
/* create some structure so we can tell what this unknown ASN.1 represents */
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE);
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1_bilateral_information);
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);

View File

@ -141,7 +141,7 @@ dissect_p1_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
p1_initialize_content_globals (parent_tree, TRUE);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1);
}
@ -183,7 +183,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1");

View File

@ -105,7 +105,7 @@ dissect_p22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p22, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p22, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p22);
}

View File

@ -70,7 +70,7 @@ dissect_p772(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p772, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p772, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p772);
}

View File

@ -149,7 +149,7 @@ static gboolean ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinf
if((session != NULL) && ((rinfo = (ros_info_t*)g_hash_table_lookup(protocol_table, oid)) != NULL)) {
if(tree){
item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, FALSE);
item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, ENC_BIG_ENDIAN);
ros_tree = proto_item_add_subtree(item, *(rinfo->ett_proto));
}
@ -421,7 +421,7 @@ dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* pinfo->private_data = ros_info; */
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_ros, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_ros, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_ros);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ROS");

View File

@ -241,7 +241,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
frag_msg, &rtse_frag_items, NULL, parent_tree);
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_rtse);
}
if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) {

View File

@ -467,7 +467,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
pt_varbind = proto_item_add_subtree(pi_varbind,ett_varbind);
*label = '\0';
pi_name = proto_tree_add_item(pt_varbind,hf_snmp_objectname,tvb,name_offset,name_len,FALSE);
pi_name = proto_tree_add_item(pt_varbind,hf_snmp_objectname,tvb,name_offset,name_len,ENC_BIG_ENDIAN);
pt_name = proto_item_add_subtree(pi_name,ett_name);
/* fetch ObjectName and its relative oid_info */
@ -521,7 +521,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
}
}
pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,FALSE);
pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
expert_add_info_format(actx->pinfo, pi, PI_RESPONSE_CODE, PI_NOTE, "%s",note);
g_strlcpy (label, note, ITEM_LABEL_LENGTH);
goto set_label;
@ -538,7 +538,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
} else if (oid_left == 0) {
if (ber_class == BER_CLASS_UNI && tag == BER_UNI_TAG_NULL) {
/* unSpecified does not require an instance sub-id add the new value and get off the way! */
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
goto set_label;
} else {
proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have one instance sub-id this one has none");
@ -562,7 +562,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
if ( key_len == 0 && ber_class == BER_CLASS_UNI && tag == BER_UNI_TAG_NULL) {
/* unSpecified does not require an instance sub-id add the new value and get off the way! */
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
goto set_label;
}
@ -729,7 +729,7 @@ indexing_done:
if (oid_info_is_ok && oid_info->value_type) {
if (ber_class == BER_CLASS_UNI && tag == BER_UNI_TAG_NULL) {
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
} else {
/* Provide a tree_item to attach errors to, if needed. */
pi_value = pi_name;
@ -749,7 +749,7 @@ indexing_done:
}
if (format_error == BER_NO_ERROR)
pi_value = proto_tree_add_item(pt_varbind,oid_info->value_hfid,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,oid_info->value_hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
}
} else {
switch(ber_class|(tag<<4)) {
@ -825,7 +825,7 @@ indexing_done:
break;
}
pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
if (format_error != BER_NO_ERROR) {
expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB");
}
@ -949,7 +949,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
/* first bit: engine id conformance */
if (len_remain<4) return offset;
conformance = ((tvb_get_guint8(tvb, offset)>>7) & 0x01);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, ENC_BIG_ENDIAN);
/* 4-byte enterprise number/name */
if (len_remain<4) return offset;
@ -989,7 +989,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_IPV4:
/* 4-byte IPv4 address */
if (len_remain==4) {
proto_tree_add_item(tree, hf_snmp_engineid_ipv4, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
offset+=4;
len_remain=0;
}
@ -997,7 +997,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_IPV6:
/* 16-byte IPv6 address */
if (len_remain==16) {
proto_tree_add_item(tree, hf_snmp_engineid_ipv6, tvb, offset, 16, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN);
offset+=16;
len_remain=0;
}
@ -1005,13 +1005,13 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_MACADDRESS:
/* See: https://supportforums.cisco.com/message/3010617#3010617 for details. */
if ((enterpriseid==9)&&(len_remain==7)) {
proto_tree_add_item(tree, hf_snmp_engineid_cisco_type, tvb, offset, 1, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_cisco_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
len_remain--;
}
/* 6-byte MAC address */
if (len_remain==6) {
proto_tree_add_item(tree, hf_snmp_engineid_mac, tvb, offset, 6, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_mac, tvb, offset, 6, ENC_BIG_ENDIAN);
offset+=6;
len_remain=0;
}
@ -1019,7 +1019,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_TEXT:
/* max. 27-byte string, administratively assigned */
if (len_remain<=27) {
proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, ENC_BIG_ENDIAN);
offset+=len_remain;
len_remain=0;
}
@ -1030,7 +1030,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
proto_item_append_text(item, (enterpriseid==2021) ? ": UCD-SNMP Random" : ": Net-SNMP Random");
/* demystify: 4B random, 4B epoch seconds */
if (len_remain==8) {
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, 4, ENC_BIG_ENDIAN);
seconds = tvb_get_letohl(tvb, offset+4);
ts.secs = seconds;
ts.nsecs = 0;
@ -1046,7 +1046,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
default:
/* max. 27 bytes, administratively assigned or unknown format */
if (len_remain<=27) {
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, len_remain, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, len_remain, ENC_BIG_ENDIAN);
offset+=len_remain;
len_remain=0;
}
@ -1630,7 +1630,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (tree) {
item = proto_tree_add_item(tree, proto, tvb, start_offset,
message_length, FALSE);
message_length, ENC_BIG_ENDIAN);
snmp_tree = proto_item_add_subtree(item, ett);
}
@ -1781,7 +1781,7 @@ dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMUX");
if (tree) {
item = proto_tree_add_item(tree, proto_smux, tvb, 0, -1, FALSE);
item = proto_tree_add_item(tree, proto_smux, tvb, 0, -1, ENC_BIG_ENDIAN);
smux_tree = proto_item_add_subtree(item, ett_smux);
}

View File

@ -1771,7 +1771,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* create display subtree for the connectionless protocol */
if(parent_tree)
{
item = proto_tree_add_item(parent_tree, proto_clacse, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_clacse, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_acse);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CL-ACSE");
@ -1782,7 +1782,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* create display subtree for the protocol */
if(parent_tree)
{
item = proto_tree_add_item(parent_tree, proto_acse, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_acse, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_acse);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACSE");

View File

@ -97,18 +97,18 @@ static void dissect_bjnp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear (pinfo->cinfo, COL_INFO);
ti = proto_tree_add_item (tree, proto_bjnp, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (tree, proto_bjnp, tvb, offset, -1, ENC_BIG_ENDIAN);
bjnp_tree = proto_item_add_subtree (ti, ett_bjnp);
proto_tree_add_item (bjnp_tree, hf_bjnp_id, tvb, offset, 4, FALSE);
proto_tree_add_item (bjnp_tree, hf_bjnp_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
dev_type = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (bjnp_tree, hf_dev_type, tvb, offset, 1, FALSE);
proto_tree_add_item (bjnp_tree, hf_dev_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
cmd_code = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (bjnp_tree, hf_cmd_code, tvb, offset, 1, FALSE);
proto_tree_add_item (bjnp_tree, hf_cmd_code, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
info = g_strdup_printf ("%s: %s",val_to_str (dev_type, dev_type_vals, "Unknown type (%d)"),
@ -119,19 +119,19 @@ static void dissect_bjnp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
g_free (info);
proto_tree_add_item (bjnp_tree, hf_seq_no, tvb, offset, 4, FALSE);
proto_tree_add_item (bjnp_tree, hf_seq_no, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (bjnp_tree, hf_session_id, tvb, offset, 2, FALSE);
proto_tree_add_item (bjnp_tree, hf_session_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
payload_len = tvb_get_ntohl (tvb, offset);
proto_tree_add_item (bjnp_tree, hf_payload_len, tvb, offset, 4, FALSE);
proto_tree_add_item (bjnp_tree, hf_payload_len, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
if (payload_len > 0) {
/* TBD: Dissect various commands */
proto_tree_add_item (bjnp_tree, hf_payload, tvb, offset, payload_len, FALSE);
proto_tree_add_item (bjnp_tree, hf_payload, tvb, offset, payload_len, ENC_BIG_ENDIAN);
offset += payload_len;
}
}

View File

@ -355,7 +355,7 @@ void dissect_cdt (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
top_tree = parent_tree;
if (parent_tree) {
cdt_item = proto_tree_add_item (parent_tree, proto_cdt, tvb, 0, -1, FALSE);
cdt_item = proto_tree_add_item (parent_tree, proto_cdt, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (cdt_item, ett_cdt_CompressedData);
}

View File

@ -92,11 +92,11 @@ dissect_db_lsp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_set_str (pinfo->cinfo, COL_INFO, PNAME);
db_lsp_item = proto_tree_add_item (tree, proto_db_lsp, tvb, offset, -1, FALSE);
db_lsp_item = proto_tree_add_item (tree, proto_db_lsp, tvb, offset, -1, ENC_BIG_ENDIAN);
db_lsp_tree = proto_item_add_subtree (db_lsp_item, ett_db_lsp);
type = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (db_lsp_tree, hf_type, tvb, offset, 1, FALSE);
proto_tree_add_item (db_lsp_tree, hf_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (type == 0x80) {
@ -105,11 +105,11 @@ dissect_db_lsp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
magic = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (db_lsp_tree, hf_magic, tvb, offset, 2, FALSE);
proto_tree_add_item (db_lsp_tree, hf_magic, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
length = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (db_lsp_tree, hf_length, tvb, offset, 2, FALSE);
proto_tree_add_item (db_lsp_tree, hf_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (magic != 0x0301 || length > tvb_length_remaining (tvb, offset)) {
@ -120,19 +120,19 @@ dissect_db_lsp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (type == TYPE_CONFIG) {
opvalue = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (db_lsp_tree, hf_opvalue, tvb, offset, 1, FALSE);
proto_tree_add_item (db_lsp_tree, hf_opvalue, tvb, offset, 1, ENC_BIG_ENDIAN);
if (opvalue == OP_CERT) {
/* X509 Certificate */
tvbuff_t *cert_tvb = tvb_new_subset (tvb, offset+10, length-10, length-10);
dissect_x509af_Certificate_PDU (cert_tvb, pinfo, db_lsp_tree);
} else {
proto_tree_add_item (db_lsp_tree, hf_value, tvb, offset, length, FALSE);
proto_tree_add_item (db_lsp_tree, hf_value, tvb, offset, length, ENC_BIG_ENDIAN);
}
} else if (type == TYPE_DATA) {
proto_tree_add_item (db_lsp_tree, hf_data, tvb, offset, length, FALSE);
proto_tree_add_item (db_lsp_tree, hf_data, tvb, offset, length, ENC_BIG_ENDIAN);
} else {
proto_tree_add_item (db_lsp_tree, hf_value, tvb, offset, length, FALSE);
proto_tree_add_item (db_lsp_tree, hf_value, tvb, offset, length, ENC_BIG_ENDIAN);
}
offset += length;
@ -168,10 +168,10 @@ dissect_db_lsp_disc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME_DISC);
col_set_str (pinfo->cinfo, COL_INFO, PNAME_DISC);
db_lsp_item = proto_tree_add_item (tree, proto_db_lsp_disc, tvb, offset, -1, FALSE);
db_lsp_item = proto_tree_add_item (tree, proto_db_lsp_disc, tvb, offset, -1, ENC_BIG_ENDIAN);
db_lsp_tree = proto_item_add_subtree (db_lsp_item, ett_db_lsp);
proto_tree_add_item (db_lsp_tree, hf_text, tvb, offset, -1, FALSE);
proto_tree_add_item (db_lsp_tree, hf_text, tvb, offset, -1, ENC_BIG_ENDIAN);
}
void

View File

@ -1528,7 +1528,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_disp, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_disp, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_disp);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DISP");

File diff suppressed because it is too large Load Diff

View File

@ -2101,7 +2101,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_dop, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_dop, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_dop);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DOP");

View File

@ -1817,7 +1817,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_dsp, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_dsp, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_dsp);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DAP");

View File

@ -4753,7 +4753,7 @@ dissect_ftam_PDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, a
static void
dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), FALSE);
proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_BIG_ENDIAN);
}
/*
@ -4762,7 +4762,7 @@ dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
static void
dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), FALSE);
proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), ENC_BIG_ENDIAN);
}
/*
@ -4780,7 +4780,7 @@ dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_ftam, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_ftam, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_ftam);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FTAM");

View File

@ -257,7 +257,7 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean missing = FALSE; /* Set when extras is missing */
if (extras_len) {
extras_item = proto_tree_add_item (tree, hf_extras, tvb, offset, extras_len, FALSE);
extras_item = proto_tree_add_item (tree, hf_extras, tvb, offset, extras_len, ENC_BIG_ENDIAN);
extras_tree = proto_item_add_subtree (extras_item, ett_extras);
}
@ -272,7 +272,7 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Request shall not have extras */
illegal = TRUE;
} else {
proto_tree_add_item (extras_tree, hf_extras_flags, tvb, offset, 4, FALSE);
proto_tree_add_item (extras_tree, hf_extras_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
} else if (!request) {
@ -289,10 +289,10 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case OP_REPLACE_Q:
if (extras_len) {
if (request) {
proto_tree_add_item (extras_tree, hf_extras_flags, tvb, offset, 4, FALSE);
proto_tree_add_item (extras_tree, hf_extras_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (extras_tree, hf_extras_expiration, tvb, offset, 4, FALSE);
proto_tree_add_item (extras_tree, hf_extras_expiration, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else {
/* Response shall not have extras */
@ -310,13 +310,13 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case OP_DECREMENT_Q:
if (extras_len) {
if (request) {
proto_tree_add_item (extras_tree, hf_extras_delta, tvb, offset, 8, FALSE);
proto_tree_add_item (extras_tree, hf_extras_delta, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
proto_tree_add_item (extras_tree, hf_extras_initial, tvb, offset, 8, FALSE);
proto_tree_add_item (extras_tree, hf_extras_initial, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
proto_tree_add_item (extras_tree, hf_extras_expiration, tvb, offset, 4, FALSE);
proto_tree_add_item (extras_tree, hf_extras_expiration, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else {
/* Response must not have extras (response is in Value) */
@ -331,7 +331,7 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case OP_FLUSH:
case OP_FLUSH_Q:
if (extras_len) {
proto_tree_add_item (extras_tree, hf_extras_expiration, tvb, offset, 4, FALSE);
proto_tree_add_item (extras_tree, hf_extras_expiration, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
break;
@ -355,20 +355,20 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
default:
if (extras_len) {
/* Decode as unknown extras */
proto_tree_add_item (extras_tree, hf_extras_unknown, tvb, offset, extras_len, FALSE);
proto_tree_add_item (extras_tree, hf_extras_unknown, tvb, offset, extras_len, ENC_BIG_ENDIAN);
offset += extras_len;
}
break;
}
if (illegal) {
ti = proto_tree_add_item (extras_tree, hf_extras_unknown, tvb, offset, extras_len, FALSE);
ti = proto_tree_add_item (extras_tree, hf_extras_unknown, tvb, offset, extras_len, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "%s %s shall not have Extras",
val_to_str (opcode, opcode_vals, "Opcode %d"),
request ? "Request" : "Response");
offset += extras_len;
} else if (missing) {
ti = proto_tree_add_item (tree, hf_extras_missing, tvb, offset, 0, FALSE);
ti = proto_tree_add_item (tree, hf_extras_missing, tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "%s %s must have Extras",
val_to_str (opcode, opcode_vals, "Opcode %d"),
request ? "Request" : "Response");
@ -389,7 +389,7 @@ dissect_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean missing = FALSE; /* Set when key is missing */
if (key_len) {
ti = proto_tree_add_item (tree, hf_key, tvb, offset, key_len, FALSE);
ti = proto_tree_add_item (tree, hf_key, tvb, offset, key_len, ENC_BIG_ENDIAN);
offset += key_len;
}
@ -427,7 +427,7 @@ dissect_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
val_to_str (opcode, opcode_vals, "Opcode %d"),
request ? "Request" : "Response");
} else if (missing) {
ti = proto_tree_add_item (tree, hf_key_missing, tvb, offset, 0, FALSE);
ti = proto_tree_add_item (tree, hf_key_missing, tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "%s %s must have Key",
val_to_str (opcode, opcode_vals, "Opcode %d"),
request ? "Request" : "Response");
@ -444,12 +444,12 @@ dissect_value (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (value_len > 0) {
if (!request && ((opcode == OP_INCREMENT) || (opcode == OP_DECREMENT))) {
ti = proto_tree_add_item (tree, hf_uint64_response, tvb, offset, 8, FALSE);
ti = proto_tree_add_item (tree, hf_uint64_response, tvb, offset, 8, ENC_BIG_ENDIAN);
if (value_len != 8) {
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "Illegal Value length, should be 8");
}
} else {
ti = proto_tree_add_item (tree, hf_value, tvb, offset, value_len, FALSE);
ti = proto_tree_add_item (tree, hf_value, tvb, offset, value_len, ENC_BIG_ENDIAN);
}
offset += value_len;
}
@ -497,7 +497,7 @@ dissect_value (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
val_to_str (opcode, opcode_vals, "Opcode %d"),
request ? "Request" : "Response");
} else if (missing) {
ti = proto_tree_add_item (tree, hf_value_missing, tvb, offset, 0, FALSE);
ti = proto_tree_add_item (tree, hf_value_missing, tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "%s %s must have Value",
val_to_str (opcode, opcode_vals, "Opcode %d"),
request ? "Request" : "Response");
@ -518,11 +518,11 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear (pinfo->cinfo, COL_INFO);
memcache_item = proto_tree_add_item (tree, proto_memcache, tvb, offset, -1, FALSE);
memcache_item = proto_tree_add_item (tree, proto_memcache, tvb, offset, -1, ENC_BIG_ENDIAN);
memcache_tree = proto_item_add_subtree (memcache_item, ett_memcache);
magic = tvb_get_guint8 (tvb, offset);
ti = proto_tree_add_item (memcache_tree, hf_magic, tvb, offset, 1, FALSE);
ti = proto_tree_add_item (memcache_tree, hf_magic, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (match_strval (magic, magic_vals) == NULL) {
@ -530,7 +530,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
opcode = tvb_get_guint8 (tvb, offset);
ti = proto_tree_add_item (memcache_tree, hf_opcode, tvb, offset, 1, FALSE);
ti = proto_tree_add_item (memcache_tree, hf_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (match_strval (opcode, opcode_vals) == NULL) {
@ -545,20 +545,20 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
val_to_str (magic, magic_vals, "Unknown magic (%d)"));
key_len = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (memcache_tree, hf_key_length, tvb, offset, 2, FALSE);
proto_tree_add_item (memcache_tree, hf_key_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
extras_len = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (memcache_tree, hf_extras_length, tvb, offset, 1, FALSE);
proto_tree_add_item (memcache_tree, hf_extras_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item (memcache_tree, hf_data_type, tvb, offset, 1, FALSE);
proto_tree_add_item (memcache_tree, hf_data_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
status = tvb_get_ntohs (tvb, offset);
if (magic & 0x01) { /* We suppose this is a response, even when unknown magic byte */
request = FALSE;
ti = proto_tree_add_item (memcache_tree, hf_status, tvb, offset, 2, FALSE);
ti = proto_tree_add_item (memcache_tree, hf_status, tvb, offset, 2, ENC_BIG_ENDIAN);
if (status != 0) {
expert_add_info_format (pinfo, ti, PI_RESPONSE_CODE, PI_NOTE, "%s: %s",
val_to_str (opcode, opcode_vals, "Unknown opcode (%d)"),
@ -566,7 +566,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
} else {
request = TRUE;
ti = proto_tree_add_item (memcache_tree, hf_reserved, tvb, offset, 2, FALSE);
ti = proto_tree_add_item (memcache_tree, hf_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
if (status != 0) {
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "Reserved value: %d", status);
}
@ -578,13 +578,13 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_uint (memcache_tree, hf_value_length, tvb, offset, 0, value_len);
PROTO_ITEM_SET_GENERATED (ti);
proto_tree_add_item (memcache_tree, hf_total_body_length, tvb, offset, 4, FALSE);
proto_tree_add_item (memcache_tree, hf_total_body_length, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (memcache_tree, hf_opaque, tvb, offset, 4, FALSE);
proto_tree_add_item (memcache_tree, hf_opaque, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (memcache_tree, hf_cas, tvb, offset, 8, FALSE);
proto_tree_add_item (memcache_tree, hf_cas, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
if (status == 0) {
@ -597,13 +597,13 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_value (tvb, pinfo, memcache_tree, offset, value_len, opcode, request);
offset += value_len;
} else if (body_len) {
proto_tree_add_item (memcache_tree, hf_value, tvb, offset, body_len, FALSE);
proto_tree_add_item (memcache_tree, hf_value, tvb, offset, body_len, ENC_BIG_ENDIAN);
offset += body_len;
col_append_fstr (pinfo->cinfo, COL_INFO, " (%s)",
val_to_str (status, status_vals, "Unknown status: %d"));
} else {
ti = proto_tree_add_item (memcache_tree, hf_value_missing, tvb, offset, 0, FALSE);
ti = proto_tree_add_item (memcache_tree, hf_value_missing, tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_WARN, "%s with status %s (%d) must have Value",
val_to_str (opcode, opcode_vals, "Opcode %d"),
val_to_str (status, status_vals, "Unknown"), status);
@ -871,7 +871,7 @@ dissect_memcache_message (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
orig_offset = offset;
memcache_item = proto_tree_add_item (tree, proto_memcache, tvb, offset, -1, FALSE);
memcache_item = proto_tree_add_item (tree, proto_memcache, tvb, offset, -1, ENC_BIG_ENDIAN);
memcache_tree = proto_item_add_subtree (memcache_item, ett_memcache);
/* Process the packet data. The first line is expected to be a
@ -1030,7 +1030,7 @@ incr_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
return -1;
}
proto_tree_add_item (tree, hf_uint64_response, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_uint64_response, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
@ -1076,7 +1076,7 @@ stat_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
tokenlen = get_token_len (line, lineend, &next_token);
if ((tokenlen == 4) && strncmp (line, "STAT", tokenlen) == 0) {
proto_tree_add_item (tree, hf_command, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_command, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
occurrences = find_stat_colon (line, lineend, &first_colon, &last_colon);
@ -1093,8 +1093,7 @@ stat_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
case 2: /* stats items: 2 colons */
/* subcommand 'items' */
tokenlen = (int) (first_colon - line);
proto_tree_add_item (tree, hf_subcommand, tvb, offset,
tokenlen, FALSE);
proto_tree_add_item (tree, hf_subcommand, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += tokenlen + 1;
/* slabclass */
@ -1140,7 +1139,7 @@ stat_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
return -1; /* invalid token */
}
proto_tree_add_item (tree, hf_name, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_name, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
@ -1149,7 +1148,7 @@ stat_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
if (tokenlen == 0) {
return -1; /* invalid token */
}
proto_tree_add_item (tree, hf_name_value, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_name_value, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
@ -1320,7 +1319,7 @@ memcache_response_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
return -1;
}
proto_tree_add_item (tree, hf_version, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_version, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
@ -1359,7 +1358,7 @@ memcache_response_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
(tokenlen == 2 && strncmp (line, "OK", tokenlen) == 0) ||
(tokenlen == 3 && strncmp (line, "END", tokenlen) == 0))
{
proto_tree_add_item (tree, hf_response, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_response, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
return offset;
@ -1398,7 +1397,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tokenlen == 0) {
return -1;
}
proto_tree_add_item (tree, hf_command, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_command, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
@ -1485,7 +1484,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tokenlen = get_token_len (line, lineend, &next_token);
if (tokenlen != 0) {
if (tokenlen == 7 && strncmp (line, "noreply", 7) == 0) {
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
}
offset += (int) (next_token - line);
line = next_token;
@ -1515,7 +1514,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tokenlen == 0) {
return -1;
}
proto_tree_add_item (tree, hf_value, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_value, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
@ -1525,7 +1524,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return offset; /* reached CRLF */
}
if (tokenlen == 7 && strncmp (line, "noreply", 7) == 0) {
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
} else {
@ -1561,7 +1560,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tokenlen <= 10) {
if (tokenlen == 7 && strncmp (line, "noreply", 7) == 0) {
/* noreply */
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
} else {
/* expiration */
memcpy (response_chars, line, tokenlen);
@ -1608,7 +1607,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tokenlen == 0) { /* just the 'stats' command;*/
return offset;
} else { /* there is a sub command; record it*/
proto_tree_add_item (tree, hf_subcommand, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_subcommand, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
}
@ -1632,7 +1631,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tokenlen <= 10) {
if (tokenlen == 7 && strncmp (line, "noreply", 7) == 0) {
/* noreply */
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
} else {
/* expiration */
memcpy (response_chars, line, tokenlen);
@ -1654,7 +1653,7 @@ memcache_request_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
if (tokenlen == 7 && strncmp (line, "noreply", 7) == 0) {
/* noreply */
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, FALSE);
proto_tree_add_item (tree, hf_noreply, tvb, offset, tokenlen, ENC_BIG_ENDIAN);
offset += (int) (next_token - line);
line = next_token;
} else {

View File

@ -94,15 +94,15 @@ static void dissect_nat_pmp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear (pinfo->cinfo, COL_INFO);
ti = proto_tree_add_item (tree, proto_nat_pmp, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (tree, proto_nat_pmp, tvb, offset, -1, ENC_BIG_ENDIAN);
nat_pmp_tree = proto_item_add_subtree (ti, ett_nat_pmp);
proto_tree_add_item (nat_pmp_tree, hf_version, tvb, offset, 1, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_version, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
opcode = tvb_get_guint8 (tvb, offset);
proto_item_append_text (ti, ", %s", val_to_str (opcode, opcode_vals, "Unknown opcode: %d"));
op_ti = proto_tree_add_item (nat_pmp_tree, hf_opcode, tvb, offset, 1, FALSE);
op_ti = proto_tree_add_item (nat_pmp_tree, hf_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
col_add_str (pinfo->cinfo, COL_INFO, val_to_str (opcode, opcode_vals, "Unknown opcode: %d"));
@ -114,46 +114,46 @@ static void dissect_nat_pmp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
break;
case EXTERNAL_ADDRESS_RESPONSE:
proto_tree_add_item (nat_pmp_tree, hf_result_code, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_result_code, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_sssoe, tvb, offset, 4, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_sssoe, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (nat_pmp_tree, hf_external_ip, tvb, offset, 4, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_external_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;
case MAP_UDP_REQUEST:
case MAP_TCP_REQUEST:
proto_tree_add_item (nat_pmp_tree, hf_reserved, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_internal_port, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_internal_port, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_external_port_requested, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_external_port_requested, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_rpmlis, tvb, offset, 4, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_rpmlis, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;
case MAP_UDP_RESPONSE:
case MAP_TCP_RESPONSE:
proto_tree_add_item (nat_pmp_tree, hf_result_code, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_result_code, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_sssoe, tvb, offset, 4, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_sssoe, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (nat_pmp_tree, hf_internal_port, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_internal_port, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_external_port_mapped, tvb, offset, 2, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_external_port_mapped, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (nat_pmp_tree, hf_pmlis, tvb, offset, 4, FALSE);
proto_tree_add_item (nat_pmp_tree, hf_pmlis, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;

View File

@ -2729,7 +2729,7 @@ dissect_p1_T_bilateral_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
(void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
/* create some structure so we can tell what this unknown ASN.1 represents */
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE);
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1_bilateral_information);
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
@ -3414,7 +3414,7 @@ dissect_p1_AdditionalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
(void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE);
item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1_additional_information);
proto_item_append_text(tree, " (The use of this field is \"strongly deprecated\".)");
@ -8325,7 +8325,7 @@ dissect_p1_mts_apdu (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
p1_initialize_content_globals (parent_tree, TRUE);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1);
}
@ -8367,7 +8367,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p1, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p1);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "P1");

View File

@ -4526,7 +4526,7 @@ dissect_p22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p22, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p22, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p22);
}

View File

@ -1253,7 +1253,7 @@ dissect_p772(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_p772, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_p772, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_p772);
}

View File

@ -560,7 +560,7 @@ static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_m
} else {
en = proto_tree_add_item (analysis_tree,
hf_analysis_addr_pdu_missing,
tvb, offset, 0, FALSE);
tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
"Address PDU missing");
PROTO_ITEM_SET_GENERATED (en);
@ -581,7 +581,7 @@ static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_m
} else if (!pkg_data->msg_resend_count) {
en = proto_tree_add_item (analysis_tree,
hf_analysis_ack_missing,
tvb, offset, 0, FALSE);
tvb, offset, 0, ENC_BIG_ENDIAN);
if (pinfo->fd->flags.visited) {
/* We do not know this on first visit and we do not want to
add a entry in the "Expert Severity Info" for this note */
@ -626,7 +626,7 @@ static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_m
} else {
en = proto_tree_add_item (analysis_tree,
hf_analysis_addr_pdu_missing,
tvb, offset, 0, FALSE);
tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
"Address PDU missing");
PROTO_ITEM_SET_GENERATED (en);
@ -709,7 +709,7 @@ static p_mul_seq_val *add_seq_analysis (tvbuff_t *tvb, packet_info *pinfo,
} else if (!pkg_data->msg_resend_count) {
en = proto_tree_add_item (analysis_tree,
hf_analysis_addr_pdu_missing,
tvb, offset, 0, FALSE);
tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
"Address PDU missing");
PROTO_ITEM_SET_GENERATED (en);
@ -732,7 +732,7 @@ static p_mul_seq_val *add_seq_analysis (tvbuff_t *tvb, packet_info *pinfo,
} else if (!pkg_data->msg_resend_count) {
en = proto_tree_add_item (analysis_tree,
hf_analysis_prev_pdu_missing,
tvb, offset, 0, FALSE);
tvb, offset, 0, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
"Previous PDU missing");
PROTO_ITEM_SET_GENERATED (en);
@ -826,13 +826,13 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* First fetch PDU Type */
pdu_type = tvb_get_guint8 (tvb, offset + 3) & 0x3F;
ti = proto_tree_add_item (tree, proto_p_mul, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (tree, proto_p_mul, tvb, offset, -1, ENC_BIG_ENDIAN);
proto_item_append_text (ti, ", %s", get_type (pdu_type));
p_mul_tree = proto_item_add_subtree (ti, ett_p_mul);
/* Length of PDU */
pdu_length = tvb_get_ntohs (tvb, offset);
len_en = proto_tree_add_item (p_mul_tree, hf_length, tvb, offset, 2, FALSE);
len_en = proto_tree_add_item (p_mul_tree, hf_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
switch (pdu_type) {
@ -845,12 +845,12 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case FEC_Address_PDU:
case Extra_FEC_Address_PDU:
/* Priority */
proto_tree_add_item (p_mul_tree, hf_priority, tvb, offset, 1, FALSE);
proto_tree_add_item (p_mul_tree, hf_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
default:
/* Unused */
proto_tree_add_item (p_mul_tree, hf_unused8, tvb, offset, 1, FALSE);
proto_tree_add_item (p_mul_tree, hf_unused8, tvb, offset, 1, ENC_BIG_ENDIAN);
}
offset += 1;
@ -873,8 +873,8 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case FEC_Address_PDU:
case Extra_FEC_Address_PDU:
map = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (field_tree, hf_map_first, tvb, offset, 1, FALSE);
proto_tree_add_item (field_tree, hf_map_last, tvb, offset, 1, FALSE);
proto_tree_add_item (field_tree, hf_map_first, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (field_tree, hf_map_last, tvb, offset, 1, ENC_BIG_ENDIAN);
if ((map & 0x80) || (map & 0x40)) {
proto_item_append_text (en, ", %s / %s",
(map & 0x80) ? "Not first" : "First",
@ -885,10 +885,10 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
default:
proto_tree_add_item (field_tree, hf_map_unused, tvb, offset, 1, FALSE);
proto_tree_add_item (field_tree, hf_map_unused, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
}
proto_tree_add_item (field_tree, hf_pdu_type_value, tvb, offset, 1, FALSE);
proto_tree_add_item (field_tree, hf_pdu_type_value, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
switch (pdu_type) {
@ -900,32 +900,32 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Total Number of PDUs */
no_pdus = tvb_get_ntohs (tvb, offset);
seq_no = 0;
proto_tree_add_item (p_mul_tree, hf_no_pdus, tvb, offset, 2, FALSE);
proto_tree_add_item (p_mul_tree, hf_no_pdus, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text (ti, ", No PDUs: %u", no_pdus);
break;
case Data_PDU:
/* Sequence Number of PDUs */
seq_no = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (p_mul_tree, hf_seq_no, tvb, offset, 2, FALSE);
proto_tree_add_item (p_mul_tree, hf_seq_no, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text (ti, ", Seq no: %u", seq_no);
break;
case Announce_PDU:
/* Count of Destination Entries */
count = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (p_mul_tree, hf_count_of_dest, tvb, offset, 2,FALSE);
proto_tree_add_item (p_mul_tree, hf_count_of_dest, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
default:
/* Unused */
proto_tree_add_item (p_mul_tree, hf_unused16, tvb, offset, 2, FALSE);
proto_tree_add_item (p_mul_tree, hf_unused16, tvb, offset, 2, ENC_BIG_ENDIAN);
break;
}
offset += 2;
/* Checksum */
en = proto_tree_add_item (p_mul_tree, hf_checksum, tvb, offset, 2, FALSE);
en = proto_tree_add_item (p_mul_tree, hf_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
checksum_tree = proto_item_add_subtree (en, ett_checksum);
len = tvb_length (tvb);
value = tvb_get_ephemeral_string (tvb, 0, len);
@ -955,18 +955,18 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Source ID of Ack Sender */
ip = tvb_get_ipv4 (tvb, offset);
SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
proto_tree_add_item (p_mul_tree, hf_source_id_ack, tvb, offset, 4, FALSE);
proto_tree_add_item (p_mul_tree, hf_source_id_ack, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
/* Count of Ack Info Entries */
count = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (p_mul_tree, hf_ack_count, tvb, offset, 2, FALSE);
proto_tree_add_item (p_mul_tree, hf_ack_count, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
} else {
/* Source Id */
ip = tvb_get_ipv4 (tvb, offset);
SET_ADDRESS (&src, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
proto_tree_add_item (p_mul_tree, hf_source_id, tvb, offset, 4, FALSE);
proto_tree_add_item (p_mul_tree, hf_source_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
/* Message Id */
@ -981,7 +981,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_id, "Message ID (MSID): %u"
" (relative message id)", message_id);
} else {
proto_tree_add_item (p_mul_tree, hf_message_id, tvb, offset, 4, FALSE);
proto_tree_add_item (p_mul_tree, hf_message_id, tvb, offset, 4, ENC_BIG_ENDIAN);
}
offset += 4;
@ -1001,11 +1001,11 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pdu_type == FEC_Address_PDU || pdu_type == Extra_FEC_Address_PDU) {
/* FEC Parameters Length */
fec_len = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (p_mul_tree, hf_fec_len, tvb, offset, 1, FALSE);
proto_tree_add_item (p_mul_tree, hf_fec_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
/* FEC ID */
proto_tree_add_item (p_mul_tree, hf_fec_id, tvb, offset, 1, FALSE);
proto_tree_add_item (p_mul_tree, hf_fec_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (fec_len > 0) {
@ -1025,12 +1025,12 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case Extra_FEC_Address_PDU:
/* Count of Destination Entries */
no_dest = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (p_mul_tree, hf_count_of_dest, tvb, offset, 2, FALSE);
proto_tree_add_item (p_mul_tree, hf_count_of_dest, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
/* Length of Reserved Field */
len = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (p_mul_tree, hf_length_of_res, tvb, offset, 2, FALSE);
proto_tree_add_item (p_mul_tree, hf_length_of_res, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
for (i = 0; i < no_dest; i++) {
@ -1043,11 +1043,11 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Destination Id */
ip = tvb_get_ipv4 (tvb, offset);
SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), ep_memdup(&ip, 4));
proto_tree_add_item (field_tree, hf_dest_id, tvb, offset, 4, FALSE);
proto_tree_add_item (field_tree, hf_dest_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
/* Message Sequence Number */
proto_tree_add_item (field_tree, hf_msg_seq_no, tvb, offset, 4, FALSE);
proto_tree_add_item (field_tree, hf_msg_seq_no, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
if (len > 0) {
@ -1095,8 +1095,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
field_tree = proto_item_add_subtree (en, ett_ack_entry);
/* Length of Ack Info Entry */
en = proto_tree_add_item (field_tree, hf_ack_length, tvb, offset,
2, FALSE);
en = proto_tree_add_item (field_tree, hf_ack_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (len < 10) {
@ -1108,7 +1107,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Source Id */
ip = tvb_get_ipv4 (tvb, offset);
SET_ADDRESS (&src, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
proto_tree_add_item (field_tree, hf_source_id, tvb, offset, 4, FALSE);
proto_tree_add_item (field_tree, hf_source_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
/* Message Id */
@ -1123,7 +1122,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_id, "Message ID (MSID): %u"
" (relative message id)", message_id);
} else {
proto_tree_add_item (field_tree, hf_message_id, tvb, offset, 4, FALSE);
proto_tree_add_item (field_tree, hf_message_id, tvb, offset, 4, ENC_BIG_ENDIAN);
}
offset += 4;
@ -1173,8 +1172,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
prev_ack_seq_no = end_seq_no;
} else {
/* No range, handle one seq no */
en = proto_tree_add_item (field_tree, hf_miss_seq_no, tvb,offset,
2, FALSE);
en = proto_tree_add_item (field_tree, hf_miss_seq_no, tvb,offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (ack_seq_no == 0) {
@ -1227,12 +1225,12 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case Announce_PDU:
/* Announced Multicast Group */
proto_tree_add_item (p_mul_tree, hf_ann_mc_group, tvb, offset, 4, FALSE);
proto_tree_add_item (p_mul_tree, hf_ann_mc_group, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
for (i = 0; i < count; i++) {
/* Destination Id */
proto_tree_add_item (p_mul_tree, hf_dest_id, tvb, offset, 4, FALSE);
proto_tree_add_item (p_mul_tree, hf_dest_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
break;
@ -1241,7 +1239,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case Reject_PDU:
case Release_PDU:
/* Multicast Group */
proto_tree_add_item (p_mul_tree, hf_mc_group, tvb, offset, 4, FALSE);
proto_tree_add_item (p_mul_tree, hf_mc_group, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
break;

View File

@ -74,11 +74,11 @@ static void dissect_packetlogger (tvbuff_t *tvb, packet_info *pinfo, proto_tree
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_clear (pinfo->cinfo, COL_INFO);
ti = proto_tree_add_item (tree, proto_packetlogger, tvb, 0, -1, FALSE);
ti = proto_tree_add_item (tree, proto_packetlogger, tvb, 0, -1, ENC_BIG_ENDIAN);
packetlogger_tree = proto_item_add_subtree (ti, ett_packetlogger);
pl_type = tvb_get_guint8 (tvb, 0);
proto_tree_add_item (packetlogger_tree, hf_type, tvb, 0, 1, FALSE);
proto_tree_add_item (packetlogger_tree, hf_type, tvb, 0, 1, ENC_BIG_ENDIAN);
proto_item_append_text (ti, " %s", val_to_str (pl_type, type_vals, "Unknown 0x%02x"));
len = tvb_length_remaining (tvb, 1);
@ -125,7 +125,7 @@ static void dissect_packetlogger (tvbuff_t *tvb, packet_info *pinfo, proto_tree
case PKT_POWER:
case PKT_NOTE:
case PKT_NEW_CONTROLLER:
proto_tree_add_item (packetlogger_tree, hf_info, next_tvb, 0, len, FALSE);
proto_tree_add_item (packetlogger_tree, hf_info, next_tvb, 0, len, ENC_BIG_ENDIAN);
col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (next_tvb, 0, len));
break;
default:

View File

@ -203,7 +203,7 @@ static gboolean ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinf
if((session != NULL) && ((rinfo = (ros_info_t*)g_hash_table_lookup(protocol_table, oid)) != NULL)) {
if(tree){
item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, FALSE);
item = proto_tree_add_item(tree, *(rinfo->proto), tvb, 0, -1, ENC_BIG_ENDIAN);
ros_tree = proto_item_add_subtree(item, *(rinfo->ett_proto));
}
@ -1066,7 +1066,7 @@ dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
/* pinfo->private_data = ros_info; */
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_ros, tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_ros, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_ros);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ROS");

View File

@ -311,7 +311,7 @@ dissect_rpcap_error (tvbuff_t *tvb, packet_info *pinfo,
tvb_format_text_wsp (tvb, offset, len));
}
ti = proto_tree_add_item (parent_tree, hf_error, tvb, offset, len, FALSE);
ti = proto_tree_add_item (parent_tree, hf_error, tvb, offset, len, ENC_BIG_ENDIAN);
expert_add_info_format (pinfo, ti, PI_SEQUENCE, PI_NOTE,
"Error: %s", tvb_format_text_wsp (tvb, offset, len));
}
@ -328,15 +328,15 @@ dissect_rpcap_ifaddr (tvbuff_t *tvb, packet_info *pinfo,
guint32 ipv4;
guint16 af;
ti = proto_tree_add_item (parent_tree, hf_id, tvb, offset, 128, FALSE);
ti = proto_tree_add_item (parent_tree, hf_id, tvb, offset, 128, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_ifaddr);
af = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_if_af, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_if_af, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (af == AF_INET) {
proto_tree_add_item (tree, hf_if_port, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_if_port, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
ipv4 = tvb_get_ipv4 (tvb, offset);
@ -345,13 +345,13 @@ dissect_rpcap_ifaddr (tvbuff_t *tvb, packet_info *pinfo,
if (parent_item) {
proto_item_append_text (parent_item, ": %s", ipaddr);
}
proto_tree_add_item (tree, hf_if_ip, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_if_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_if_padding, tvb, offset, 120, FALSE);
proto_tree_add_item (tree, hf_if_padding, tvb, offset, 120, ENC_BIG_ENDIAN);
offset += 120;
} else {
ti = proto_tree_add_item (tree, hf_if_unknown, tvb, offset, 126, FALSE);
ti = proto_tree_add_item (tree, hf_if_unknown, tvb, offset, 126, ENC_BIG_ENDIAN);
if (af != AF_UNSPEC) {
expert_add_info_format (pinfo, ti, PI_UNDECODED, PI_CHAT,
"Unknown address family: %d", af);
@ -371,7 +371,7 @@ dissect_rpcap_findalldevs_ifaddr (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item *ti;
gint boffset = offset;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_ifaddr, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_findalldevs_ifaddr, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_findalldevs_ifaddr);
offset = dissect_rpcap_ifaddr (tvb, pinfo, tree, offset, hf_if_addr, ti);
@ -394,35 +394,35 @@ dissect_rpcap_findalldevs_if (tvbuff_t *tvb, packet_info *pinfo _U_,
guint16 namelen, desclen, naddr, i;
gint boffset = offset;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_if, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_findalldevs_if, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_findalldevs_if);
namelen = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_namelen, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_namelen, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
desclen = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_desclen, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_desclen, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (tree, hf_if_flags, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_if_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
naddr = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_naddr, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_naddr, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (namelen) {
proto_item_append_text (ti, ": %s", tvb_get_ephemeral_string (tvb, offset, namelen));
proto_tree_add_item (tree, hf_if_name, tvb, offset, namelen, FALSE);
proto_tree_add_item (tree, hf_if_name, tvb, offset, namelen, ENC_BIG_ENDIAN);
offset += namelen;
}
if (desclen) {
proto_tree_add_item (tree, hf_if_desc, tvb, offset, desclen, FALSE);
proto_tree_add_item (tree, hf_if_desc, tvb, offset, desclen, ENC_BIG_ENDIAN);
offset += desclen;
}
@ -449,7 +449,7 @@ dissect_rpcap_findalldevs_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item *ti;
guint16 i;
ti = proto_tree_add_item (parent_tree, hf_findalldevs_reply, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_findalldevs_reply, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_findalldevs_reply);
for (i = 0; i < no_devs; i++) {
@ -472,19 +472,19 @@ dissect_rpcap_filterbpf_insn (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_filterbpf_insn, tvb, offset, 8, FALSE);
ti = proto_tree_add_item (parent_tree, hf_filterbpf_insn, tvb, offset, 8, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_filterbpf_insn);
proto_tree_add_item (tree, hf_code, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_code, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (tree, hf_jt, tvb, offset, 1, FALSE);
proto_tree_add_item (tree, hf_jt, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item (tree, hf_jf, tvb, offset, 1, FALSE);
proto_tree_add_item (tree, hf_jf, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item (tree, hf_instr_value, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_instr_value, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
return offset;
@ -499,17 +499,17 @@ dissect_rpcap_filter (tvbuff_t *tvb, packet_info *pinfo,
proto_item *ti;
guint32 nitems, i;
ti = proto_tree_add_item (parent_tree, hf_filter, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_filter, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_filter);
proto_tree_add_item (tree, hf_filtertype, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_filtertype, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
nitems = tvb_get_ntohl (tvb, offset);
proto_tree_add_item (tree, hf_nitems, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_nitems, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
for (i = 0; i < nitems; i++) {
@ -531,22 +531,22 @@ dissect_rpcap_auth_request (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item *ti;
guint16 type, slen1, slen2;
ti = proto_tree_add_item (parent_tree, hf_auth_request, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_auth_request, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_auth_request);
type = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_auth_type, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_auth_type, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
slen1 = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_auth_slen1, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_auth_slen1, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
slen2 = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (tree, hf_auth_slen2, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_auth_slen2, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (type == RPCAP_RMTAUTH_NULL) {
@ -555,11 +555,11 @@ dissect_rpcap_auth_request (tvbuff_t *tvb, packet_info *pinfo _U_,
guint8 *username, *password;
username = tvb_get_ephemeral_string (tvb, offset, slen1);
proto_tree_add_item (tree, hf_auth_username, tvb, offset, slen1, FALSE);
proto_tree_add_item (tree, hf_auth_username, tvb, offset, slen1, ENC_BIG_ENDIAN);
offset += slen1;
password = tvb_get_ephemeral_string (tvb, offset, slen2);
proto_tree_add_item (tree, hf_auth_password, tvb, offset, slen2, FALSE);
proto_tree_add_item (tree, hf_auth_password, tvb, offset, slen2, ENC_BIG_ENDIAN);
offset += slen2;
proto_item_append_text (ti, " (%s/%s)", username, password);
@ -574,7 +574,7 @@ dissect_rpcap_open_request (tvbuff_t *tvb, packet_info *pinfo _U_,
gint len;
len = tvb_length_remaining (tvb, offset);
proto_tree_add_item (parent_tree, hf_open_request, tvb, offset, len, FALSE);
proto_tree_add_item (parent_tree, hf_open_request, tvb, offset, len, ENC_BIG_ENDIAN);
}
@ -585,14 +585,14 @@ dissect_rpcap_open_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_open_reply, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_open_reply, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_open_reply);
linktype = tvb_get_ntohl (tvb, offset);
proto_tree_add_item (tree, hf_linktype, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_linktype, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_tzoff, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_tzoff, tvb, offset, 4, ENC_BIG_ENDIAN);
}
@ -604,23 +604,23 @@ dissect_rpcap_startcap_request (tvbuff_t *tvb, packet_info *pinfo,
proto_item *ti, *field_ti;
guint16 flags;
ti = proto_tree_add_item (parent_tree, hf_startcap_request, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_startcap_request, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_startcap_request);
proto_tree_add_item (tree, hf_snaplen, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_snaplen, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_read_timeout, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_read_timeout, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
flags = tvb_get_ntohs (tvb, offset);
field_ti = proto_tree_add_uint_format (tree, hf_flags, tvb, offset, 2, flags, "Flags");
field_tree = proto_item_add_subtree (field_ti, ett_startcap_flags);
proto_tree_add_item (field_tree, hf_flags_promisc, tvb, offset, 2, FALSE);
proto_tree_add_item (field_tree, hf_flags_dgram, tvb, offset, 2, FALSE);
proto_tree_add_item (field_tree, hf_flags_serveropen, tvb, offset, 2, FALSE);
proto_tree_add_item (field_tree, hf_flags_inbound, tvb, offset, 2, FALSE);
proto_tree_add_item (field_tree, hf_flags_outbound, tvb, offset, 2, FALSE);
proto_tree_add_item (field_tree, hf_flags_promisc, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (field_tree, hf_flags_dgram, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (field_tree, hf_flags_serveropen, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (field_tree, hf_flags_inbound, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (field_tree, hf_flags_outbound, tvb, offset, 2, ENC_BIG_ENDIAN);
if (flags & 0x1F) {
gchar *flagstr = g_strdup_printf ("%s%s%s%s%s",
@ -636,7 +636,7 @@ dissect_rpcap_startcap_request (tvbuff_t *tvb, packet_info *pinfo,
}
offset += 2;
proto_tree_add_item (tree, hf_client_port, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_client_port, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
dissect_rpcap_filter (tvb, pinfo, tree, offset);
@ -650,16 +650,16 @@ dissect_rpcap_startcap_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_startcap_reply, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_startcap_reply, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_startcap_reply);
proto_tree_add_item (tree, hf_bufsize, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_bufsize, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_server_port, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_server_port, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_dummy, tvb, offset, 2, ENC_BIG_ENDIAN);
}
@ -670,19 +670,19 @@ dissect_rpcap_stats_reply (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *tree;
proto_item *ti;
ti = proto_tree_add_item (parent_tree, hf_stats_reply, tvb, offset, 16, FALSE);
ti = proto_tree_add_item (parent_tree, hf_stats_reply, tvb, offset, 16, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_stats_reply);
proto_tree_add_item (tree, hf_ifrecv, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_ifrecv, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_ifdrop, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_ifdrop, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_krnldrop, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_krnldrop, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item (tree, hf_srvcapt, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_srvcapt, tvb, offset, 4, ENC_BIG_ENDIAN);
}
@ -695,21 +695,21 @@ dissect_rpcap_sampling_request (tvbuff_t *tvb, packet_info *pinfo _U_,
guint32 value;
guint8 method;
ti = proto_tree_add_item (parent_tree, hf_sampling_request, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (parent_tree, hf_sampling_request, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_sampling_request);
method = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (tree, hf_sampling_method, tvb, offset, 1, FALSE);
proto_tree_add_item (tree, hf_sampling_method, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item (tree, hf_sampling_dummy1, tvb, offset, 1, FALSE);
proto_tree_add_item (tree, hf_sampling_dummy1, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item (tree, hf_sampling_dummy2, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_sampling_dummy2, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
value = tvb_get_ntohl (tvb, offset);
proto_tree_add_item (tree, hf_sampling_value, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_sampling_value, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
switch (method) {
@ -739,7 +739,7 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
guint caplen, len, frame_no;
gint reported_length_remaining;
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, FALSE);
ti = proto_tree_add_item (parent_tree, hf_packet, tvb, offset, 20, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_packet);
ts.secs = tvb_get_ntohl (tvb, offset);
@ -748,15 +748,15 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
offset += 8;
caplen = tvb_get_ntohl (tvb, offset);
ti = proto_tree_add_item (tree, hf_caplen, tvb, offset, 4, FALSE);
ti = proto_tree_add_item (tree, hf_caplen, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
len = tvb_get_ntohl (tvb, offset);
proto_tree_add_item (tree, hf_len, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_len, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
frame_no = tvb_get_ntohl (tvb, offset);
proto_tree_add_item (tree, hf_npkt, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_npkt, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_item_append_text (ti, ", Frame %u", frame_no);
@ -810,14 +810,14 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree)
col_clear(pinfo->cinfo, COL_INFO);
ti = proto_tree_add_item (top_tree, proto_rpcap, tvb, offset, -1, FALSE);
ti = proto_tree_add_item (top_tree, proto_rpcap, tvb, offset, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (ti, ett_rpcap);
proto_tree_add_item (tree, hf_version, tvb, offset, 1, FALSE);
proto_tree_add_item (tree, hf_version, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
msg_type = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (tree, hf_type, tvb, offset, 1, FALSE);
proto_tree_add_item (tree, hf_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
if (check_col (pinfo->cinfo, COL_INFO)) {
@ -829,13 +829,13 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree)
msg_value = tvb_get_ntohs (tvb, offset);
if (msg_type == RPCAP_MSG_ERROR) {
proto_tree_add_item (tree, hf_error_value, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_error_value, tvb, offset, 2, ENC_BIG_ENDIAN);
} else {
proto_tree_add_item (tree, hf_value, tvb, offset, 2, FALSE);
proto_tree_add_item (tree, hf_value, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
proto_tree_add_item (tree, hf_plen, tvb, offset, 4, FALSE);
proto_tree_add_item (tree, hf_plen, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;

View File

@ -792,7 +792,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
frag_msg, &rtse_frag_items, NULL, parent_tree);
}
if(parent_tree){
item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, FALSE);
item = proto_tree_add_item(parent_tree, proto_rtse, next_tvb ? next_tvb : tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_rtse);
}
if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) {

View File

@ -569,7 +569,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
pt_varbind = proto_item_add_subtree(pi_varbind,ett_varbind);
*label = '\0';
pi_name = proto_tree_add_item(pt_varbind,hf_snmp_objectname,tvb,name_offset,name_len,FALSE);
pi_name = proto_tree_add_item(pt_varbind,hf_snmp_objectname,tvb,name_offset,name_len,ENC_BIG_ENDIAN);
pt_name = proto_item_add_subtree(pi_name,ett_name);
/* fetch ObjectName and its relative oid_info */
@ -623,7 +623,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
}
}
pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,FALSE);
pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
expert_add_info_format(actx->pinfo, pi, PI_RESPONSE_CODE, PI_NOTE, "%s",note);
g_strlcpy (label, note, ITEM_LABEL_LENGTH);
goto set_label;
@ -640,7 +640,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
} else if (oid_left == 0) {
if (ber_class == BER_CLASS_UNI && tag == BER_UNI_TAG_NULL) {
/* unSpecified does not require an instance sub-id add the new value and get off the way! */
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
goto set_label;
} else {
proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have one instance sub-id this one has none");
@ -664,7 +664,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
if ( key_len == 0 && ber_class == BER_CLASS_UNI && tag == BER_UNI_TAG_NULL) {
/* unSpecified does not require an instance sub-id add the new value and get off the way! */
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
goto set_label;
}
@ -831,7 +831,7 @@ indexing_done:
if (oid_info_is_ok && oid_info->value_type) {
if (ber_class == BER_CLASS_UNI && tag == BER_UNI_TAG_NULL) {
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hf_snmp_unSpecified,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
} else {
/* Provide a tree_item to attach errors to, if needed. */
pi_value = pi_name;
@ -851,7 +851,7 @@ indexing_done:
}
if (format_error == BER_NO_ERROR)
pi_value = proto_tree_add_item(pt_varbind,oid_info->value_hfid,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,oid_info->value_hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
}
} else {
switch(ber_class|(tag<<4)) {
@ -927,7 +927,7 @@ indexing_done:
break;
}
pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,FALSE);
pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
if (format_error != BER_NO_ERROR) {
expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB");
}
@ -1051,7 +1051,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
/* first bit: engine id conformance */
if (len_remain<4) return offset;
conformance = ((tvb_get_guint8(tvb, offset)>>7) & 0x01);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, ENC_BIG_ENDIAN);
/* 4-byte enterprise number/name */
if (len_remain<4) return offset;
@ -1091,7 +1091,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_IPV4:
/* 4-byte IPv4 address */
if (len_remain==4) {
proto_tree_add_item(tree, hf_snmp_engineid_ipv4, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
offset+=4;
len_remain=0;
}
@ -1099,7 +1099,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_IPV6:
/* 16-byte IPv6 address */
if (len_remain==16) {
proto_tree_add_item(tree, hf_snmp_engineid_ipv6, tvb, offset, 16, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN);
offset+=16;
len_remain=0;
}
@ -1107,13 +1107,13 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_MACADDRESS:
/* See: https://supportforums.cisco.com/message/3010617#3010617 for details. */
if ((enterpriseid==9)&&(len_remain==7)) {
proto_tree_add_item(tree, hf_snmp_engineid_cisco_type, tvb, offset, 1, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_cisco_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
len_remain--;
}
/* 6-byte MAC address */
if (len_remain==6) {
proto_tree_add_item(tree, hf_snmp_engineid_mac, tvb, offset, 6, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_mac, tvb, offset, 6, ENC_BIG_ENDIAN);
offset+=6;
len_remain=0;
}
@ -1121,7 +1121,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
case SNMP_ENGINEID_FORMAT_TEXT:
/* max. 27-byte string, administratively assigned */
if (len_remain<=27) {
proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_text, tvb, offset, len_remain, ENC_BIG_ENDIAN);
offset+=len_remain;
len_remain=0;
}
@ -1132,7 +1132,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
proto_item_append_text(item, (enterpriseid==2021) ? ": UCD-SNMP Random" : ": Net-SNMP Random");
/* demystify: 4B random, 4B epoch seconds */
if (len_remain==8) {
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, 4, ENC_BIG_ENDIAN);
seconds = tvb_get_letohl(tvb, offset+4);
ts.secs = seconds;
ts.nsecs = 0;
@ -1148,7 +1148,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
default:
/* max. 27 bytes, administratively assigned or unknown format */
if (len_remain<=27) {
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, len_remain, FALSE);
proto_tree_add_item(tree, hf_snmp_engineid_data, tvb, offset, len_remain, ENC_BIG_ENDIAN);
offset+=len_remain;
len_remain=0;
}
@ -2854,7 +2854,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (tree) {
item = proto_tree_add_item(tree, proto, tvb, start_offset,
message_length, FALSE);
message_length, ENC_BIG_ENDIAN);
snmp_tree = proto_item_add_subtree(item, ett);
}
@ -3005,7 +3005,7 @@ dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMUX");
if (tree) {
item = proto_tree_add_item(tree, proto_smux, tvb, 0, -1, FALSE);
item = proto_tree_add_item(tree, proto_smux, tvb, 0, -1, ENC_BIG_ENDIAN);
smux_tree = proto_item_add_subtree(item, ett_smux);
}