3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 2) as published by the FSF - Free Software
11 * License details at the LICENSE file included with OSSEC or
12 * online at: http://www.ossec.net/en/licensing.html
28 #define CONFIG "ossec.conf"
29 #define NEWCONFIG "new-ossec.conf"
30 #define LASTCONFIG "last-ossec.conf"
31 #define VERSION_FILE "VERSION.txt"
32 #define OSSECLOGS "ossec.log"
33 #define HELPTXT "help.txt"
34 #define AUTH_FILE "client.keys"
35 #define SENDER_FILE "rids\\sender_counter"
36 #define DEFDIR "C:\\Program Files\\ossec-agent"
40 #define ST_RUNNING "Running..."
41 #define ST_RUNNING_RESTART "Running (pending restart)"
42 #define ST_STOPPED "Stopped."
43 #define ST_UNKNOWN "Unknown."
45 #define ST_MISSING_IMPORT "Require import of authentication key.\r\n" \
47 #define ST_MISSING_SERVER "Require OSSEC Server IP address.\r\n" \
49 #define ST_MISSING_ALL "Require import of authentication key.\r\n" \
50 " Missing OSSEC Server IP address.\r\n" \
56 #define FL_NOKEY "<insert_auth_key_here>"
57 #define FL_NOSERVER "<insert_server_ip_here>"
58 #define SERVER_IP_USED 1
59 #define SERVER_HOST_USED 2
63 char *decode_base64(const char *src);
64 char *encode_base64(int size, char *src);
67 /* Global ossec config structure */
68 typedef struct _ossec_config
70 unsigned short int server_type;
71 unsigned short int admin_access;
72 unsigned long int msg_sent;
88 /** Global variables **/
91 char ui_server_info[2048 +1];
94 ossec_config config_inst;
102 #define IDI_OSSECICON 201
103 #define UI_MANIFEST_ID 202
106 #define UI_SERVER_TEXT 1501
107 #define UI_SERVER_AUTH 1502
108 #define UI_SERVER_MSG 1503
109 #define UI_SERVER_TOP 1504
110 #define UI_SERVER_INFO 1505
111 #define UI_ID_CLOSE 1510
115 #define UI_MENU_MANAGE_STOP 1601
116 #define UI_MENU_MANAGE_START 1602
117 #define UI_MENU_MANAGE_STATUS 1603
118 #define UI_MENU_MANAGE_RESTART 1604
119 #define UI_MENU_MANAGE_EXIT 1605
120 #define UI_MENU_VIEW_LOGS 1606
121 #define UI_MENU_VIEW_CONFIG 1607
122 #define UI_MENU_HELP_HELP 1608
123 #define UI_MENU_HELP_ABOUT 1609
124 #define UI_MENU_NONE 1610
127 #define IDD_MAIN 1700
128 #define IDC_MAIN_STATUS 1701
130 #define IDC_CANCEL 1703
131 #define IDD_ABOUT 1704
132 #define IDC_STATIC -1
137 /* Generate server info */
138 int gen_server_info(HWND hwnd);
141 char *cat_file(char *file, FILE *fp2);
143 /* is_file present */
144 int is_file(char *file);
146 /* Reads ossec config */
147 int config_read(HWND hwnd);
149 /* Initializes the config */
152 /* Set OSSEC Server IP */
153 int set_ossec_server(char *ip, HWND hwnd);
155 /* Get OSSEC Server IP */
156 int get_ossec_server();