aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2005-05-16 23:21:01 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2005-05-16 23:21:01 +0000
commitd3cd8d93e805ca8dd0b685c08274b83655e1a748 (patch)
tree0688d96fd2300de6e4d1e4326d310760a0b19bf8
parentdc824440471d09b17fa71f39f7bbf64cb0d746b2 (diff)
Add get_hide() to return the value of the "hide" tag
in field attributes. svn path=/trunk/; revision=14379
-rw-r--r--tools/EtherealXML.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/EtherealXML.py b/tools/EtherealXML.py
index d75464e84f..b94ea48189 100644
--- a/tools/EtherealXML.py
+++ b/tools/EtherealXML.py
@@ -96,6 +96,7 @@ class ProtoTreeItem(PacketList):
self.size = xmlattrs.get("size", "")
self.value = xmlattrs.get("value", "")
self.show = xmlattrs.get("show", "")
+ self.hide = xmlattrs.get("hide", "")
def add_child(self, child):
self.children.append(child)
@@ -118,6 +119,9 @@ class ProtoTreeItem(PacketList):
def get_show(self):
return self.show
+ def get_hide(self):
+ return self.hide
+
def dump(self, fh):
if self.name:
print >> fh, " name=%s" % (saxutils.quoteattr(self.name),),
@@ -137,6 +141,9 @@ class ProtoTreeItem(PacketList):
if self.show:
print >> fh, "show=%s" % (saxutils.quoteattr(self.show),),
+ if self.hide:
+ print >> fh, "hide=%s" % (saxutils.quoteattr(self.hide),),
+
class Packet(ProtoTreeItem, PacketList):
def dump(self, fh, indent=0):
print >> fh, " " * indent, "<packet>"