summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2013-10-18 00:04:28 -0700
committerStefan Metzmacher <metze@samba.org>2014-10-23 23:12:05 +0200
commit93f262ee6d162bf007b79d2daf9de6c49c6163d1 (patch)
tree78fe45e8637f679622f083d0b5a7fb791dfeadda /pidl
parent3f6ca430b067705d556031d52736d5a5d5ae8f55 (diff)
downloadsamba-93f262ee6d162bf007b79d2daf9de6c49c6163d1.tar.gz
pidl-wireshark: generate ALIGN_TO_x_BYTES instructions if the element has the align_x flag
Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Wireshark/NDR.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 6bc03ccd9b9..7a81f5ca5a9 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -462,6 +462,12 @@ sub Element($$$$$)
BASE_TYPE => "BASE_NONE"
};
}
+ if (property_matches($e, "flag", ".*LIBNDR_FLAG_ALIGN.*")) {
+ my $align_flag = $e->{PROPERTIES}->{flag};
+ if ($align_flag =~ m/LIBNDR_FLAG_ALIGN(\d+)/) {
+ $call_code = "ALIGN_TO_$1_BYTES; ".$call_code;
+ }
+ }
my $hf = $self->register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", field2name($e->{NAME}), "$ifname.$pn.$e->{NAME}", $type->{FT_TYPE}, $type->{BASE_TYPE}, $type->{VALSSTRING}, $type->{MASK}, "");
$self->{hf_used}->{$hf} = 1;