summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-arp.c16
-rw-r--r--epan/dissectors/packet-dcerpc-nt.c40
-rw-r--r--epan/dissectors/packet-dcp.c210
-rw-r--r--epan/dissectors/packet-ndmp.c68
-rw-r--r--epan/proto.c14
5 files changed, 176 insertions, 172 deletions
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c
index 301b262a10..53c8eb5354 100644
--- a/epan/dissectors/packet-arp.c
+++ b/epan/dissectors/packet-arp.c
@@ -444,6 +444,8 @@ void check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Packet storm detected (%u packets in < %u ms)",
global_arp_detect_request_storm_packets,
global_arp_detect_request_storm_period);
+ PROTO_ITEM_SET_GENERATED(ti);
+
expert_add_info_format(pinfo, ti,
PI_SEQUENCE, PI_NOTE,
"ARP packet storm detected (%u packets in < %u ms)",
@@ -817,13 +819,13 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Add target address if target MAC address is neither a broadcast/
multicast address nor an all-zero address and if target IP address
isn't all zeroes. */
-
+
/* Do not add target address if the packet is a Request. According to the RFC,
target addresses in requests have no meaning */
-
+
ip = tvb_get_ipv4(tvb, tpa_offset);
mac = tvb_get_ptr(tvb, tha_offset, 6);
- if ((mac[0] & 0x01) == 0 && memcmp(mac, mac_allzero, 6) != 0 && ip != 0
+ if ((mac[0] & 0x01) == 0 && memcmp(mac, mac_allzero, 6) != 0 && ip != 0
&& ar_op != ARPOP_REQUEST)
add_ether_byip(ip, mac);
}
@@ -842,9 +844,9 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* ARP requests/replies with the same sender and target protocol
address are flagged as "gratuitous ARPs", i.e. ARPs sent out as,
in effect, an announcement that the machine has MAC address
- XX:XX:XX:XX:XX:XX and IPv4 address YY.YY.YY.YY. Requests are to
+ XX:XX:XX:XX:XX:XX and IPv4 address YY.YY.YY.YY. Requests are to
provoke complaints if some other machine has the same IPv4 address,
- replies are used to announce relocation of network address, like
+ replies are used to announce relocation of network address, like
in failover solutions. */
if (((ar_op == ARPOP_REQUEST) || (ar_op == ARPOP_REPLY)) && (memcmp(spa_val, tpa_val, ar_pln) == 0))
is_gratuitous = TRUE;
@@ -1092,7 +1094,7 @@ proto_register_arp(void)
"", HFILL }},
{ &hf_arp_packet_storm,
- { "", "arp.packet-storm-detected",
+ { "Packet storm detected", "arp.packet-storm-detected",
FT_NONE, BASE_NONE, NULL, 0x0,
"", HFILL }}
};
@@ -1104,7 +1106,7 @@ proto_register_arp(void)
};
module_t *arp_module;
-
+
proto_arp = proto_register_protocol("Address Resolution Protocol",
"ARP/RARP", "arp");
proto_register_field_array(proto_arp, hf, array_length(hf));
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c
index e7d794203e..09e9161d75 100644
--- a/epan/dissectors/packet-dcerpc-nt.c
+++ b/epan/dissectors/packet-dcerpc-nt.c
@@ -802,7 +802,7 @@ static int hf_nt_policy_close_frame = -1;
static gint ett_nt_policy_hnd = -1;
/* this function is used to dissect a "handle".
- * it will keep track of which frame a handle is opened from and in which
+ * it will keep track of which frame a handle is opened from and in which
* frame it is closed.
* normally, this function would be used for tracking 20 byte policy handles
* as used in dcerpc but it has shown VERY useful to also use it for tracking
@@ -925,18 +925,18 @@ dissect_nt_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
return offset;
}
-/* This function is called from PIDL generated dissectors to dissect a
+/* This function is called from PIDL generated dissectors to dissect a
* NT style policy handle (contect handle).
*
* param can be used to specify where policy handles are opened and closed
* by setting PARAM_VALUE to
* PIDL_POLHND_OPEN where the policy handle is opened/created
* PIDL_POLHND_CLOSE where it is closed.
- * This enables policy handle tracking so that when a policy handle is
+ * This enables policy handle tracking so that when a policy handle is
* dissected it will be so as an expansion showing which frame it was
* opened/closed in.
*
- * See conformance file for winreg (epan/dissectors/pidl/winreg.cnf)
+ * See conformance file for winreg (epan/dissectors/pidl/winreg.cnf)
* for examples.
*/
int
@@ -955,17 +955,17 @@ PIDL_dissect_policy_hnd(tvbuff_t *tvb, gint offset, packet_info *pinfo,
param&PIDL_POLHND_OPEN, param&PIDL_POLHND_CLOSE,
HND_TYPE_CTX_HANDLE);
- /* If this was an open/create and we dont yet have a policy name
+ /* If this was an open/create and we dont yet have a policy name
* then create one.
- * XXX We do not yet have the infrastructure to know the name of the
+ * XXX We do not yet have the infrastructure to know the name of the
* actual object so just show it as <...> for the time being.
*/
- if((param&PIDL_POLHND_OPEN)
+ if((param&PIDL_POLHND_OPEN)
&& !pinfo->fd->flags.visited
&& !di->conformant_run){
char *pol_name=NULL;
- pol_name=ep_strdup_printf("%s(<...>)", pinfo->dcerpc_procedure_name);
+ pol_name=ep_strdup_printf("%s(<...>)", pinfo->dcerpc_procedure_name);
dcerpc_smb_store_pol_name(&policy_hnd, pinfo, pol_name);
}
@@ -1653,57 +1653,57 @@ void dcerpc_smb_init(int proto_dcerpc)
NULL, 0x0, "Acct CTRL", HFILL }},
{ &hf_nt_acb_disabled,
- { "", "nt.acb.disabled", FT_BOOLEAN, 32,
+ { "Account disabled", "nt.acb.disabled", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_disabled), 0x0001,
"If this account is enabled or disabled", HFILL }},
{ &hf_nt_acb_homedirreq,
- { "", "nt.acb.homedirreq", FT_BOOLEAN, 32,
+ { "Home dir required", "nt.acb.homedirreq", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_homedirreq), 0x0002,
- "Is hom,edirs required for this account?", HFILL }},
+ "Is homedirs required for this account?", HFILL }},
{ &hf_nt_acb_pwnotreq,
- { "", "nt.acb.pwnotreq", FT_BOOLEAN, 32,
+ { "Password required", "nt.acb.pwnotreq", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_pwnotreq), 0x0004,
"If a password is required for this account?", HFILL }},
{ &hf_nt_acb_tempdup,
- { "", "nt.acb.tempdup", FT_BOOLEAN, 32,
+ { "Temporary duplicate account", "nt.acb.tempdup", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_tempdup), 0x0008,
"If this is a temporary duplicate account", HFILL }},
{ &hf_nt_acb_normal,
- { "", "nt.acb.normal", FT_BOOLEAN, 32,
+ { "Normal user account", "nt.acb.normal", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_normal), 0x0010,
"If this is a normal user account", HFILL }},
{ &hf_nt_acb_mns,
- { "", "nt.acb.mns", FT_BOOLEAN, 32,
+ { "MNS logon user account", "nt.acb.mns", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_mns), 0x0020,
"MNS logon user account", HFILL }},
{ &hf_nt_acb_domtrust,
- { "", "nt.acb.domtrust", FT_BOOLEAN, 32,
+ { "Interdomain trust account", "nt.acb.domtrust", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_domtrust), 0x0040,
"Interdomain trust account", HFILL }},
{ &hf_nt_acb_wstrust,
- { "", "nt.acb.wstrust", FT_BOOLEAN, 32,
+ { "Workstation trust account", "nt.acb.wstrust", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_wstrust), 0x0080,
"Workstation trust account", HFILL }},
{ &hf_nt_acb_svrtrust,
- { "", "nt.acb.svrtrust", FT_BOOLEAN, 32,
+ { "Server trust account", "nt.acb.svrtrust", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_svrtrust), 0x0100,
"Server trust account", HFILL }},
{ &hf_nt_acb_pwnoexp,
- { "", "nt.acb.pwnoexp", FT_BOOLEAN, 32,
+ { "Password expires", "nt.acb.pwnoexp", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_pwnoexp), 0x0200,
"If this account expires or not", HFILL }},
{ &hf_nt_acb_autolock,
- { "", "nt.acb.autolock", FT_BOOLEAN, 32,
+ { "Account is autolocked", "nt.acb.autolock", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_autolock), 0x0400,
"If this account has been autolocked", HFILL }},
diff --git a/epan/dissectors/packet-dcp.c b/epan/dissectors/packet-dcp.c
index fb6184dd42..fa21a3861e 100644
--- a/epan/dissectors/packet-dcp.c
+++ b/epan/dissectors/packet-dcp.c
@@ -1,9 +1,9 @@
/* packet-dcp.c
- * Routines for Datagram Congestion Control Protocol, "DCCP" dissection:
+ * Routines for Datagram Congestion Control Protocol, "DCCP" dissection:
* it should be conformance to draft-ietf-dccp-spec-11.txt
*
* Copyright 2005 _FF_
- *
+ *
* Francesco Fondelli <francesco dot fondelli, gmail dot com>
*
* $Id$
@@ -13,31 +13,31 @@
* Copyright 1998 Gerald Combs
*
* Copied from packet-udp.c
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/* NOTES:
+/* NOTES:
*
- * PROTOABBREV name collision problem, 'dccp' is used by
+ * PROTOABBREV name collision problem, 'dccp' is used by
* Distributed Checksum Clearinghouse Protocol.
* This dissector should be named packet-dccp.c IMHO.
*
* Nov 13, 2006: makes checksum computation dependent
- * upon the header CsCov field (cf. RFC 4340, 5.1)
+ * upon the header CsCov field (cf. RFC 4340, 5.1)
* (Gerrit Renker)
*
* Nov 13, 2006: removes the case where checksums are zero
@@ -235,7 +235,7 @@ decode_dccp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tre
will always pick the right port number.
XXX - we ignore port numbers of 0, as some dissectors use a port
number of 0 to disable the port. */
-
+
if (sport > dport) {
low_port = dport;
high_port = sport;
@@ -275,18 +275,18 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
int offset=offset_start;
guint8 option_type = 0;
guint8 option_len = 0;
- guint8 feature_number = 0;
+ guint8 feature_number = 0;
int i;
proto_item *dcp_item = NULL;
-
+
while( offset < offset_end ) {
-
+
/* DBG("offset==%d\n", offset); */
/* first byte is the option type */
option_type = tvb_get_guint8(tvb, offset);
proto_tree_add_uint_hidden(dcp_options_tree, hf_dcp_option_type, tvb, offset, 1, option_type);
-
+
if (option_type >= 32) { /* variable length options */
if(!tvb_bytes_exist(tvb, offset, 1)) {
@@ -296,13 +296,13 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
}
option_len = tvb_get_guint8(tvb, offset + 1);
-
+
if (option_len < 2) {
/* DBG("malformed\n"); */
proto_tree_add_boolean_hidden(dcp_options_tree, hf_dcp_malformed, tvb, offset, 0, TRUE);
THROW(ReportedBoundsError);
}
-
+
if(!tvb_bytes_exist(tvb, offset, option_len)) {
/* DBG("malformed\n"); */
proto_tree_add_boolean_hidden(dcp_options_tree, hf_dcp_malformed, tvb, offset, 0, TRUE);
@@ -312,9 +312,9 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
} else { /* 1byte options */
option_len = 1;
}
-
+
switch (option_type) {
-
+
case 0:
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Padding");
break;
@@ -330,10 +330,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 32:
feature_number = tvb_get_guint8(tvb, offset + 2);
proto_tree_add_uint_hidden(dcp_options_tree, hf_dcp_feature_number, tvb, offset + 2, 1, feature_number);
-
+
if( (feature_number < 10) && (feature_number!=0) ) {
- dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
- "Change L(%s",
+ dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ "Change L(%s",
val_to_str(feature_number, dcp_feature_numbers_vals, "Unknown Type"));
for (i = 0; i < option_len - 3; i++) {
if(i==0)
@@ -344,10 +344,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
proto_item_append_text(dcp_item, ")");
} else {
if(((feature_number>=10)&&(feature_number<=127))||(feature_number==0))
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Change L(Reserved feature number)");
else
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Change L(CCID-specific features)");
}
break;
@@ -355,10 +355,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 33:
feature_number = tvb_get_guint8(tvb, offset + 2);
proto_tree_add_uint_hidden(dcp_options_tree, hf_dcp_feature_number, tvb, offset + 2, 1, feature_number);
-
+
if( (feature_number < 10) && (feature_number!=0) ) {
- dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
- "Confirm L(%s",
+ dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ "Confirm L(%s",
val_to_str(feature_number, dcp_feature_numbers_vals, "Unknown Type"));
for (i = 0; i < option_len - 3; i++) {
if(i==0)
@@ -369,10 +369,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
proto_item_append_text(dcp_item, ")");
} else {
if(((feature_number>=10)&&(feature_number<=127))||(feature_number==0))
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Confirm L(Reserved feature number)");
else
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Confirm L(CCID-specific features)");
}
break;
@@ -380,10 +380,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 34:
feature_number = tvb_get_guint8(tvb, offset + 2);
proto_tree_add_uint_hidden(dcp_options_tree, hf_dcp_feature_number, tvb, offset + 2, 1, feature_number);
-
+
if( (feature_number < 10) && (feature_number!=0) ) {
- dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
- "Change R(%s",
+ dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ "Change R(%s",
val_to_str(feature_number, dcp_feature_numbers_vals, "Unknown Type"));
for (i = 0; i < option_len - 3; i++) {
if(i==0)
@@ -394,10 +394,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
proto_item_append_text(dcp_item, ")");
} else {
if(((feature_number>=10)&&(feature_number<=127))||(feature_number==0))
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Change R(Reserved feature number)");
else
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Change R(CCID-specific features)");
}
break;
@@ -405,10 +405,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 35:
feature_number = tvb_get_guint8(tvb, offset + 2);
proto_tree_add_uint_hidden(dcp_options_tree, hf_dcp_feature_number, tvb, offset + 2, 1, feature_number);
-
+
if( (feature_number < 10) && (feature_number!=0) ) {
- dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
- "Confirm R(%s",
+ dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ "Confirm R(%s",
val_to_str(feature_number, dcp_feature_numbers_vals, "Unknown Type"));
for (i = 0; i < option_len - 3; i++) {
if(i==0)
@@ -419,17 +419,17 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
proto_item_append_text(dcp_item, ")");
} else {
if(((feature_number>=10)&&(feature_number<=127))||(feature_number==0))
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Confirm R(Reserved feature number)");
else
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Confirm R(CCID-specific features)");
}
break;
case 36:
dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Init Cookie(");
- for (i = 0; i < option_len - 2; i++) {
+ for (i = 0; i < option_len - 2; i++) {
if(i==0)
proto_item_append_text(dcp_item, "%02x", tvb_get_guint8(tvb, offset + 2 + i));
else
@@ -440,22 +440,22 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 37:
if(option_len==3)
- proto_tree_add_uint(dcp_options_tree, hf_dcp_ndp_count, tvb, offset + 2, 1,
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_ndp_count, tvb, offset + 2, 1,
tvb_get_guint8(tvb, offset + 2));
else if (option_len==4)
- proto_tree_add_uint(dcp_options_tree, hf_dcp_ndp_count, tvb, offset + 2, 2,
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_ndp_count, tvb, offset + 2, 2,
tvb_get_ntohs(tvb, offset + 2));
else if (option_len==5)
- proto_tree_add_uint(dcp_options_tree, hf_dcp_ndp_count, tvb, offset + 2, 3,
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_ndp_count, tvb, offset + 2, 3,
tvb_get_ntoh24(tvb, offset + 2));
else
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "NDP Count too long (max 3 bytes)");
-
+
break;
case 38:
dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Ack Vector0(");
- for (i = 0; i < option_len - 2; i++) {
+ for (i = 0; i < option_len - 2; i++) {
if(i==0)
proto_item_append_text(dcp_item, "%02x", tvb_get_guint8(tvb, offset + 2 + i));
else
@@ -466,7 +466,7 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 39:
dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Ack Vector1(");
- for (i = 0; i < option_len - 2; i++) {
+ for (i = 0; i < option_len - 2; i++) {
if(i==0)
proto_item_append_text(dcp_item, "%02x", tvb_get_guint8(tvb, offset + 2 + i));
else
@@ -477,7 +477,7 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 40:
dcp_item = proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Data Dropped(");
- for (i = 0; i < option_len - 2; i++) {
+ for (i = 0; i < option_len - 2; i++) {
if(i==0)
proto_item_append_text(dcp_item, "%02x", tvb_get_guint8(tvb, offset + 2 + i));
else
@@ -488,10 +488,10 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 41:
if(option_len==6)
- proto_tree_add_uint(dcp_options_tree, hf_dcp_timestamp, tvb, offset + 2, 4,
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_timestamp, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
else
- proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
+ proto_tree_add_text(dcp_options_tree, tvb, offset, option_len,
"Timestamp too long [%u != 6]", option_len);
break;
@@ -502,14 +502,14 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
else if (option_len==8) {
proto_tree_add_uint(dcp_options_tree, hf_dcp_timestamp_echo, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
-
+
proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 6, 2,
tvb_get_ntohs(tvb, offset + 6));
} else if (option_len==10) {
proto_tree_add_uint(dcp_options_tree, hf_dcp_timestamp_echo, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
-
- proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 6, 4,
+
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 6, 4,
tvb_get_ntohl(tvb, offset + 6));
} else
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Wrong Timestamp Echo length");
@@ -519,8 +519,8 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
if(option_len==4)
proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 2, 2,
tvb_get_ntohs(tvb, offset + 2));
- else if (option_len==6)
- proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 2, 4,
+ else if (option_len==6)
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
else
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Wrong Elapsed Time length");
@@ -528,14 +528,14 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
case 44:
if(option_len==6) {
- proto_tree_add_uint(dcp_options_tree, hf_dcp_data_checksum, tvb, offset + 2, 4,
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_data_checksum, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
} else
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Wrong Data checksum length");
break;
-
+
default :
- if(((option_type >= 45) && (option_type <= 127)) ||
+ if(((option_type >= 45) && (option_type <= 127)) ||
((option_type >= 3) && (option_type <= 31))) {
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Reserved");
break;
@@ -545,7 +545,7 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "CCID option %d", option_type);
break;
}
-
+
/* if here we don't know this option */
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Unknown");
break;
@@ -560,7 +560,7 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
static inline guint dccp_csum_coverage(const e_dcphdr *dcph, guint len)
{
guint cov;
-
+
if (dcph->cscov == 0)
return len;
cov = (dcph->data_offset + dcph->cscov - 1) * sizeof(guint32);
@@ -582,7 +582,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint advertised_dccp_header_len = 0;
guint options_len = 0;
e_dcphdr *dcph;
-
+
/* get at least a full message header */
if(!tvb_bytes_exist(tvb, 0, DCCP_HDR_LEN_MIN)) {
/* DBG("malformed\n"); */
@@ -599,12 +599,12 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&dcph->ip_src, pinfo->src.type, pinfo->src.len, pinfo->src.data);
SET_ADDRESS(&dcph->ip_dst, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
-
+
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DCCP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
-
+
/* Extract generic header */
dcph->sport=tvb_get_ntohs(tvb, offset);
/* DBG("dcph->sport: %d\n", dcph->sport); */
@@ -651,18 +651,18 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dcph->seq+=tvb_get_ntohs(tvb, offset+10);
/* DBG("dcph->seq[24bits]: %llu\n", dcph->seq); */
}
-
+
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s > %s [%s] Seq=%" PRIu64,
get_dccp_port(dcph->sport),
get_dccp_port(dcph->dport),
val_to_str(dcph->type, dcp_packet_type_vals, "Unknown Type"),
dcph->seq);
-
-
+
+
if (tree) {
if(dcp_summary_in_tree) {
- dcp_item =
+ dcp_item =
proto_tree_add_protocol_format(tree, proto_dcp, tvb, offset, dcph->data_offset*4,
"Datagram Congestion Control Protocol, Src Port: %s (%u), Dst Port: %s (%u)"
" [%s] Seq=%" PRIu64,
@@ -675,7 +675,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
dcp_tree = proto_item_add_subtree(dcp_item, ett_dcp);
-
+
proto_tree_add_uint_format_value(dcp_tree, hf_dcp_srcport, tvb, offset, 2, dcph->sport,
"%s (%u)", get_dccp_port(dcph->sport), dcph->sport);
proto_tree_add_uint_format_value(dcp_tree, hf_dcp_dstport, tvb, offset + 2, 2, dcph->dport,
@@ -683,13 +683,13 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_port, tvb, offset, 2, dcph->sport);
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_port, tvb, offset + 2, 2, dcph->dport);
-
+
proto_tree_add_uint(dcp_tree, hf_dcp_data_offset, tvb, offset + 4, 1, dcph->data_offset);
proto_tree_add_uint(dcp_tree, hf_dcp_ccval, tvb, offset + 5, 1, dcph->ccval);
proto_tree_add_uint(dcp_tree, hf_dcp_cscov, tvb, offset + 5, 1, dcph->cscov);
-
+
/* checksum analysis taken from packet-udp (difference: mandatory checksums in DCCP) */
-
+
reported_len = tvb_reported_length(tvb);
len = tvb_length(tvb);
if (!pinfo->fragmented && len >= reported_len) {
@@ -700,7 +700,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
reassembly? */
if (dccp_check_checksum) {
-
+
/* Set up the fields of the pseudo-header. */
cksum_vec[0].ptr = pinfo->src.data;
cksum_vec[0].len = pinfo->src.len;
@@ -708,7 +708,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
switch (pinfo->src.type) {
-
+
case AT_IPv4:
phdr[0] = g_htonl((IP_PROTO_DCCP<<16) + reported_len);
cksum_vec[2].len = 4;
@@ -718,7 +718,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
phdr[1] = g_htonl(IP_PROTO_DCCP);
cksum_vec[2].len = 8;
break;
-
+
default:
/* DCCP runs only atop IPv4 and IPv6.... */
/*DISSECTOR_ASSERT_NOT_REACHED();*/
@@ -729,7 +729,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
computed_cksum = in_cksum(&cksum_vec[0], 4);
if (computed_cksum == 0) {
proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
- offset + 6, 2, dcph->checksum,
+ offset + 6, 2, dcph->checksum,
"0x%04x [correct]", dcph->checksum);
} else {
proto_tree_add_boolean_hidden(dcp_tree, hf_dcp_checksum_bad, tvb, offset + 6, 2, TRUE);
@@ -738,14 +738,14 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
in_cksum_shouldbe(dcph->checksum, computed_cksum));
}
} else {
- proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
offset + 6, 2, dcph->checksum, "0x%04x", dcph->checksum);
}
} else {
- proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
+ proto_tree_add_uint_format_value(dcp_tree, hf_dcp_checksum, tvb,
offset + 6, 2, dcph->checksum, "0x%04x", dcph->checksum);
}
-
+
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_res1, tvb, offset + 8, 1, dcph->reserved1);
proto_tree_add_uint(dcp_tree, hf_dcp_type, tvb, offset + 8, 1, dcph->type);
proto_tree_add_boolean(dcp_tree, hf_dcp_x, tvb, offset + 8, 1, dcph->x);
@@ -754,18 +754,18 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint64(dcp_tree, hf_dcp_seq, tvb, offset + 10, 6, dcph->seq);
} else {
proto_tree_add_uint64(dcp_tree, hf_dcp_seq, tvb, offset + 9, 3, dcph->seq);
-
+
}
- }
+ }
if(dcph->x)
offset+=16; /* Skip over extended Generic header */
else
offset+=12; /* Skip over not extended Generic header */
-
+
/* dissecting type depending additional fields */
switch(dcph->type) {
-
+
case 0x0: /* DCCP-Request */
if(!tvb_bytes_exist(tvb, offset, 4)) { /* at least 4 byte */
if(tree)
@@ -790,15 +790,15 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dcph->ack_reserved=tvb_get_ntohs(tvb, offset);
if(tree)
proto_tree_add_uint_hidden(dcp_tree, hf_dcp_ack_res, tvb, offset, 2, dcph->ack_reserved);
- dcph->ack=tvb_get_ntohs(tvb, offset+2);
- dcph->ack<<=32;
+ dcph->ack=tvb_get_ntohs(tvb, offset+2);
+ dcph->ack<<=32;
dcph->ack+=tvb_get_ntohl(tvb, offset+4);
-
+
if(tree)
proto_tree_add_uint64(dcp_tree, hf_dcp_ack, tvb, offset + 2, 6, dcph->ack);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" PRIu64 ")", dcph->ack);
-
+
offset+=8; /* Skip over Acknowledgement Number Subheader */
if(!tvb_bytes_exist(tvb, offset, 4)) { /* at least 4 byte */
@@ -818,7 +818,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case 0x2: /* DCCP-Data */
/* nothing to dissect */
break;
-
+
case 0x3: /* DCCP-Ack */
case 0x4: /* DCCP-DataAck */
if(dcph->x) {
@@ -878,7 +878,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" PRIu64 ")", dcph->ack);
offset+=8; /* Skip over Acknowledgement Number Subheader */
-
+
dcph->reset_code=tvb_get_guint8(tvb, offset);
dcph->data1=tvb_get_guint8(tvb, offset+1);
dcph->data2=tvb_get_guint8(tvb, offset+2);
@@ -891,7 +891,7 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " (code=%s)", val_to_str(dcph->reset_code, dcp_reset_code_vals, "Unknown"));
-
+
offset+=4; /* Skip over Reset Code and data123 */
break;
@@ -924,45 +924,45 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
break;
}
-
-
+
+
/* note: data_offset is the offset from the start of the packet's DCCP header to the
- * start of its application data area, in 32-bit words.
+ * start of its application data area, in 32-bit words.
*/
-
+
/* it's time to do some checks */
advertised_dccp_header_len = dcph->data_offset*4;
options_len = advertised_dccp_header_len - offset;
-
+
if ( advertised_dccp_header_len > DCCP_HDR_LEN_MAX ) {
if(tree)
- proto_tree_add_text(dcp_tree, tvb, 4, 2,
+ proto_tree_add_text(dcp_tree, tvb, 4, 2,
"bogus data offset, advertised header length (%d) is larger than max (%d)",
advertised_dccp_header_len, DCCP_HDR_LEN_MAX);
return;
}
-
+
if(!tvb_bytes_exist(tvb, 0, advertised_dccp_header_len)) {
if(tree)
- proto_tree_add_text(dcp_tree, tvb, offset, -1, "too short packet: missing %d bytes of DCCP header",
+ proto_tree_add_text(dcp_tree, tvb, offset, -1, "too short packet: missing %d bytes of DCCP header",
advertised_dccp_header_len - tvb_reported_length_remaining(tvb, offset));
return;
}
-
+
if(options_len > DCCP_OPT_LEN_MAX) {
/* DBG("malformed\n"); */
if(tree)
proto_tree_add_boolean_hidden(dcp_tree, hf_dcp_malformed, tvb, offset, 0, TRUE);
THROW(ReportedBoundsError);
}
-
-
- /* Dissecting Options (if here we have at least (advertised_dccp_header_len - offset) bytes of options) */
+
+
+ /* Dissecting Options (if here we have at least (advertised_dccp_header_len - offset) bytes of options) */
if(advertised_dccp_header_len == offset) {
; /* ok no options, no need to skip over */
} else if (advertised_dccp_header_len < offset) {
if(tree) {
- proto_tree_add_text(dcp_tree, tvb, 4, 2,
+ proto_tree_add_text(dcp_tree, tvb, 4, 2,
"bogus data offset, advertised header length (%d) is shorter than expected",
advertised_dccp_header_len);
proto_tree_add_boolean_hidden(dcp_tree, hf_dcp_malformed, tvb, offset, 0, TRUE);
@@ -975,12 +975,12 @@ static void dissect_dcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
dissect_options(tvb, pinfo, dcp_options_tree, tree, dcph, offset, offset + options_len);
}
-
- offset+=options_len; /* Skip over Options */
-
+
+ offset+=options_len; /* Skip over Options */
+
/* Queuing tap data */
tap_queue_packet(dccp_tap, pinfo, dcph);
-
+
/* Call sub-dissectors */
if (!pinfo->in_error_pkt || tvb_length_remaining(tvb, offset) > 0)
@@ -1020,7 +1020,7 @@ void proto_register_dcp(void)
{ &hf_dcp_checksum_bad,
{ "Bad Checksum", "dcp.checksum_bad", FT_BOOLEAN, BASE_DEC, NULL, 0x0,
"", HFILL }},
-
+
{ &hf_dcp_checksum,
{ "Checksum", "dcp.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
"", HFILL }},
@@ -1102,7 +1102,7 @@ void proto_register_dcp(void)
"", HFILL }},
{ &hf_dcp_malformed,
- { "", "dcp.malformed", FT_BOOLEAN, BASE_DEC, NULL, 0x0,
+ { "Malformed", "dcp.malformed", FT_BOOLEAN, BASE_DEC, NULL, 0x0,
"", HFILL }},
{ &hf_dcp_options,
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c
index eec2c5427e..2410bc2bf4 100644
--- a/epan/dissectors/packet-ndmp.c
+++ b/epan/dissectors/packet-ndmp.c
@@ -1241,14 +1241,14 @@ dissect_execute_cdb_payload(tvbuff_t *tvb, int offset, packet_info *pinfo, proto
data_tvb=tvb_new_subset(tvb, offset, tvb_len, tvb_rlen);
if(ndmp_conv_data->task->itlq){
- /* ndmp conceptually always send both read and write
+ /* ndmp conceptually always send both read and write
* data and always a full nonfragmented pdu
*/
ndmp_conv_data->task->itlq->task_flags=SCSI_DATA_READ|SCSI_DATA_WRITE;
ndmp_conv_data->task->itlq->data_length=payload_len;
ndmp_conv_data->task->itlq->bidir_data_length=payload_len;
dissect_scsi_payload(data_tvb, pinfo, top_tree, isreq,
- ndmp_conv_data->task->itlq,
+ ndmp_conv_data->task->itlq,
get_itl_nexus(ndmp_conv_data, pinfo, FALSE),
0);
}
@@ -3187,39 +3187,39 @@ proto_register_ndmp(void)
NULL, 0, "Default Env's for this Butype Info", HFILL }},
{ &hf_ndmp_butype_attr_backup_file_history, {
- "", "ndmp.butype.attr.backup_file_history", FT_BOOLEAN, 32,
+ "Backup file history", "ndmp.butype.attr.backup_file_history", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_backup_file_history), 0x00000001, "backup_file_history", HFILL }},
{ &hf_ndmp_butype_attr_backup_filelist, {
- "", "ndmp.butype.attr.backup_filelist", FT_BOOLEAN, 32,
+ "Backup file list", "ndmp.butype.attr.backup_filelist", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_backup_filelist), 0x00000002, "backup_filelist", HFILL }},
{ &hf_ndmp_butype_attr_recover_filelist, {
- "", "ndmp.butype.attr.recover_filelist", FT_BOOLEAN, 32,
+ "Recover file list", "ndmp.butype.attr.recover_filelist", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_recover_filelist), 0x00000004, "recover_filelist", HFILL }},
{ &hf_ndmp_butype_attr_backup_direct, {
- "", "ndmp.butype.attr.backup_direct", FT_BOOLEAN, 32,
+ "Backup direct", "ndmp.butype.attr.backup_direct", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_backup_direct), 0x00000008, "backup_direct", HFILL }},
{ &hf_ndmp_butype_attr_recover_direct, {
- "", "ndmp.butype.attr.recover_direct", FT_BOOLEAN, 32,
+ "Recover direct", "ndmp.butype.attr.recover_direct", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_recover_direct), 0x00000010, "recover_direct", HFILL }},
{ &hf_ndmp_butype_attr_backup_incremental, {
- "", "ndmp.butype.attr.backup_incremental", FT_BOOLEAN, 32,
+ "Backup incremental", "ndmp.butype.attr.backup_incremental", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_backup_incremental), 0x00000020, "backup_incremental", HFILL }},
{ &hf_ndmp_butype_attr_recover_incremental, {
- "", "ndmp.butype.attr.recover_incremental", FT_BOOLEAN, 32,
+ "Recover incremental", "ndmp.butype.attr.recover_incremental", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_recover_incremental), 0x00000040, "recover_incremental", HFILL }},
{ &hf_ndmp_butype_attr_backup_utf8, {
- "", "ndmp.butype.attr.backup_utf8", FT_BOOLEAN, 32,
+ "Backup UTF8", "ndmp.butype.attr.backup_utf8", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_backup_utf8), 0x00000080, "backup_utf8", HFILL }},
{ &hf_ndmp_butype_attr_recover_utf8, {
- "", "ndmp.butype.attr.recover_utf8", FT_BOOLEAN, 32,
+ "Recover UTF8", "ndmp.butype.attr.recover_utf8", FT_BOOLEAN, 32,
TFS(&tfs_butype_attr_recover_utf8), 0x00000100, "recover_utf8", HFILL }},
{ &hf_ndmp_butype_env_name, {
@@ -3243,23 +3243,23 @@ proto_register_ndmp(void)
NULL, 0, "FS Info", HFILL }},
{ &hf_ndmp_fs_invalid_total_size, {
- "", "ndmp.fs.invalid.total_size", FT_BOOLEAN, 32,
+ "Total size invalid", "ndmp.fs.invalid.total_size", FT_BOOLEAN, 32,
TFS(&tfs_fs_invalid_total_size), 0x00000001, "If total size is invalid", HFILL }},
{ &hf_ndmp_fs_invalid_used_size, {
- "", "ndmp.fs.invalid.used_size", FT_BOOLEAN, 32,
+ "Used size invalid", "ndmp.fs.invalid.used_size", FT_BOOLEAN, 32,
TFS(&tfs_fs_invalid_used_size), 0x00000002, "If used size is invalid", HFILL }},
{ &hf_ndmp_fs_invalid_avail_size, {
- "", "ndmp.fs.invalid.avail_size", FT_BOOLEAN, 32,
+ "Available size invalid", "ndmp.fs.invalid.avail_size", FT_BOOLEAN, 32,
TFS(&tfs_fs_invalid_avail_size), 0x00000004, "If available size is invalid", HFILL }},
{ &hf_ndmp_fs_invalid_total_inodes, {
- "", "ndmp.fs.invalid.total_inodes", FT_BOOLEAN, 32,
+ "Total number of inodes invalid", "ndmp.fs.invalid.total_inodes", FT_BOOLEAN, 32,
TFS(&tfs_fs_invalid_total_inodes), 0x00000008, "If total number of inodes is invalid", HFILL }},
{ &hf_ndmp_fs_invalid_used_inodes, {
- "", "ndmp.fs.invalid.used_inodes", FT_BOOLEAN, 32,
+ "Used number of inodes is invalid", "ndmp.fs.invalid.used_inodes", FT_BOOLEAN, 32,
TFS(&tfs_fs_invalid_used_inodes), 0x00000010, "If used number of inodes is invalid", HFILL }},
{ &hf_ndmp_fs_fs_type, {
@@ -3327,11 +3327,11 @@ proto_register_ndmp(void)
NULL, 0, "Name of TAPE Device", HFILL }},
{ &hf_ndmp_tape_attr_rewind, {
- "", "ndmp.tape.attr.rewind", FT_BOOLEAN, 32,
+ "Device supports rewind", "ndmp.tape.attr.rewind", FT_BOOLEAN, 32,
TFS(&tfs_tape_attr_rewind), 0x00000001, "If this device supports rewind", HFILL }},
{ &hf_ndmp_tape_attr_unload, {
- "", "ndmp.tape.attr.unload", FT_BOOLEAN, 32,
+ "Device supports unload", "ndmp.tape.attr.unload", FT_BOOLEAN, 32,
TFS(&tfs_tape_attr_unload), 0x00000002, "If this device supports unload", HFILL }},
{ &hf_ndmp_tape_capability, {
@@ -3431,47 +3431,47 @@ proto_register_ndmp(void)
VALS(tape_open_mode_vals), 0, "Mode to open tape in", HFILL }},
{ &hf_ndmp_tape_invalid_file_num, {
- "", "ndmp.tape.invalid.file_num", FT_BOOLEAN, 32,
+ "Invalid file num", "ndmp.tape.invalid.file_num", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_file_num), 0x00000001, "invalid_file_num", HFILL }},
{ &hf_ndmp_tape_invalid_soft_errors, {
- "", "ndmp.tape.invalid.soft_errors", FT_BOOLEAN, 32,
+ "Soft errors", "ndmp.tape.invalid.soft_errors", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_soft_errors), 0x00000002, "soft_errors", HFILL }},
{ &hf_ndmp_tape_invalid_block_size, {
- "", "ndmp.tape.invalid.block_size", FT_BOOLEAN, 32,
+ "Block size", "ndmp.tape.invalid.block_size", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_block_size), 0x00000004, "block_size", HFILL }},
{ &hf_ndmp_tape_invalid_block_no, {
- "", "ndmp.tape.invalid.block_no", FT_BOOLEAN, 32,
+ "Block no", "ndmp.tape.invalid.block_no", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_block_no), 0x00000008, "block_no", HFILL }},
{ &hf_ndmp_tape_invalid_total_space, {
- "", "ndmp.tape.invalid.total_space", FT_BOOLEAN, 32,
+ "Total space", "ndmp.tape.invalid.total_space", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_total_space), 0x00000010, "total_space", HFILL }},
{ &hf_ndmp_tape_invalid_space_remain, {
- "", "ndmp.tape.invalid.space_remain", FT_BOOLEAN, 32,
+ "Space remain", "ndmp.tape.invalid.space_remain", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_space_remain), 0x00000020, "space_remain", HFILL }},
{ &hf_ndmp_tape_invalid_partition, {
- "", "ndmp.tape.invalid.partition", FT_BOOLEAN, 32,
+ "Invalid partition", "ndmp.tape.invalid.partition", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_invalid_partition), 0x00000040, "partition", HFILL }},
{ &hf_ndmp_tape_flags_no_rewind, {
- "", "ndmp.tape.flags.no_rewind", FT_BOOLEAN, 32,
+ "No rewind", "ndmp.tape.flags.no_rewind", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_flags_no_rewind), 0x00000008, "no_rewind", HFILL, }},
{ &hf_ndmp_tape_flags_write_protect, {
- "", "ndmp.tape.flags.write_protect", FT_BOOLEAN, 32,
+ "Write protect", "ndmp.tape.flags.write_protect", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_flags_write_protect), 0x00000010, "write_protect", HFILL, }},
{ &hf_ndmp_tape_flags_error, {
- "", "ndmp.tape.flags.error", FT_BOOLEAN, 32,
+ "Error", "ndmp.tape.flags.error", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_flags_error), 0x00000020, "error", HFILL, }},
{ &hf_ndmp_tape_flags_unload, {
- "", "ndmp.tape.flags.unload", FT_BOOLEAN, 32,
+ "Unload", "ndmp.tape.flags.unload", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_tape_flags_unload), 0x00000040, "unload", HFILL, }},
{ &hf_ndmp_tape_file_num, {
@@ -3655,15 +3655,15 @@ proto_register_ndmp(void)
NULL, 0, "FH Info used for direct access", HFILL }},
{ &hf_ndmp_file_invalid_atime, {
- "", "ndmp.file.invalid_atime", FT_BOOLEAN, 32,
+ "Invalid atime", "ndmp.file.invalid_atime", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_file_invalid_atime), 0x00000001, "invalid_atime", HFILL, }},
{ &hf_ndmp_file_invalid_ctime, {
- "", "ndmp.file.invalid_ctime", FT_BOOLEAN, 32,
+ "Invalid ctime", "ndmp.file.invalid_ctime", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_file_invalid_ctime), 0x00000002, "invalid_ctime", HFILL, }},
{ &hf_ndmp_file_invalid_group, {
- "", "ndmp.file.invalid_group", FT_BOOLEAN, 32,
+ "Invalid group", "ndmp.file.invalid_group", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_file_invalid_group), 0x00000004, "invalid_group", HFILL, }},
{ &hf_ndmp_file_mtime, {
@@ -3727,11 +3727,11 @@ proto_register_ndmp(void)
NULL, 0, "Other Name", HFILL }},
{ &hf_ndmp_state_invalid_ebr, {
- "", "ndmp.bu.state.invalid_ebr", FT_BOOLEAN, 32,
+ "EstimatedBytesLeft valid", "ndmp.bu.state.invalid_ebr", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_state_invalid_ebr), 0x00000001, "Whether EstimatedBytesLeft is valid or not", HFILL, }},
{ &hf_ndmp_state_invalid_etr, {
- "", "ndmp.bu.state.invalid_etr", FT_BOOLEAN, 32,
+ "EstimatedTimeLeft valid", "ndmp.bu.state.invalid_etr", FT_BOOLEAN, 32,
TFS(&tfs_ndmp_state_invalid_etr), 0x00000002, "Whether EstimatedTimeLeft is valid or not", HFILL, }},
{ &hf_ndmp_bu_operation, {
diff --git a/epan/proto.c b/epan/proto.c
index 17b02df793..9659b9718b 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -284,7 +284,7 @@ proto_init(void (register_all_protocols)(void),
{
static hf_register_info hf[] = {
{ &hf_text_only,
- { "", "", FT_NONE, BASE_NONE, NULL, 0x0,
+ { "Proto Init", "", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
};
@@ -3525,8 +3525,10 @@ proto_register_field_array(int parent, hf_register_info *hf, int num_records)
static int
proto_register_field_init(header_field_info *hfinfo, int parent)
{
- /* The field must have names */
- DISSECTOR_ASSERT(hfinfo->name);
+ /* The field must have a name (with length > 0) */
+ DISSECTOR_ASSERT(hfinfo->name && hfinfo->name[0]);
+
+ /* fields with an empty string for an abbreviation aren't filterable */
DISSECTOR_ASSERT(hfinfo->abbrev);
/* These types of fields are allowed to have value_strings, true_false_strings or a protocol_t struct*/
@@ -4027,7 +4029,7 @@ fill_label_enumerated_uint(field_info *fi, gchar *label_str)
/* Fill in the textual info */
if (hfinfo->display & BASE_RANGE_STRING) {
- ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
+ ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
format, hfinfo->name,
rval_to_str(value, hfinfo->strings, "Unknown"), value);
} else {
@@ -4101,7 +4103,7 @@ fill_label_enumerated_int(field_info *fi, gchar *label_str)
/* Fill in the textual info */
if (hfinfo->display & BASE_RANGE_STRING) {
- ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
+ ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
format, hfinfo->name,
rval_to_str(value, hfinfo->strings, "Unknown"), value);
} else {
@@ -5328,7 +5330,7 @@ proto_construct_match_selected_string(field_info *finfo, epan_dissect_t *edt)
* This array is terminated by a NULL entry.
*
* FT_BOOLEAN bits that are set to 1 will have the name added to the expansion.
- * FT_integer fields that have a value_string attached will have the
+ * FT_integer fields that have a value_string attached will have the
* matched string displayed on the expansion line.
*/
proto_item *