summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/script/build_smb_interfaces.pl30
1 files changed, 29 insertions, 1 deletions
diff --git a/source4/script/build_smb_interfaces.pl b/source4/script/build_smb_interfaces.pl
index cc942ea3d3..a3a4164d4f 100755
--- a/source4/script/build_smb_interfaces.pl
+++ b/source4/script/build_smb_interfaces.pl
@@ -87,12 +87,40 @@ open(FILE, ">ejs_${basename}.c");
print FILE "/* EJS wrapper functions auto-generated by build_smb_interfaces.pl */\n\n";
-# Top level functions
+# Top level push/pull functions
foreach my $x (@{$header}) {
+
next, if $x->{STRUCT_NAME} eq "";
+
+ print FILE "static NTSTATUS ejs_pull_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, struct $x->{STRUCT_NAME} *r)\n";
+ print FILE "{\n";
+ print FILE "\tNDR_CHECK(ejs_pull_struct_start(ejs, &v, \"input\"));\n";
+ print FILE "\treturn NT_STATUS_OK;\n";
+ print FILE "}\n\n";
+
+ print FILE "static NTSTATUS ejs_push_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, const struct $x->{STRUCT_NAME} *r)\n\n";
+ print FILE "{\n";
+ print FILE "\tNDR_CHECK(ejs_push_struct_start(ejs, &v, \"output\"));\n";
+
+ print FILE "\treturn NT_STATUS_OK;\n";
+ print FILE "}\n\n";
+}
+
+# Top level call functions
+
+foreach my $x (@{$header}) {
+ next, if $x->{STRUCT_NAME} eq "";
+
+ $raw_name = $x->{STRUCT_NAME};
+ $raw_name =~ s/smb_/smb_raw_/;
+
print FILE "static int ejs_$x->{STRUCT_NAME}(int eid, int argc, struct MprVar **argv)\n";
print FILE "{\n";
+ print FILE "\tstruct $x->{STRUCT_NAME} parms;\n\n";
+
+ print FILE "\t$raw_name(tree, &params);\n";
+
print FILE "\tejsSetErrorMsg(eid, \"Not implemented\");\n";
print FILE "\treturn -1;\n";
print FILE "}\n\n";