aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dcerpc-spoolss.c
AgeCommit message (Collapse)AuthorFilesLines
2002-08-29From Ulf Lamping: change some #define names to avoid name collisions onGuy Harris1-34/+34
Windows that cause compiler warnings. svn path=/trunk/; revision=6129
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-736/+736
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-27Dissect flags field for enumprinters rpc.Tim Potter1-5/+89
The string in this rpc is not a devmode, but rather an object name. svn path=/trunk/; revision=6092
2002-08-22Fix the type of "spoolss_specific_rights()" to match the curentGuy Harris1-4/+2
definition of "nt_access_mask_fn_t". svn path=/trunk/; revision=6059
2002-08-22Some cleanups and fixes from Guy:Tim Potter1-4/+2
- 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-21Call dissect_nt_access_mask() instead of dissect_ndr_uint32()Tim Potter1-6/+76
svn path=/trunk/; revision=6054
2002-07-10Reordered some boolean fields to be consistent with the rest of ethereal.Tim Potter1-47/+49
svn path=/trunk/; revision=5850
2002-07-09Converted form related dissectors from prs_* routines to dissect_ndr_*Tim Potter1-165/+327
routines. svn path=/trunk/; revision=5846
2002-06-28Cleaned up NT policy handle hashing a bit. Split the store functionTim Potter1-110/+73
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-27Added some more dissection of rffpcnex flags.Tim Potter1-3/+263
svn path=/trunk/; revision=5768
2002-06-25Fixed typo in text name and added dissector for RouterReplyPrinter rpc.Tim Potter1-11/+93
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-24Added value_string array for setprinter level 0 command.Tim Potter1-2/+21
svn path=/trunk/; revision=5754
2002-06-24Change each DCERPC dissector to pass in a hf value on initialisationTim Potter1-6/+105
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-21Warning cleanup.Tim Potter1-27/+26
svn path=/trunk/; revision=5721
2002-06-17Added true_false_string for job status codes.Tim Potter1-9/+211
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-17Added value_string for printer status values.Tim Potter1-2/+335
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-07Fixed another bug in RRPCN.Tim Potter1-23/+59
Some more updates for printer notification data types as I figure out how it all hangs together. svn path=/trunk/; revision=5641
2002-06-07A printer port name is a notification string, not a two word value.Tim Potter1-6/+5
A RFNPCNEX request contains a NOTIFY_OPTIONS_ARRAY_CTR instead of a NOTIFY_OPTIONS_ARRAY. svn path=/trunk/; revision=5639
2002-06-06Dissect spoolss FCPN. Not sure what it stands for.Tim Potter1-2/+47
svn path=/trunk/; revision=5632
2002-06-06Implemented ReplyClosePrinter().Tim Potter1-14/+85
Fixed calls to dissect_nt_policy_hnd() as ReplyOpenPrinter() opens a handle and ReplyClosePrinter() closes one. svn path=/trunk/; revision=5631
2002-06-05Implemented RRPCN (RemotePrinterChangeNotification).Tim Potter1-25/+116
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-05Converted all reply functions to use dissect_doserror() instead ofTim Potter1-159/+688
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-05-20Implemented getprinterdriver2, levels 1 and 3.Tim Potter1-3/+430
svn path=/trunk/; revision=5513
2002-05-20Some miscellaneous updates:Tim Potter1-75/+286
- 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-13Added subdissectors for StartDocPrinter and EndDocPrinter RPCs.Tim Potter1-3/+234
svn path=/trunk/; revision=5454
2002-05-11In "dissect_nt_policy_hnd()":Guy Harris1-13/+20
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-10Add printer name to COL_INFO for ClosePrinter request.Tim Potter1-53/+799
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-04From Joerg Mayer: mark unused arguments as such.Guy Harris1-46/+46
svn path=/trunk/; revision=5380
2002-05-01Add a "remove an argument" change, from Joerg Mayer, that I'd missed.Guy Harris1-2/+9
Put in a comment noting a problem in the code. svn path=/trunk/; revision=5341
2002-05-01Start of support for setprinter calls. Currently on setprinter level 3 isTim Potter1-8/+69
decoded properly. Add printer name to COL_INFO field in ClosePrinter request. svn path=/trunk/; revision=5322
2002-04-30From Joerg Mayer: get rid of unused "pinfo" argument toGuy Harris1-3/+3
"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-30Use the string in the DCERPC sub-dissector array instead of providingTim Potter1-368/+163
another one in the COL_INFO field. svn path=/trunk/; revision=5300
2002-04-29Removal (or, at least, #ifdeffing out) of unused variables andGuy Harris1-30/+14
functions, from David Frascone. svn path=/trunk/; revision=5288
2002-04-24Pass the correct len field to dissect_nt_sec_desc() when dissectingTim Potter1-13/+153
PRINTER_INFO_2 and PRINTER_INFO_3 structures. Added dissector for EnumJobs rpc - not quite finished yet. svn path=/trunk/; revision=5231
2002-04-22Frame numbers are unsigned, and 0 is not a valid frame number; make theGuy Harris1-89/+89
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-22Correctly dissect LSA security descriptors, at least as they appearGuy Harris1-3/+3
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-18Add a "proto_register_dcerpc_smb()" which registers ett_ values forGuy Harris1-10/+1
"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-09Decode FORM_1 and FORM_REL flag values as value_strings.Tim Potter1-4/+19
svn path=/trunk/; revision=5132
2002-04-08A devicemode contains a uint32 at the start which represents the size ofTim Potter1-4/+7
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-05Decode some bits of the PRINTER_INFO_2 structure that we were missingTim Potter1-8/+55
before. Display which info level a getprinter response contains in COL_INFO. Fixed some bugs in dissecting devicemodes - the device name and form name live in a 64-byte buffer instead of a NULL terminated unicode string. svn path=/trunk/; revision=5102
2002-04-04Include "packet-smb-common.h" to get the declaration ofGuy Harris1-1/+2
"dissect_nt_sec_desc()". svn path=/trunk/; revision=5093
2002-04-03Decode PRINTER_INFO_1 and PRINTER_INFO_3 structures.Tim Potter1-1/+28
svn path=/trunk/; revision=5092
2002-03-26Use dcerpc_call_value structure to fetch request/response frame numbersTim Potter1-324/+228
and storage of private data. Fix memory leaks in form dissectors. svn path=/trunk/; revision=5020
2002-03-26Added dissectors for get/set/delete form.Tim Potter1-8/+482
Fixed enumforms dissector. svn path=/trunk/; revision=5019
2002-03-25Some refactoring of the spoolss dissector:Tim Potter1-766/+377
- rewrote request/response hashing code and moved it into packet-dcerpc-nt.c for use by other dcerpc/smb dissectors - rewrote policy handle hashing code as above, with nifty improvements - moved check for unparsed data and end of frame into a function - fixed matching of printername to handle in addprinterex svn path=/trunk/; revision=5014
2002-03-25Added a generic reply handler for unimplemented spoolss dissectors. ThisTim Potter1-65/+129
just parses the error code at the end of the packet and updates COL_INFO if necessary. svn path=/trunk/; revision=5012
2002-03-22Add a cleanup function to close a potential memory leak.Guy Harris1-6/+51
Get rid of an assigned-to-but-not-used variable. From Steven French: add names for some additional calls. svn path=/trunk/; revision=5003
2002-03-20The length argument to "fake_unicode()" is in characters, not bytes.Guy Harris1-2/+2
svn path=/trunk/; revision=4992
2002-03-19There is no guarantee that a buffer obtained using "tvb_get_ptr()" isGuy Harris1-42/+35
neatly aligned on a 2-byte or a 4-byte boundary, and there is no guarantee that a misaligned pointer can be dereferenced without getting a fault. Furthermore, there is no guarantee that, even if you *can* dereference a pointer to a 2-byte or 4-byte quantity in a packet, the resulting number you get back is in the right byte order; the data in the packet might have a different byte order from the machine on which you're running. Therefore, we change "prs_uint8s()", "prs_uint16s()", and "prs_uint32s()" to return the starting offset, in the tvbuff, of the collection of 8-bit, 16-bit, or 32-bit integral values, rather than a pointer to the raw packet data, and change their callers to fetch the data using "tvb_get_guint8()", "tvb_get_letohs()", and "tvb_get_letohl()" (the stuff in all the NT protocols is presumed to be little-endian here). We also change "fake_unicode()" to take a tvbuff and an offset, rather than a data pointer, as arguments, and to use "tvb_get_letohs()" to fetch the Unicode characters (again, we assume little-endian Unicode). This requires "fake_unicode()" to establish a cleanup handler, so we don't leak memory if it throws an exception. We also make "fake_unicode()" use "g_malloc()" to allocate its buffer (we weren't checking for allocation failures in any case; with "g_malloc()", we'll abort on an allocation failure - if we can come up with a cleverer way of handling them, fine), and the matching frees to use "g_free()". (We also insert some missing frees....) Fix some formats to print unsigned quantities with "%u", not "%d". Don't append text to items in the tree for non-string values in "dissect_ndr_nt_STRING_string()". svn path=/trunk/; revision=4986
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586