2 Unix SMB/Netbios implementation.
4 Samba utility functions
5 Copyright (C) Andrew Tridgell 1992-1999
6 Copyright (C) Luke Kenneth Casson Leighton 1996 - 1999
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.
26 /****************************************************************************
28 ****************************************************************************/
29 void display_eventlog_eventrecord(FILE *out_hnd
, enum action_type action
, EVENTLOGRECORD
*const ev
)
35 report(out_hnd
, "\tevent log records\n");
36 report(out_hnd
, "\t-----------------\n");
39 case ACTION_ENUMERATE
:
42 report(out_hnd
, "\t\trecord n.:\t%d\n", ev
->recordnumber
);
44 report(out_hnd
, "\t\tsource\teventnumber\teventtype\tcategory\n");
45 unistr_to_ascii(temp
, ev
->sourcename
.buffer
, sizeof(temp
)-1);
47 report(out_hnd
, "\t\t%s", temp
);
49 report(out_hnd
, "\t%d\t\t", ev
->eventnumber
&0x0000FFFF);
51 switch (ev
->eventtype
)
54 report(out_hnd
, "Normal");
58 report(out_hnd
, "Error");
61 case EVENTLOG_WARNING
:
62 report(out_hnd
, "Warning");
65 case EVENTLOG_INFORMATION
:
66 report(out_hnd
, "Information");
69 case EVENTLOG_AUDIT_OK
:
70 report(out_hnd
, "Audit Normal");
73 case EVENTLOG_AUDIT_ERROR
:
74 report(out_hnd
, "Audit Error\n");
78 report(out_hnd
, "\t%d\n", ev
->category
);
79 report(out_hnd
, "\t\tcreationtime:\t%s\n", http_timestring(ev
->creationtime
));
80 report(out_hnd
, "\t\twritetime:\t%s\n", http_timestring(ev
->writetime
));
82 unistr_to_ascii(temp
, ev
->computername
.buffer
, sizeof(temp
)-1);
83 report(out_hnd
, "\t\tcomputer:\t%s\n", temp
);
85 if (ev
->num_of_strings
!=0)
87 unistr_to_ascii(temp
, ev
->strings
.buffer
, sizeof(temp
)-1);
88 report(out_hnd
, "\t\tdescription:\t%s\n", temp
);
91 report(out_hnd
, "\n");
96 report(out_hnd
, "\n");