1 /* @(#) $Id: ./src/win32/ui/os_win32ui.h, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
12 * License details at the LICENSE file included with OSSEC or
13 * online at: http://www.ossec.net/en/licensing.html
29 #define CONFIG "ossec.conf"
30 #define NEWCONFIG "new-ossec.conf"
31 #define LASTCONFIG "last-ossec.conf"
32 #define VERSION_FILE "VERSION.txt"
33 #define OSSECLOGS "ossec.log"
34 #define HELPTXT "help.txt"
35 #define AUTH_FILE "client.keys"
36 #define SENDER_FILE "rids\\sender_counter"
37 #define DEFDIR "C:\\Program Files\\ossec-agent"
41 #define ST_RUNNING "Running..."
42 #define ST_RUNNING_RESTART "Running (pending restart)"
43 #define ST_STOPPED "Stopped."
44 #define ST_UNKNOWN "Unknown."
46 #define ST_MISSING_IMPORT "Require import of authentication key.\r\n" \
48 #define ST_MISSING_SERVER "Require OSSEC Server IP address.\r\n" \
50 #define ST_MISSING_ALL "Require import of authentication key.\r\n" \
51 " Missing OSSEC Server IP address.\r\n" \
57 #define FL_NOKEY "<insert_auth_key_here>"
58 #define FL_NOSERVER "<insert_server_ip_here>"
59 #define SERVER_IP_USED 1
60 #define SERVER_HOST_USED 2
64 char *decode_base64(const char *src);
65 char *encode_base64(int size, char *src);
68 /* Global ossec config structure */
69 typedef struct _ossec_config
71 unsigned short int server_type;
72 unsigned short int admin_access;
73 unsigned long int msg_sent;
89 /** Global variables **/
92 char ui_server_info[2048 +1];
95 ossec_config config_inst;
103 #define IDI_OSSECICON 201
104 #define UI_MANIFEST_ID 202
107 #define UI_SERVER_TEXT 1501
108 #define UI_SERVER_AUTH 1502
109 #define UI_SERVER_MSG 1503
110 #define UI_SERVER_TOP 1504
111 #define UI_SERVER_INFO 1505
112 #define UI_ID_CLOSE 1510
116 #define UI_MENU_MANAGE_STOP 1601
117 #define UI_MENU_MANAGE_START 1602
118 #define UI_MENU_MANAGE_STATUS 1603
119 #define UI_MENU_MANAGE_RESTART 1604
120 #define UI_MENU_MANAGE_EXIT 1605
121 #define UI_MENU_VIEW_LOGS 1606
122 #define UI_MENU_VIEW_CONFIG 1607
123 #define UI_MENU_HELP_HELP 1608
124 #define UI_MENU_HELP_ABOUT 1609
125 #define UI_MENU_NONE 1610
128 #define IDD_MAIN 1700
129 #define IDC_MAIN_STATUS 1701
131 #define IDC_CANCEL 1703
132 #define IDD_ABOUT 1704
133 #define IDC_STATIC -1
138 /* Generate server info */
139 int gen_server_info(HWND hwnd);
142 char *cat_file(char *file, FILE *fp2);
144 /* is_file present */
145 int is_file(char *file);
147 /* Reads ossec config */
148 int config_read(HWND hwnd);
150 /* Initializes the config */
153 /* Set OSSEC Server IP */
154 int set_ossec_server(char *ip, HWND hwnd);
156 /* Get OSSEC Server IP */
157 int get_ossec_server();