/**************************************************************************
*
* STATUSWML.C - Nagios Status CGI for WAP-enabled devices
*
* Copyright (c) 2001-2007 Ethan Galstad (nagios@nagios.org)
* Last Modified: 01-18-2007
*
* License:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*************************************************************************/
#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/statusdata.h"
#include "../include/cgiutils.h"
#include "../include/getcgi.h"
#include "../include/cgiauth.h"
extern time_t program_start;
extern char main_config_file[MAX_FILENAME_LENGTH];
extern host *host_list;
extern hostgroup *hostgroup_list;
extern service *service_list;
extern hoststatus *hoststatus_list;
extern servicestatus *servicestatus_list;
extern int enable_notifications;
extern int execute_service_checks;
extern int nagios_process_state;
extern char *ping_syntax;
#define DISPLAY_HOST 0
#define DISPLAY_SERVICE 1
#define DISPLAY_HOSTGROUP 2
#define DISPLAY_INDEX 3
#define DISPLAY_PING 4
#define DISPLAY_TRACEROUTE 5
#define DISPLAY_QUICKSTATS 6
#define DISPLAY_PROCESS 7
#define DISPLAY_ALL_PROBLEMS 8
#define DISPLAY_UNHANDLED_PROBLEMS 9
#define DISPLAY_HOSTGROUP_SUMMARY 0
#define DISPLAY_HOSTGROUP_OVERVIEW 1
#define DISPLAY_HOST_SUMMARY 0
#define DISPLAY_HOST_SERVICES 1
void document_header(void);
void document_footer(void);
int process_cgivars(void);
int display_type=DISPLAY_INDEX;
int hostgroup_style=DISPLAY_HOSTGROUP_SUMMARY;
int host_style=DISPLAY_HOST_SUMMARY;
void display_index(void);
void display_host(void);
void display_host_services(void);
void display_service(void);
void display_hostgroup_summary(void);
void display_hostgroup_overview(void);
void display_ping(void);
void display_traceroute(void);
void display_quick_stats(void);
void display_process(void);
void display_problems(void);
char *host_name="";
char *hostgroup_name="";
char *service_desc="";
char *ping_address="";
char *traceroute_address="";
int show_all_hostgroups=TRUE;
authdata current_authdata;
int main(void){
int result=OK;
=1= |