summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_dfs.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-16 11:36:59 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-16 11:36:59 +0000
commitea266c0625e04a2dc10d25c2fee7b685965fcd3e (patch)
tree3db57fa36d79ab2df9adf6d7faa37f7d644b83b7 /source4/librpc/ndr/ndr_dfs.c
parent0c5759a4b2615b9c57ee7de04275ced1fc7d19cb (diff)
downloadsamba-ea266c0625e04a2dc10d25c2fee7b685965fcd3e.tar.gz
samba-ea266c0625e04a2dc10d25c2fee7b685965fcd3e.tar.bz2
samba-ea266c0625e04a2dc10d25c2fee7b685965fcd3e.zip
added support for level1 of EnumPrinters in spoolss. This uses a
number of "magic" add-ons to IDL to make it less painful, hopefully this will make IDL generation useful for horrible systems like spoolss (This used to be commit e18dba7d5a957ef82e8f91733a0bf95d579dcd7a)
Diffstat (limited to 'source4/librpc/ndr/ndr_dfs.c')
-rw-r--r--source4/librpc/ndr/ndr_dfs.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/source4/librpc/ndr/ndr_dfs.c b/source4/librpc/ndr/ndr_dfs.c
index 6b85e0c61b..90f56f911b 100644
--- a/source4/librpc/ndr/ndr_dfs.c
+++ b/source4/librpc/ndr/ndr_dfs.c
@@ -46,7 +46,7 @@ NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, struct dfs_SetInfo *r)
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, struct dfs_Info1 *r)
+NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, struct dfs_Info1 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -60,7 +60,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, struct dfs_Info2 *r)
+NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, struct dfs_Info2 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -80,7 +80,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, struct dfs_StorageInfo *r)
+NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, struct dfs_StorageInfo *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -99,7 +99,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, struct dfs_Info3 *r)
+NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, struct dfs_Info3 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -124,7 +124,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, struct dfs_Info4 *r)
+NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, struct dfs_Info4 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -152,7 +152,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, struct dfs_Info200 *r)
+NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, struct dfs_Info200 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -166,7 +166,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, struct dfs_Info300 *r)
+NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, struct dfs_Info300 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -197,7 +197,7 @@ NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, struct dfs_GetInfo *r)
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
+NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -213,7 +213,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
+NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -229,7 +229,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
+NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -245,7 +245,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
+NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -261,7 +261,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
+NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -277,7 +277,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
+NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -293,7 +293,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union dfs_EnumInfo *r)
+NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union dfs_EnumInfo *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_uint16(ndr, level));
@@ -371,7 +371,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumStruct *r)
+NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, struct dfs_EnumStruct *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
@@ -432,7 +432,7 @@ NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, struct dfs_SetInfo *r)
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
+NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
{
uint32 _ptr_path;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -452,7 +452,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
+NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
{
uint32 _ptr_path;
uint32 _ptr_comment;
@@ -484,7 +484,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
+NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
{
uint32 _ptr_server;
uint32 _ptr_share;
@@ -515,7 +515,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
+NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
{
uint32 _ptr_path;
uint32 _ptr_comment;
@@ -565,7 +565,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
+NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
{
uint32 _ptr_path;
uint32 _ptr_comment;
@@ -618,7 +618,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
+NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
{
uint32 _ptr_comment;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -638,7 +638,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
+NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -649,7 +649,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
+NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -660,7 +660,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
+NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
{
uint32 _ptr_dom_root;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -680,7 +680,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
+NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
{
uint32 _ptr_dom_root;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -701,7 +701,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union dfs_Info *r)
+NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union dfs_Info *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_uint16(ndr, level));
@@ -865,7 +865,7 @@ done:
NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, struct dfs_GetInfo *r)
{
- { uint16 _level;
+ { uint16 _level = r->in.level;
NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, &r->out.info));
if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info");
}
@@ -874,7 +874,7 @@ NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, struct dfs_GetInfo *r)
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
+NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
{
uint32 _ptr_s;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -903,7 +903,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
+NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
{
uint32 _ptr_s;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -932,7 +932,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
+NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
{
uint32 _ptr_s;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -961,7 +961,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
+NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
{
uint32 _ptr_s;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -990,7 +990,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
+NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
{
uint32 _ptr_s;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -1019,7 +1019,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
+NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
{
uint32 _ptr_s;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -1048,7 +1048,7 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union dfs_EnumInfo *r)
+NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union dfs_EnumInfo *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_uint16(ndr, level));
@@ -1162,18 +1162,18 @@ done:
return NT_STATUS_OK;
}
-static NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
+NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, &r->level));
- { uint16 _level;
+ { uint16 _level = r->level;
NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &_level, &r->e));
if (((NDR_SCALARS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in e");
}
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
- { uint16 _level;
+ { uint16 _level = r->level;
NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &_level, &r->e));
if (((NDR_BUFFERS) & NDR_SCALARS) && (_level != r->level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in e");
}