diff options
author | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
commit | 7c51fa6d699a653cafa90df8e44911b576118ebd (patch) | |
tree | 543bf9ca698e03eff81104898b33e77f1abed319 /pidl/lib/Parse/Pidl/Wireshark/NDR.pm | |
parent | cc3a6770c77ec8fe1cd63bf4c682853c56201f0c (diff) | |
parent | 3e3214fd91471bca5b6c4d3782e922d252d588fb (diff) | |
download | samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.gz samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.bz2 samba-7c51fa6d699a653cafa90df8e44911b576118ebd.zip |
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'pidl/lib/Parse/Pidl/Wireshark/NDR.pm')
-rw-r--r-- | pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index a9ad555cca..b8adf2dc4e 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -1,5 +1,5 @@ ################################################## -# Samba4 NDR parser generator for IDL structures +# Wireshark NDR parser generator for IDL structures # Copyright tridge@samba.org 2000-2003 # Copyright tpot@samba.org 2001,2005 # Copyright jelmer@samba.org 2004-2007 @@ -545,6 +545,9 @@ sub Struct($$$$) $self->indent; $self->pidl_code("proto_item *item = NULL;"); $self->pidl_code("proto_tree *tree = NULL;"); + if ($e->{ALIGN} > 1) { + $self->pidl_code("dcerpc_info *di = pinfo->private_data;"); + } $self->pidl_code("int old_offset;"); $self->pidl_code(""); @@ -565,6 +568,15 @@ sub Struct($$$$) $self->pidl_code("\n$res"); $self->pidl_code("proto_item_set_len(item, offset-old_offset);\n"); + if ($e->{ALIGN} > 1) { + $self->pidl_code(""); + $self->pidl_code("if (di->call_data->flags & DCERPC_IS_NDR64) {"); + $self->indent; + $self->pidl_code("ALIGN_TO_$e->{ALIGN}_BYTES;"); + $self->deindent; + $self->pidl_code("}"); + } + $self->pidl_code(""); $self->pidl_code("return offset;"); $self->deindent; $self->pidl_code("}\n"); @@ -634,6 +646,8 @@ sub Union($$$$) $self->pidl_code("switch(level) {$res\t}"); $self->pidl_code("proto_item_set_len(item, offset-old_offset);\n"); + $self->pidl_code(""); + $self->pidl_code("return offset;"); $self->deindent; $self->pidl_code("}"); @@ -895,7 +909,7 @@ sub Initialize($$) sub Parse($$$$$) { my($self,$ndr,$idl_file,$h_filename,$cnf_file) = @_; - + $self->Initialize($cnf_file); return (undef, undef) if defined($self->{conformance}->{noemit_dissector}); |