Add support for common FT_ETHER cases.

Bugfix gauging where the "field text" argument when parsing the proto_tree_add_text call.

svn path=/trunk/; revision=50925
This commit is contained in:
Michael Mann 2013-07-26 18:30:10 +00:00
parent a7a2d51fae
commit 2675472389
1 changed files with 5 additions and 2 deletions

View File

@ -369,7 +369,8 @@ sub generate_hfs {
if (scalar @args > 5) {
if (($proto_tree_item[6] eq "1") ||
($args[5] =~ /tvb_get_guint8/) ||
($args[5] =~ /tvb_bytes_to_str/)) {
($args[5] =~ /tvb_bytes_to_str/) ||
($args[5] =~ /tvb_ether_to_str/)) {
$proto_tree_item[7] = "ENC_NA";
} elsif ($args[5] =~ /tvb_get_ntoh/) {
$proto_tree_item[7] = "ENC_BIG_ENDIAN";
@ -384,7 +385,7 @@ sub generate_hfs {
}
#Field name
if (($expert ne "") && (scalar @args > 5)) {
if (($expert ne "") || (scalar @args > 5)) {
my @arg_temp = split(/=|:/, $args[4]);
$proto_tree_item[8] = $arg_temp[0];
} else {
@ -458,6 +459,8 @@ sub generate_hfs {
$proto_tree_item[9] = "FT_STRING";
} elsif ($args[5] =~ /tvb_bytes_to_str/) {
$proto_tree_item[9] = "FT_BYTES";
} elsif ($args[5] =~ /tvb_ether_to_str/) {
$proto_tree_item[9] = "FT_ETHER";
}
}