2 Unix SMB/CIFS implementation.
4 Copyright (C) Gerald Carter 2001
5 Copyright (C) Tim Potter 2000
6 Copyright (C) Jelmer Vernooij 2004
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 void display_reg_value(REG_VAL *value)
29 switch(reg_val_type(value)) {
31 printf("%s: REG_DWORD: 0x%08x\n", reg_val_name(value),
32 *((uint32 *) reg_val_data_blk(value)));
35 rpcstr_pull(text, reg_val_data_blk(value), sizeof(text), reg_val_size(value),
37 printf("%s: REG_SZ: %s\n", reg_val_name(value), text);
40 printf("%s: REG_BINARY: unknown length value not displayed\n",
44 uint16 *curstr = (uint16 *) reg_val_data_blk(value);
45 uint8 *start = reg_val_data_blk(value);
46 printf("%s: REG_MULTI_SZ:\n", reg_val_name(value));
47 while ((*curstr != 0) &&
48 ((uint8 *) curstr < start + reg_val_size(value))) {
49 rpcstr_pull(text, curstr, sizeof(text), -1,
51 printf(" %s\n", text);
52 curstr += strlen(text) + 1;
57 printf("%s: unknown type %d\n", reg_val_name(value), reg_val_type(value));