1 /***************************************************************************
2  *   Copyright (C) 2004, 2005, 2006 by Stephen McInerney                   *
3  *   spm@stedee.id.au                                                      *
4  *                                                                         *
5  *   $Id: messages.c 58 2006-01-02 10:40:49Z steve $
6  *                                                                         *
7  *   This program is free software; you can redistribute it and/or modify  *
8  *   it under the terms of the GNU General Public License as published by  *
9  *   the Free Software Foundation; either version 2 of the License, or     *
10  *   (at your option) any later version.                                   *
11  *                                                                         *
12  *   This program is distributed in the hope that it will be useful,       *
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
15  *   GNU General Public License for more details.                          *
16  *                                                                         *
17  *   You should have received a copy of the GNU General Public License     *
18  *   along with this program; if not, write to the                         *
19  *   Free Software Foundation, Inc.,                                       *
20  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
21  ***************************************************************************/
22 
23 /************************************************************************
24  ************************************************************************
25  * messages.c
26  *
27  *  All the various messages to be used
28  *
29  ************************************************************************
30  ************************************************************************/
31 
32 #include "dnshistory.h"
33 
34 int g_verbosity = VERBOSE0;                     /* How many extra stuff to show. If 0, none
35                                                    Bigger numbers, show more. */
36 
37 /************************************************************************
38  *                              MESSAGES                                *
39  *                                                                      *
40  * Are of the format msg_<level>_<name>                                 *
41  *  Where level is:                                                     *
42  *    I :- Informational                                                *
43  *    W :- Warning                                                      *
44  *    E :- Error, but not fatal                                         *
45  *    F :- Fatal Error                                                  *
46  *                                                                      *
47  *    vx : - where x is numerical from 1 (1,2,3 etc)                    *
48  *              is a debugging/verbosity message                        *
49  *              The higher the number, the less likely to be seen       *
50  ************************************************************************/
51 const char *msg_I_number_bad_lines = "INFO: Log Files(s) had BAD lines: ";
52 
53 
54 const char *msg_W_exceeded_verbosity = "WARN: Too many 'v' options. Setting to Max Verbosness";
55 const char *msg_W_line_too_big = "WARN: Line too big. Ignoring.";
56 const char *msg_W_re_match_failed = "WARN: PCRE: No match. Line Number: %lu\n  %s";
57 const char *msg_W_re_match_error = "WARN: PCRE: Matching error. Line Number: %lu\n  %s";
58 const char *msg_W_mismatched_lines = "WARN: Possibly Mismatched Log Lines. Line Number: %lu\n ++ %s -- %s";
59 const char *msg_W_import_line_too_long = "WARN: Import line too long: %lu\n";
60 const char *msg_W_import_line_failure = "WARN: Failed to import line: %lu\n";
61 
62 const char *msg_namelookup_try_agin = "Name could not be looked up at this time; Try again later";
63 const char *msg_namelookup_default = "Some other error occoured: ";
64 
65 const char *msg_v1_hashdb = "Entering: Open Hash DB";
66 const char *msg_v2_create_hashdb = "Creating Hash DB: ";
67 const char *msg_v2_create_dbcache = "Setting Cache Size for Hash DB: ";
68 const char *msg_v2_no_dbcache = "Cache <= 0. Not Creating. Size: ";
69 
70 
71 const char *msg_E_log_misordered = "ERROR! Current Time is older than 1st logged time entry: ";
72 const char *msg_E_re_too_many_substrings = "ERROR! Too many substrings. Line Number: %lu  Max Substrings: %d\n";
73 const char *msg_E_ip_conversion = "ERROR! IP conversion: %d - %s\n";
74 
75 const char *msg_E_substring_extraction = "ERROR! Failed to extract substring: %d  Line Number: %lu\n";
76 const char *msg_E_pcre_no_memory = " PCRE: Insufficient Memory.%s\n";
77 const char *msg_E_pcre_nonexist_substring = " PCRE: Substring doesn't exist.%s\n";
78 const char *msg_E_pcre_unknown = " PCRE: Unknown PCRE Error: %d\n";
79 
80 const char *msg_E_thread_stack_resize = "ERROR! Thread Stack Resize: %d\n";
81 const char *msg_E_thread_creation = "ERROR! Thread Creation: %d\n";
82 const char *msg_E_thread_lock = "ERROR! Thread Locking: %d\n";
83 const char *msg_E_thread_unlock = "ERROR! Thread Unlocking: %d\n";
84 
85 const char *msg_F_db_create = "FATAL ERROR! DB Create Failure: %s\n";
86 const char *msg_F_db_cache = "FATAL ERROR! DB Set Cache Size Failure: %s\n";
87 const char *msg_F_db_close = "FATAL ERROR! Error closing DB. Possible Corruption! : %d\n";
88 const char *msg_F_db_cursor = "FATAL ERROR! DB Cursor Creation Failure.%s\n";
89 
90 const char *msg_F_file_open = "FATAL ERROR! Failed to open file: %s\n";
91 const char *msg_F_mem_alloc_hash = "FATAL ERROR! Failed to allocate memory for hash data.%s\n";
92 const char *msg_F_memory_alloc = "FATAL ERROR! Failed to allocate memory.%s\n";
93 
94 const char *msg_F_pcre_failed_compilation = "FATAL ERROR! PCRE compilation failed at offset";
95 const char *msg_F_run_start_datetime = "FATAL ERROR! Can't extract starting date/time. Sorry things didn't work out...";
96 const char *msg_F_vital_substring = "FATAL ERROR! Failed to extract vital substring: %d\n";
97 
98 const char *msg_F_incompatible_options = "FATAL ERROR! Incompatible Option Settings!";
99 const char *msg_F_mismatched_lines = "FATAL ERROR! Totally Mismatched Log Lines. Line Number %lu\n %s %s\n";
100 const char *msg_F_early_log_termination = "FATAL ERROR! Recombine Log has terminated early! Line: %lu\n";
101 
102 /************************************************************************
103  ************************************************************************
104  *                      END OF FILE                                     *
105  ************************************************************************
106  ************************************************************************/
107