diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-18 03:28:01 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-18 03:28:01 +0000 |
commit | ec7a2944cdaf9255df965ed33e791eb2ee67d29d (patch) | |
tree | afad7c65d76d56c41a24f1a7644d908bd266c390 /source4/torture/rpc | |
parent | cb22240eb4f58936fb0e5f9d97ae23099c11c31a (diff) | |
download | samba-ec7a2944cdaf9255df965ed33e791eb2ee67d29d.tar.gz samba-ec7a2944cdaf9255df965ed33e791eb2ee67d29d.tar.bz2 samba-ec7a2944cdaf9255df965ed33e791eb2ee67d29d.zip |
fill in skeletons for the rest of the function calls in wkssvc (based
on function names in ethereal)
implement TransportEnum - quite a cute call, you can ask for the
workstations list of network transports, including its ethernet
address.
(This used to be commit 62d7e9819c95c906d1094f711bc60cf58def30f6)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/wkssvc.c | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c index 73b3f5c527..9d4b38d40f 100644 --- a/source4/torture/rpc/wkssvc.c +++ b/source4/torture/rpc/wkssvc.c @@ -29,6 +29,7 @@ static BOOL test_QueryInfo(struct dcerpc_pipe *p, struct wks_QueryInfo r; uint16 levels[] = {100, 101, 102}; int i; + BOOL ret = True; r.in.server_name = dcerpc_server_name(p); @@ -38,13 +39,48 @@ static BOOL test_QueryInfo(struct dcerpc_pipe *p, status = dcerpc_wks_QueryInfo(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { printf("QueryInfo level %u failed - %s\n", r.in.level, nt_errstr(status)); - return False; + ret = False; } } - return True; + return ret; } + +static BOOL test_TransportEnum(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct wks_TransportEnum r; + BOOL ret = True; + struct wks_TransportInfo info; + uint32 resume_handle = 0; + struct wks_TransportInfoArray info_array; + + ZERO_STRUCT(info); + ZERO_STRUCT(info_array); + + info.u.array = &info_array; + + r.in.server_name = dcerpc_server_name(p); + r.in.info = &info; + r.out.info = &info; + r.in.max_buffer = (uint32)-1; + r.in.resume_handle = &resume_handle; + r.out.resume_handle = &resume_handle; + + printf("testing TransportEnum\n"); + status = dcerpc_wks_TransportEnum(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("TransportEnum failed - %s\n", nt_errstr(status)); + ret = False; + } + + return ret; +} + + + BOOL torture_rpc_wkssvc(int dummy) { NTSTATUS status; @@ -65,6 +101,10 @@ BOOL torture_rpc_wkssvc(int dummy) ret = False; } + if (!test_TransportEnum(p, mem_ctx)) { + ret = False; + } + torture_rpc_close(p); return ret; |