Commit graph

64 commits

Author SHA1 Message Date
Tim Potter
31754bcb7c Decode getprinter level 7.
svn path=/trunk/; revision=6742
2002-12-04 05:41:47 +00:00
Guy Harris
0e050b1107 Get rid of the "pdata" argument to "dissect_dcerpc_uint16s()" and
"dissect_ndr_uint16s()"; "dissect_ndr_uint16s()" is always passed a null
pointer, "dissect_dcerpc_uint16s()" is only called by
"dissect_ndr_uint16s()", and the pointer returned through "pdata" is
*NOT* guaranteed to be aligned on a 16-bit boundary so we don't want to
tempt people to blithely dereference that pointer.

svn path=/trunk/; revision=6699
2002-11-28 21:03:36 +00:00
Guy Harris
f1d905c917 Make the pointer passed by reference as the last argument of
"dissect_ndr_uint8s()" a const pointer, as that's what
"dissect_ndr_uint8s()" expects.

svn path=/trunk/; revision=6690
2002-11-28 04:56:43 +00:00
Guy Harris
94b5a36fe1 Make "dissect_spoolss_uint16uni()" take an extra argument giving the
name of the field being dissected, and, if it's not null, use it instead
of "UINT16UNI".  Pass the appropriate argument in some calls.

In "SpoolssOpenPrinterEx_q()", put in some #if 0'ed out code to note
what should be done with the printer name when we can get it.

svn path=/trunk/; revision=6670
2002-11-23 08:57:15 +00:00
Tim Potter
2ca021395a Some more spoolss ndr conversions. OpenPrinterEx now decodes it's
arguments correctly.  There's a string datatype, a devicemode
container with a possibly null devicemode, and a "user level"
structure, whatever that is.

svn path=/trunk/; revision=6659
2002-11-19 05:25:04 +00:00
Tim Potter
bf87f85692 Fix dissection of printer info levels 0-3 which has been broken for a
while.  Also convert to dissect_ndr_* functions instead of old-style
prs_* functions.

Converted devicemode dissection to ndr functions as well.  There are
still a bunch of value_strings that can be written to decode some of
the constants here.

svn path=/trunk/; revision=6658
2002-11-19 03:01:18 +00:00
Tim Potter
4518450b28 Convert getprinter info 0, 1, 2, 3 to dissect_ndr routines. Hooray!
The old prs_DEVMODE function is still used by something else for the
moment.

svn path=/trunk/; revision=6607
2002-11-11 05:39:51 +00:00
Guy Harris
acf6949830 Eliminate a compiler warning, and handle overflows.
svn path=/trunk/; revision=6589
2002-11-08 19:58:09 +00:00
Richard Sharpe
aac18f73d4 More patches from Jim McDonough
svn path=/trunk/; revision=6587
2002-11-08 19:29:39 +00:00
Richard Sharpe
d15a388ded Another patch from Jim McDonough.
svn path=/trunk/; revision=6586
2002-11-08 19:25:42 +00:00
Richard Sharpe
65c1756287 Some more SPOOLSS stuff from Jim McDonough.
svn path=/trunk/; revision=6578
2002-11-07 17:45:30 +00:00
Guy Harris
3f4397bbb0 From Ulf Lamping: change some #define names to avoid name collisions on
Windows that cause compiler warnings.

svn path=/trunk/; revision=6129
2002-08-29 19:05:41 +00:00
Jörg Mayer
7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Tim Potter
532f7b3d1e Dissect flags field for enumprinters rpc.
The string in this rpc is not a devmode, but rather an object name.

svn path=/trunk/; revision=6092
2002-08-27 07:38:36 +00:00
Guy Harris
99e286d8a3 Fix the type of "spoolss_specific_rights()" to match the curent
definition of "nt_access_mask_fn_t".

svn path=/trunk/; revision=6059
2002-08-22 07:05:31 +00:00
Tim Potter
50b37822a0 Some cleanups and fixes from Guy:
- combine proto_tree_add_text() and proto_tree_append_text() calls in the
   access mask dissector

 - make the specific access bits dissector functions return void instead of
   an offset

I think Samba has the create user reply wrong.  There is perhaps a uint32
marked as unknown that shouldn't be there.  Removing this parses all the
captures I have.

svn path=/trunk/; revision=6057
2002-08-22 01:13:13 +00:00
Tim Potter
bc792aa9a4 Call dissect_nt_access_mask() instead of dissect_ndr_uint32()
svn path=/trunk/; revision=6054
2002-08-21 21:31:15 +00:00
Tim Potter
7ad8ddcc46 Reordered some boolean fields to be consistent with the rest of ethereal.
svn path=/trunk/; revision=5850
2002-07-10 02:59:38 +00:00
Tim Potter
98933ccb32 Converted form related dissectors from prs_* routines to dissect_ndr_*
routines.

svn path=/trunk/; revision=5846
2002-07-09 14:24:39 +00:00
Tim Potter
d24a5fd6c9 Cleaned up NT policy handle hashing a bit. Split the store function
into two - one that stores request/reply frame numbers and another
that associates a text name with a policy handle.

Removed all calls to prs_policy_hnd() and converted to calls to
dissect_nt_policy_hnd().

svn path=/trunk/; revision=5772
2002-06-28 01:23:26 +00:00
Tim Potter
3ba95d7b16 Added some more dissection of rffpcnex flags.
svn path=/trunk/; revision=5768
2002-06-27 03:02:50 +00:00
Tim Potter
5b56b34783 Fixed typo in text name and added dissector for RouterReplyPrinter rpc.
Fixed incorrect format strings in numerous calls to val_to_str() as you can't use %s

Added %d format to end of numerous calls to val_to_str()

svn path=/trunk/; revision=5763
2002-06-25 03:01:05 +00:00
Tim Potter
71bfd45e2d Added value_string array for setprinter level 0 command.
svn path=/trunk/; revision=5754
2002-06-24 04:36:56 +00:00
Tim Potter
6d6dce305d Change each DCERPC dissector to pass in a hf value on initialisation
for a value_string that corresponds to that dissectors opnums.  Pass
in -1 if no such table is available.

svn path=/trunk/; revision=5749
2002-06-24 00:03:18 +00:00
Tim Potter
51fb1868ca Warning cleanup.
svn path=/trunk/; revision=5721
2002-06-21 05:13:15 +00:00
Tim Potter
32674167bc Added true_false_string for job status codes.
Fixed bug in printer notify subtree item display.

The flags field in rfnpcnex is a change id not a flags value.

svn path=/trunk/; revision=5691
2002-06-17 06:45:42 +00:00
Tim Potter
4c9a866c6d Added value_string for printer status values.
Added true_false_string for printer attributes.

Display notify type and notify field name in subtree item when
dissecting notify options or notify data.

svn path=/trunk/; revision=5690
2002-06-17 03:21:15 +00:00
Tim Potter
c15486768a Fixed another bug in RRPCN.
Some more updates for printer notification data types as I figure out
how it all hangs together.

svn path=/trunk/; revision=5641
2002-06-07 06:10:53 +00:00
Tim Potter
7c8ae51531 A printer port name is a notification string, not a two word value.
A RFNPCNEX request contains a NOTIFY_OPTIONS_ARRAY_CTR instead of a
NOTIFY_OPTIONS_ARRAY.

svn path=/trunk/; revision=5639
2002-06-07 03:42:02 +00:00
Tim Potter
7db4c88dcd Dissect spoolss FCPN. Not sure what it stands for.
svn path=/trunk/; revision=5632
2002-06-06 05:46:55 +00:00
Tim Potter
fb78dde09e Implemented ReplyClosePrinter().
Fixed calls to dissect_nt_policy_hnd() as ReplyOpenPrinter() opens a
handle and ReplyClosePrinter() closes one.

svn path=/trunk/; revision=5631
2002-06-06 03:18:14 +00:00
Tim Potter
230ac0da7a Implemented RRPCN (RemotePrinterChangeNotification).
Use the di->levels field to pass info to notify options rather than
mucking about with the private_data fields which mysteriously doesn't
work.

Fixed some display bugs in notify data.

svn path=/trunk/; revision=5625
2002-06-05 07:15:47 +00:00
Tim Potter
4616797423 Converted all reply functions to use dissect_doserror() instead of
prs_werror().

Converted RFFPCNEX (FindFirstPrintChangeNotification) to Ronnie's NDR
routines.

Implemented RFNPCNEX (FindNextPrintChangeNotification).  Print
notification data is dissected in a length/buffer format instead of
dissecting as the underlying type (string secdesc, devmode etc).

svn path=/trunk/; revision=5623
2002-06-05 04:15:30 +00:00
Tim Potter
8b8f0130a3 Implemented getprinterdriver2, levels 1 and 3.
svn path=/trunk/; revision=5513
2002-05-20 06:53:31 +00:00
Tim Potter
6519b11bcb Some miscellaneous updates:
- implemented WritePrinter, DeletePrinterData

 - fixed dissection of various printerdata routines to use a more
   consistent field naming scheme and convert to ndr functions

svn path=/trunk/; revision=5509
2002-05-20 00:36:04 +00:00
Tim Potter
70a045e948 Added subdissectors for StartDocPrinter and EndDocPrinter RPCs.
svn path=/trunk/; revision=5454
2002-05-13 01:27:07 +00:00
Guy Harris
6a79ad7e91 In "dissect_nt_policy_hnd()":
add arguments to specify whether the policy handle is being
	opened or closed, and don't set the "open frame" for the handle
	unless it's being opened and don't set the "close frame" for the
	handle unless it's being closed;

	store the policy handle before fetching it, so that an open or
	close is marked appropriately in the protocol tree on the first
	pass;

	if the policy handle has a name associated with it, put that
	name into the top-level item for the policy handle.

In "packet-dcerpc-spoolss.c":

	get rid of aun unused variable;

	make "setjob_commands[]" static, as it's not used outside
	"packet-dcerpc-spoolss.c";

	put a "VALS()" call around the reference to "setjob_commands",
	to squelch compiler warnings;

	give the SPOOLSS return code field the appropriate
	"value_string" array.

svn path=/trunk/; revision=5448
2002-05-11 22:29:43 +00:00
Tim Potter
0a84144f2d Add printer name to COL_INFO for ClosePrinter request.
Converted enumjobs command to Ronnie's NDR dissection routines.

Implemented getjob, setjob, startpageprinter, endpageprinter commands using
NDR routines.

svn path=/trunk/; revision=5435
2002-05-10 02:41:48 +00:00
Guy Harris
16d52f4f29 From Joerg Mayer: mark unused arguments as such.
svn path=/trunk/; revision=5380
2002-05-04 09:05:44 +00:00
Guy Harris
17714f9c4e Add a "remove an argument" change, from Joerg Mayer, that I'd missed.
Put in a comment noting a problem in the code.

svn path=/trunk/; revision=5341
2002-05-01 21:22:06 +00:00
Tim Potter
f7965cfaab Start of support for setprinter calls. Currently on setprinter level 3 is
decoded properly.

Add printer name to COL_INFO field in ClosePrinter request.

svn path=/trunk/; revision=5322
2002-05-01 05:28:56 +00:00
Guy Harris
a06dd1c724 From Joerg Mayer: get rid of unused "pinfo" argument to
"dissect_nt_sec_desc()".

Also, get rid of code to handle lengths of -1 in "dissect_nt_sec_desc()"
- we never pass it a length of -1, as security descriptors aren't sent
over the wire with NDR syntax.

svn path=/trunk/; revision=5317
2002-04-30 23:48:15 +00:00
Tim Potter
63aaa78222 Use the string in the DCERPC sub-dissector array instead of providing
another one in the COL_INFO field.

svn path=/trunk/; revision=5300
2002-04-30 01:44:35 +00:00
Guy Harris
9a80f0a521 Removal (or, at least, #ifdeffing out) of unused variables and
functions, from David Frascone.

svn path=/trunk/; revision=5288
2002-04-29 08:20:18 +00:00
Tim Potter
14395ccd3a Pass the correct len field to dissect_nt_sec_desc() when dissecting
PRINTER_INFO_2 and PRINTER_INFO_3 structures.

Added dissector for EnumJobs rpc - not quite finished yet.

svn path=/trunk/; revision=5231
2002-04-24 03:08:49 +00:00
Guy Harris
ab96c5694e Frame numbers are unsigned, and 0 is not a valid frame number; make the
frame number arguments, and elements in data structures, unsigned,
display them with "%u" rather than "%d", and use 0, rather than -1, as
"not known".

svn path=/trunk/; revision=5223
2002-04-22 09:43:03 +00:00
Guy Harris
677ad9ee25 Correctly dissect LSA security descriptors, at least as they appear
inside a Netlogon security descriptor.

Correctly dissect NT security descriptors as they appear inside an LSA
security descriptor (at least as those appear inside a Netlogon security
descriptor) - they get sent over the wire, apparently, as an opaque blob
from the point of view of DCE RPC, at least from one capture I've seen,
they do *not* get sent over the wire in DCE RPC NDR syntax.

svn path=/trunk/; revision=5212
2002-04-22 01:07:19 +00:00
Guy Harris
92e27e03c1 Add a "proto_register_dcerpc_smb()" which registers ett_ values for
"packet-dcerpc-nt.c", and registers "dcerpc_smb_init()" as an
initialization routine.  Take the ett_ registration out of the latter
routine, and also take out the "do this only once" stuff.

Get rid of the initialization routines for netlogon, samr, and spoolss;
they just call "dcerpc_smb_init()", which is now an initialization
routine of its own.

The policy hash initialization should be done before every capture, so
it should be done in an initialization routine, and should not do any
"do this only once" stuff.  It should also be called only once before
every capture, rather than 3 times.

The ett_ initialization should, however, be done at the same time all
other ett_ initialization is done - at protocol registration time - so
it should be done in a "proto_register_" routine.

This fixes a bug I saw wherein

	1) the tree for Unicode strings was open by default

and

	2) if you closed one and then exited, Ethereal would crash.

The problem is that "proto_register_subtree_array()" doesn't expand the
array, it just bumps the number of registered ett_ values; the array is
allocated in "proto_init()".  As such, if you register ett_ values with
"proto_register_subtree_array()" *after* "proto_init()" is called - and,
even for the first capture, initialization routines are called after
"proto_init()" is called - you will get ett_ numbers that go past the
number of elements in the array.

Move the declaration of "ett_nt_unicode_string" to "packet-dcerpc-nt.h",
as it's exported from "packet-dcerpc-nt.c".

Get rid of the declaration of "dcerpc_smb_init()" in
"packet-dcerpc-nt.h", and make it static, as it's no longer called from
outside "packet-dcerpc-nt.c".

svn path=/trunk/; revision=5196
2002-04-18 00:29:17 +00:00
Tim Potter
37de9c398d Decode FORM_1 and FORM_REL flag values as value_strings.
svn path=/trunk/; revision=5132
2002-04-09 04:41:40 +00:00
Tim Potter
3123dde48e A devicemode contains a uint32 at the start which represents the size of
the structure.

Fixed an off by one but in displaying the device mode in a PRINTER_INFO_2
structure.

The devicemode in a devicemode container is not a deferred pointer but
rather occurs immediately after the pointer if it is non-NULL.

svn path=/trunk/; revision=5114
2002-04-08 00:27:36 +00:00