~yolanda.robla/ubuntu/saucy/nagios3/dep-8-tests

« back to all changes in this revision

Viewing changes to xdata/xodtemplate.h

  • Committer: Package Import Robot
  • Author(s): Alexander Wirt
  • Date: 2012-06-16 09:05:19 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20120616090519-ne14zejkhhyboolc
Tags: 3.4.1-1
* [28e077b] Imported Upstream version 3.3.1
* [d5314e0] don't call updatepo in clean target
* [45b3eb9] Don't remove config foo
* [54e3dff] Don't fix permissions in cgi postinst
* [d7be9db] Build-depend on libpng-dev (Closes: #662441)
* [4c47006] Add dutch po translation (Closes: #654855)
* [2b6573b] Refresh 10_p1_pl_shebang.dpatch
* [316fd7a] Update 40_fix_spurious_dollar_signs_added_to_command_lines
* [5ff2780] Refresh 55_strip_logarchivepath.dpatch
* [811d269] Refresh 60_fix_p1.pl_patch_mini_epn.dpatch
* [39a1e9c] Remove now unneeded patch 98_fix_XSS_CVE-2011-2179
* [785a4e8] Remove unneded patch 99_fix_XSS_CVE-2011-1523
* [6ce98ef] Remove unneeded patchs from 00list
* [1d18266] Imported Upstream version 3.4.0
* [05584c8] Refresh patches
* [58098cd] Imported Upstream version 3.4.1
* [3e9e07a] Bump standards version
* [fe991e2] wrap-and-sort
* [1ba78f7] Also create /var/run/nagios in cgi package (Closes: #626854)

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
/********** STRUCTURE DEFINITIONS **********/
79
79
 
80
80
/* CUSTOMVARIABLESMEMBER structure */
81
 
typedef struct xodtemplate_customvariablesmember_struct{
 
81
typedef struct xodtemplate_customvariablesmember_struct {
82
82
        char    *variable_name;
83
83
        char    *variable_value;
84
84
        struct xodtemplate_customvariablesmember_struct *next;
85
 
        }xodtemplate_customvariablesmember;
 
85
        } xodtemplate_customvariablesmember;
86
86
 
87
87
 
88
88
/* DATERANGE structure */
89
 
typedef struct xodtemplate_daterange_struct{
 
89
typedef struct xodtemplate_daterange_struct {
90
90
        int type;
91
91
        int syear;          /* start year */
92
92
        int smon;           /* start month */
101
101
        int skip_interval;
102
102
        char *timeranges;
103
103
        struct xodtemplate_daterange_struct *next;
104
 
        }xodtemplate_daterange;
 
104
        } xodtemplate_daterange;
105
105
 
106
106
 
107
107
/* TIMEPERIOD TEMPLATE STRUCTURE */
108
 
typedef struct xodtemplate_timeperiod_struct{
 
108
typedef struct xodtemplate_timeperiod_struct {
109
109
        char       *template;
110
110
        char       *name;
111
111
        int        _config_file;
120
120
        int        has_been_resolved;
121
121
        int        register_object;
122
122
        struct xodtemplate_timeperiod_struct *next;
123
 
        }xodtemplate_timeperiod;
 
123
        } xodtemplate_timeperiod;
124
124
 
125
125
 
126
126
/* COMMAND TEMPLATE STRUCTURE */
127
 
typedef struct xodtemplate_command_struct{
128
 
        char       *template;
129
 
        char       *name;
130
 
        int        _config_file;
131
 
        int        _start_line;
132
 
 
133
 
        char       *command_name;
134
 
        char       *command_line;
135
 
 
136
 
        int        has_been_resolved;
137
 
        int        register_object;
138
 
        struct xodtemplate_command_struct *next;
139
 
        }xodtemplate_command;
 
127
typedef struct xodtemplate_command_struct {
 
128
    char       *template;
 
129
    char       *name;
 
130
    int        _config_file;
 
131
    int        _start_line;
 
132
 
 
133
    char       *command_name;
 
134
    char       *command_line;
 
135
 
 
136
    int        has_been_resolved;
 
137
    int        register_object;
 
138
    struct xodtemplate_command_struct *next;
 
139
} xodtemplate_command;
140
140
 
141
141
 
142
142
/* CONTACT TEMPLATE STRUCTURE */
143
 
typedef struct xodtemplate_contact_struct{
144
 
        char      *template;
145
 
        char      *name;
146
 
        int        _config_file;
147
 
        int        _start_line;
148
 
 
149
 
        char      *contact_name;
150
 
        char      *alias;
151
 
        char      *contact_groups;
152
 
        char      *email;
153
 
        char      *pager;
154
 
        char      *address[MAX_XODTEMPLATE_CONTACT_ADDRESSES];
155
 
        char      *host_notification_period;
156
 
        char      *host_notification_commands;
157
 
        int       notify_on_host_down;
158
 
        int       notify_on_host_unreachable;
159
 
        int       notify_on_host_recovery;
160
 
        int       notify_on_host_flapping;
161
 
        int       notify_on_host_downtime;
162
 
        char      *service_notification_period;
163
 
        char      *service_notification_commands;
164
 
        int       notify_on_service_unknown;
165
 
        int       notify_on_service_warning;
166
 
        int       notify_on_service_critical;
167
 
        int       notify_on_service_recovery;
168
 
        int       notify_on_service_flapping;
169
 
        int       notify_on_service_downtime;
170
 
        int       host_notifications_enabled;
171
 
        int       service_notifications_enabled;
172
 
        int       can_submit_commands;
173
 
        int       retain_status_information;
174
 
        int       retain_nonstatus_information;
175
 
        xodtemplate_customvariablesmember *custom_variables;
176
 
 
177
 
        int       have_contact_groups;
178
 
        int       have_email;
179
 
        int       have_pager;
180
 
        int       have_address[MAX_XODTEMPLATE_CONTACT_ADDRESSES];
181
 
        int       have_host_notification_period;
182
 
        int       have_host_notification_commands;
183
 
        int       have_service_notification_period;
184
 
        int       have_service_notification_commands;
185
 
 
186
 
        int       have_host_notification_options;
187
 
        int       have_service_notification_options;
188
 
        int       have_host_notifications_enabled;
189
 
        int       have_service_notifications_enabled;
190
 
        int       have_can_submit_commands;
191
 
        int       have_retain_status_information;
192
 
        int       have_retain_nonstatus_information;
193
 
 
194
 
        int       has_been_resolved;
195
 
        int       register_object;
196
 
        struct xodtemplate_contact_struct *next;
197
 
        }xodtemplate_contact;
 
143
typedef struct xodtemplate_contact_struct {
 
144
    char      *template;
 
145
    char      *name;
 
146
    int        _config_file;
 
147
    int        _start_line;
 
148
 
 
149
    char      *contact_name;
 
150
    char      *alias;
 
151
    char      *contact_groups;
 
152
    char      *email;
 
153
    char      *pager;
 
154
    char      *address[MAX_XODTEMPLATE_CONTACT_ADDRESSES];
 
155
    char      *host_notification_period;
 
156
    char      *host_notification_commands;
 
157
    int       notify_on_host_down;
 
158
    int       notify_on_host_unreachable;
 
159
    int       notify_on_host_recovery;
 
160
    int       notify_on_host_flapping;
 
161
    int       notify_on_host_downtime;
 
162
    char      *service_notification_period;
 
163
    char      *service_notification_commands;
 
164
    int       notify_on_service_unknown;
 
165
    int       notify_on_service_warning;
 
166
    int       notify_on_service_critical;
 
167
    int       notify_on_service_recovery;
 
168
    int       notify_on_service_flapping;
 
169
    int       notify_on_service_downtime;
 
170
    int       host_notifications_enabled;
 
171
    int       service_notifications_enabled;
 
172
    int       can_submit_commands;
 
173
    int       retain_status_information;
 
174
    int       retain_nonstatus_information;
 
175
    xodtemplate_customvariablesmember *custom_variables;
 
176
 
 
177
    int       have_contact_groups;
 
178
    int       have_email;
 
179
    int       have_pager;
 
180
    int       have_address[MAX_XODTEMPLATE_CONTACT_ADDRESSES];
 
181
    int       have_host_notification_period;
 
182
    int       have_host_notification_commands;
 
183
    int       have_service_notification_period;
 
184
    int       have_service_notification_commands;
 
185
 
 
186
    int       have_host_notification_options;
 
187
    int       have_service_notification_options;
 
188
    int       have_host_notifications_enabled;
 
189
    int       have_service_notifications_enabled;
 
190
    int       have_can_submit_commands;
 
191
    int       have_retain_status_information;
 
192
    int       have_retain_nonstatus_information;
 
193
 
 
194
    int       has_been_resolved;
 
195
    int       register_object;
 
196
    struct xodtemplate_contact_struct *next;
 
197
} xodtemplate_contact;
198
198
 
199
199
 
200
200
/* CONTACTGROUP TEMPLATE STRUCTURE */
201
 
typedef struct xodtemplate_contactgroup_struct{
202
 
        char      *template;
203
 
        char      *name;
204
 
        int        _config_file;
205
 
        int        _start_line;
206
 
 
207
 
        char      *contactgroup_name;
208
 
        char      *alias;
209
 
        char      *members;
210
 
        char      *contactgroup_members;
211
 
 
212
 
        int       have_members;
213
 
        int       have_contactgroup_members;
214
 
 
215
 
        int       has_been_resolved;
216
 
        int       register_object;
217
 
        struct xodtemplate_contactgroup_struct *next;
218
 
        }xodtemplate_contactgroup;
 
201
typedef struct xodtemplate_contactgroup_struct {
 
202
    char      *template;
 
203
    char      *name;
 
204
    int        _config_file;
 
205
    int        _start_line;
 
206
 
 
207
    char      *contactgroup_name;
 
208
    char      *alias;
 
209
    char      *members;
 
210
    char      *contactgroup_members;
 
211
 
 
212
    int       have_members;
 
213
    int       have_contactgroup_members;
 
214
 
 
215
    int       has_been_resolved;
 
216
    int       register_object;
 
217
    struct xodtemplate_contactgroup_struct *next;
 
218
} xodtemplate_contactgroup;
219
219
 
220
220
 
221
221
/* HOST TEMPLATE STRUCTURE */
222
 
typedef struct xodtemplate_host_struct{
223
 
        char      *template;
224
 
        char      *name;
225
 
        int        _config_file;
226
 
        int        _start_line;
227
 
 
228
 
        char      *host_name;
229
 
        char      *display_name;
230
 
        char      *alias;
231
 
        char      *address;
232
 
        char      *parents;
233
 
        char      *host_groups;
234
 
        char      *check_command;
235
 
        char      *check_period;
236
 
        int       initial_state;
237
 
        double    check_interval;
238
 
        double    retry_interval;
239
 
        int       max_check_attempts;
240
 
        int       active_checks_enabled;
241
 
        int       passive_checks_enabled;
242
 
        int       obsess_over_host;
243
 
        char      *event_handler;
244
 
        int       event_handler_enabled;
245
 
        int       check_freshness;
246
 
        int       freshness_threshold;
247
 
        float     low_flap_threshold;
248
 
        float     high_flap_threshold;
249
 
        int       flap_detection_enabled;
250
 
        int       flap_detection_on_up;
251
 
        int       flap_detection_on_down;
252
 
        int       flap_detection_on_unreachable;
253
 
        char      *contact_groups;
254
 
        char      *contacts;
255
 
        int       notify_on_down;
256
 
        int       notify_on_unreachable;
257
 
        int       notify_on_recovery;
258
 
        int       notify_on_flapping;
259
 
        int       notify_on_downtime;
260
 
        int       notifications_enabled;
261
 
        char      *notification_period;
262
 
        double    notification_interval;
263
 
        double    first_notification_delay;
264
 
        int       stalk_on_up;
265
 
        int       stalk_on_down;
266
 
        int       stalk_on_unreachable;
267
 
        int       process_perf_data;
268
 
        int       failure_prediction_enabled;
269
 
        char      *failure_prediction_options;
270
 
        char      *notes;
271
 
        char      *notes_url;
272
 
        char      *action_url;
273
 
        char      *icon_image;
274
 
        char      *icon_image_alt;
275
 
        char      *vrml_image;
276
 
        char      *statusmap_image;
277
 
        int       x_2d;
278
 
        int       y_2d;
279
 
        double    x_3d;
280
 
        double    y_3d;
281
 
        double    z_3d;
282
 
        int       retain_status_information;
283
 
        int       retain_nonstatus_information;
284
 
        xodtemplate_customvariablesmember *custom_variables;
285
 
 
286
 
        int       have_display_name;
287
 
        int       have_parents;
288
 
        int       have_host_groups;
289
 
        int       have_check_command;
290
 
        int       have_check_period;
291
 
        int       have_event_handler;
292
 
        int       have_contact_groups;
293
 
        int       have_contacts;
294
 
        int       have_notification_period;
295
 
        int       have_failure_prediction_options;
296
 
        int       have_notes;
297
 
        int       have_notes_url;
298
 
        int       have_action_url;
299
 
        int       have_icon_image;
300
 
        int       have_icon_image_alt;
301
 
        int       have_vrml_image;
302
 
        int       have_statusmap_image;
303
 
 
304
 
        int       have_initial_state;
305
 
        int       have_check_interval;
306
 
        int       have_retry_interval;
307
 
        int       have_max_check_attempts;
308
 
        int       have_active_checks_enabled;
309
 
        int       have_passive_checks_enabled;
310
 
        int       have_obsess_over_host;
311
 
        int       have_event_handler_enabled;
312
 
        int       have_check_freshness;
313
 
        int       have_freshness_threshold;
314
 
        int       have_low_flap_threshold;
315
 
        int       have_high_flap_threshold;
316
 
        int       have_flap_detection_enabled;
317
 
        int       have_flap_detection_options;
318
 
        int       have_notification_options;
319
 
        int       have_notifications_enabled;
320
 
        int       have_notification_interval;
321
 
        int       have_first_notification_delay;
322
 
        int       have_stalking_options;
323
 
        int       have_process_perf_data;
324
 
        int       have_failure_prediction_enabled;
325
 
        int       have_2d_coords;
326
 
        int       have_3d_coords;
327
 
        int       have_retain_status_information;
328
 
        int       have_retain_nonstatus_information;
329
 
 
330
 
        int       has_been_resolved;
331
 
        int       register_object;
332
 
        struct xodtemplate_host_struct *next;
333
 
        }xodtemplate_host;
 
222
typedef struct xodtemplate_host_struct {
 
223
    char      *template;
 
224
    char      *name;
 
225
    int        _config_file;
 
226
    int        _start_line;
 
227
 
 
228
    char      *host_name;
 
229
    char      *display_name;
 
230
    char      *alias;
 
231
    char      *address;
 
232
    char      *parents;
 
233
    char      *host_groups;
 
234
    char      *check_command;
 
235
    char      *check_period;
 
236
    int       initial_state;
 
237
    double    check_interval;
 
238
    double    retry_interval;
 
239
    int       max_check_attempts;
 
240
    int       active_checks_enabled;
 
241
    int       passive_checks_enabled;
 
242
    int       obsess_over_host;
 
243
    char      *event_handler;
 
244
    int       event_handler_enabled;
 
245
    int       check_freshness;
 
246
    int       freshness_threshold;
 
247
    float     low_flap_threshold;
 
248
    float     high_flap_threshold;
 
249
    int       flap_detection_enabled;
 
250
    int       flap_detection_on_up;
 
251
    int       flap_detection_on_down;
 
252
    int       flap_detection_on_unreachable;
 
253
    char      *contact_groups;
 
254
    char      *contacts;
 
255
    int       notify_on_down;
 
256
    int       notify_on_unreachable;
 
257
    int       notify_on_recovery;
 
258
    int       notify_on_flapping;
 
259
    int       notify_on_downtime;
 
260
    int       notifications_enabled;
 
261
    char      *notification_period;
 
262
    double    notification_interval;
 
263
    double    first_notification_delay;
 
264
    int       stalk_on_up;
 
265
    int       stalk_on_down;
 
266
    int       stalk_on_unreachable;
 
267
    int       process_perf_data;
 
268
    int       failure_prediction_enabled;
 
269
    char      *failure_prediction_options;
 
270
    char      *notes;
 
271
    char      *notes_url;
 
272
    char      *action_url;
 
273
    char      *icon_image;
 
274
    char      *icon_image_alt;
 
275
    char      *vrml_image;
 
276
    char      *statusmap_image;
 
277
    int       x_2d;
 
278
    int       y_2d;
 
279
    double    x_3d;
 
280
    double    y_3d;
 
281
    double    z_3d;
 
282
    int       retain_status_information;
 
283
    int       retain_nonstatus_information;
 
284
    xodtemplate_customvariablesmember *custom_variables;
 
285
 
 
286
    int       have_display_name;
 
287
    int       have_parents;
 
288
    int       have_host_groups;
 
289
    int       have_check_command;
 
290
    int       have_check_period;
 
291
    int       have_event_handler;
 
292
    int       have_contact_groups;
 
293
    int       have_contacts;
 
294
    int       have_notification_period;
 
295
    int       have_failure_prediction_options;
 
296
    int       have_notes;
 
297
    int       have_notes_url;
 
298
    int       have_action_url;
 
299
    int       have_icon_image;
 
300
    int       have_icon_image_alt;
 
301
    int       have_vrml_image;
 
302
    int       have_statusmap_image;
 
303
 
 
304
    int       have_initial_state;
 
305
    int       have_check_interval;
 
306
    int       have_retry_interval;
 
307
    int       have_max_check_attempts;
 
308
    int       have_active_checks_enabled;
 
309
    int       have_passive_checks_enabled;
 
310
    int       have_obsess_over_host;
 
311
    int       have_event_handler_enabled;
 
312
    int       have_check_freshness;
 
313
    int       have_freshness_threshold;
 
314
    int       have_low_flap_threshold;
 
315
    int       have_high_flap_threshold;
 
316
    int       have_flap_detection_enabled;
 
317
    int       have_flap_detection_options;
 
318
    int       have_notification_options;
 
319
    int       have_notifications_enabled;
 
320
    int       have_notification_interval;
 
321
    int       have_first_notification_delay;
 
322
    int       have_stalking_options;
 
323
    int       have_process_perf_data;
 
324
    int       have_failure_prediction_enabled;
 
325
    int       have_2d_coords;
 
326
    int       have_3d_coords;
 
327
    int       have_retain_status_information;
 
328
    int       have_retain_nonstatus_information;
 
329
 
 
330
    int       has_been_resolved;
 
331
    int       register_object;
 
332
    struct xodtemplate_host_struct *next;
 
333
} xodtemplate_host;
334
334
 
335
335
 
336
336
/* HOSTGROUP TEMPLATE STRUCTURE */
337
 
typedef struct xodtemplate_hostgroup_struct{
338
 
        char      *template;
339
 
        char      *name;
340
 
        int        _config_file;
341
 
        int        _start_line;
342
 
 
343
 
        char      *hostgroup_name;
344
 
        char      *alias;
345
 
        char      *members;
346
 
        char      *hostgroup_members;
347
 
        char      *notes;
348
 
        char      *notes_url;
349
 
        char      *action_url;
350
 
 
351
 
        int       have_members;
352
 
        int       have_hostgroup_members;
353
 
        int       have_notes;
354
 
        int       have_notes_url;
355
 
        int       have_action_url;
356
 
 
357
 
        int       has_been_resolved;
358
 
        int       register_object;
359
 
        struct xodtemplate_hostgroup_struct *next;
360
 
        }xodtemplate_hostgroup;
 
337
typedef struct xodtemplate_hostgroup_struct {
 
338
    char      *template;
 
339
    char      *name;
 
340
    int        _config_file;
 
341
    int        _start_line;
 
342
 
 
343
    char      *hostgroup_name;
 
344
    char      *alias;
 
345
    char      *members;
 
346
    char      *hostgroup_members;
 
347
    char      *notes;
 
348
    char      *notes_url;
 
349
    char      *action_url;
 
350
 
 
351
    int       have_members;
 
352
    int       have_hostgroup_members;
 
353
    int       have_notes;
 
354
    int       have_notes_url;
 
355
    int       have_action_url;
 
356
 
 
357
    int       has_been_resolved;
 
358
    int       register_object;
 
359
    struct xodtemplate_hostgroup_struct *next;
 
360
} xodtemplate_hostgroup;
361
361
 
362
362
 
363
363
/* SERVICE TEMPLATE STRUCTURE */
364
 
typedef struct xodtemplate_service_struct{
365
 
        char       *template;
366
 
        char       *name;
367
 
        int        _config_file;
368
 
        int        _start_line;
369
 
 
370
 
        char       *host_name;
371
 
        char       *service_description;
372
 
        char       *display_name;
373
 
        char       *hostgroup_name;
374
 
        char       *service_groups;
375
 
        char       *check_command;
376
 
        int        initial_state;
377
 
        int        max_check_attempts;
378
 
        double     check_interval;
379
 
        double     retry_interval;
380
 
        char       *check_period;
381
 
        int        active_checks_enabled;
382
 
        int        passive_checks_enabled;
383
 
        int        parallelize_check;
384
 
        int        is_volatile;
385
 
        int        obsess_over_service;
386
 
        char       *event_handler;
387
 
        int        event_handler_enabled;
388
 
        int        check_freshness;
389
 
        int        freshness_threshold;
390
 
        double     low_flap_threshold;
391
 
        double     high_flap_threshold;
392
 
        int        flap_detection_enabled;
393
 
        int        flap_detection_on_ok;
394
 
        int        flap_detection_on_warning;
395
 
        int        flap_detection_on_unknown;
396
 
        int        flap_detection_on_critical;
397
 
        int        notify_on_unknown;
398
 
        int        notify_on_warning;
399
 
        int        notify_on_critical;
400
 
        int        notify_on_recovery;
401
 
        int        notify_on_flapping;
402
 
        int        notify_on_downtime;
403
 
        int        notifications_enabled;
404
 
        char       *notification_period;
405
 
        double     notification_interval;
406
 
        double     first_notification_delay;
407
 
        char       *contact_groups;
408
 
        char       *contacts;
409
 
        int        stalk_on_ok;
410
 
        int        stalk_on_unknown;
411
 
        int        stalk_on_warning;
412
 
        int        stalk_on_critical;
413
 
        int        process_perf_data;
414
 
        int        failure_prediction_enabled;
415
 
        char       *failure_prediction_options;
416
 
        char       *notes;
417
 
        char       *notes_url;
418
 
        char       *action_url;
419
 
        char       *icon_image;
420
 
        char       *icon_image_alt;
421
 
        int        retain_status_information;
422
 
        int        retain_nonstatus_information;
423
 
        xodtemplate_customvariablesmember *custom_variables;
424
 
 
425
 
        int        have_host_name;
426
 
        int        have_service_description;
427
 
        int        have_display_name;
428
 
        int        have_hostgroup_name;
429
 
        int        have_service_groups;
430
 
        int        have_check_command;
431
 
        int        have_important_check_command;
432
 
        int        have_check_period;
433
 
        int        have_event_handler;
434
 
        int        have_notification_period;
435
 
        int        have_contact_groups;
436
 
        int        have_contacts;
437
 
        int        have_failure_prediction_options;
438
 
        int        have_notes;
439
 
        int        have_notes_url;
440
 
        int        have_action_url;
441
 
        int        have_icon_image;
442
 
        int        have_icon_image_alt;
443
 
 
444
 
        int        have_initial_state;
445
 
        int        have_max_check_attempts;
446
 
        int        have_check_interval;
447
 
        int        have_retry_interval;
448
 
        int        have_active_checks_enabled;
449
 
        int        have_passive_checks_enabled;
450
 
        int        have_parallelize_check;
451
 
        int        have_is_volatile;
452
 
        int        have_obsess_over_service;
453
 
        int        have_event_handler_enabled;
454
 
        int        have_check_freshness;
455
 
        int        have_freshness_threshold;
456
 
        int        have_low_flap_threshold;
457
 
        int        have_high_flap_threshold;
458
 
        int        have_flap_detection_enabled;
459
 
        int        have_flap_detection_options;
460
 
        int        have_notification_options;
461
 
        int        have_notifications_enabled;
462
 
        int        have_notification_dependencies;
463
 
        int        have_notification_interval;
464
 
        int        have_first_notification_delay;
465
 
        int        have_stalking_options;
466
 
        int        have_process_perf_data;
467
 
        int        have_failure_prediction_enabled;
468
 
        int        have_retain_status_information;
469
 
        int        have_retain_nonstatus_information;
470
 
        
471
 
        int        has_been_resolved;
472
 
        int        register_object;
473
 
        struct xodtemplate_service_struct *next;
474
 
        }xodtemplate_service;
 
364
typedef struct xodtemplate_service_struct {
 
365
    char       *template;
 
366
    char       *name;
 
367
    int        _config_file;
 
368
    int        _start_line;
 
369
 
 
370
    char       *host_name;
 
371
    char       *service_description;
 
372
    char       *display_name;
 
373
    char       *hostgroup_name;
 
374
    char       *service_groups;
 
375
    char       *check_command;
 
376
    int        initial_state;
 
377
    int        max_check_attempts;
 
378
    double     check_interval;
 
379
    double     retry_interval;
 
380
    char       *check_period;
 
381
    int        active_checks_enabled;
 
382
    int        passive_checks_enabled;
 
383
    int        parallelize_check;
 
384
    int        is_volatile;
 
385
    int        obsess_over_service;
 
386
    char       *event_handler;
 
387
    int        event_handler_enabled;
 
388
    int        check_freshness;
 
389
    int        freshness_threshold;
 
390
    double     low_flap_threshold;
 
391
    double     high_flap_threshold;
 
392
    int        flap_detection_enabled;
 
393
    int        flap_detection_on_ok;
 
394
    int        flap_detection_on_warning;
 
395
    int        flap_detection_on_unknown;
 
396
    int        flap_detection_on_critical;
 
397
    int        notify_on_unknown;
 
398
    int        notify_on_warning;
 
399
    int        notify_on_critical;
 
400
    int        notify_on_recovery;
 
401
    int        notify_on_flapping;
 
402
    int        notify_on_downtime;
 
403
    int        notifications_enabled;
 
404
    char       *notification_period;
 
405
    double     notification_interval;
 
406
    double     first_notification_delay;
 
407
    char       *contact_groups;
 
408
    char       *contacts;
 
409
    int        stalk_on_ok;
 
410
    int        stalk_on_unknown;
 
411
    int        stalk_on_warning;
 
412
    int        stalk_on_critical;
 
413
    int        process_perf_data;
 
414
    int        failure_prediction_enabled;
 
415
    char       *failure_prediction_options;
 
416
    char       *notes;
 
417
    char       *notes_url;
 
418
    char       *action_url;
 
419
    char       *icon_image;
 
420
    char       *icon_image_alt;
 
421
    int        retain_status_information;
 
422
    int        retain_nonstatus_information;
 
423
    xodtemplate_customvariablesmember *custom_variables;
 
424
 
 
425
    int        have_host_name;
 
426
    int        have_service_description;
 
427
    int        have_display_name;
 
428
    int        have_hostgroup_name;
 
429
    int        have_service_groups;
 
430
    int        have_check_command;
 
431
    int        have_important_check_command;
 
432
    int        have_check_period;
 
433
    int        have_event_handler;
 
434
    int        have_notification_period;
 
435
    int        have_contact_groups;
 
436
    int        have_contacts;
 
437
    int        have_failure_prediction_options;
 
438
    int        have_notes;
 
439
    int        have_notes_url;
 
440
    int        have_action_url;
 
441
    int        have_icon_image;
 
442
    int        have_icon_image_alt;
 
443
 
 
444
    int        have_initial_state;
 
445
    int        have_max_check_attempts;
 
446
    int        have_check_interval;
 
447
    int        have_retry_interval;
 
448
    int        have_active_checks_enabled;
 
449
    int        have_passive_checks_enabled;
 
450
    int        have_parallelize_check;
 
451
    int        have_is_volatile;
 
452
    int        have_obsess_over_service;
 
453
    int        have_event_handler_enabled;
 
454
    int        have_check_freshness;
 
455
    int        have_freshness_threshold;
 
456
    int        have_low_flap_threshold;
 
457
    int        have_high_flap_threshold;
 
458
    int        have_flap_detection_enabled;
 
459
    int        have_flap_detection_options;
 
460
    int        have_notification_options;
 
461
    int        have_notifications_enabled;
 
462
    int        have_notification_dependencies;
 
463
    int        have_notification_interval;
 
464
    int        have_first_notification_delay;
 
465
    int        have_stalking_options;
 
466
    int        have_process_perf_data;
 
467
    int        have_failure_prediction_enabled;
 
468
    int        have_retain_status_information;
 
469
    int        have_retain_nonstatus_information;
 
470
 
 
471
    int        has_been_resolved;
 
472
    int        register_object;
 
473
    struct xodtemplate_service_struct *next;
 
474
} xodtemplate_service;
475
475
 
476
476
 
477
477
/* SERVICEGROUP TEMPLATE STRUCTURE */
478
 
typedef struct xodtemplate_servicegroup_struct{
479
 
        char      *template;
480
 
        char      *name;
481
 
        int        _config_file;
482
 
        int        _start_line;
483
 
 
484
 
        char      *servicegroup_name;
485
 
        char      *alias;
486
 
        char      *members;
487
 
        char      *servicegroup_members;
488
 
        char      *notes;
489
 
        char      *notes_url;
490
 
        char      *action_url;
491
 
 
492
 
        int       have_members;
493
 
        int       have_servicegroup_members;
494
 
        int       have_notes;
495
 
        int       have_notes_url;
496
 
        int       have_action_url;
497
 
 
498
 
        int       has_been_resolved;
499
 
        int       register_object;
500
 
        struct xodtemplate_servicegroup_struct *next;
501
 
        }xodtemplate_servicegroup;
 
478
typedef struct xodtemplate_servicegroup_struct {
 
479
    char      *template;
 
480
    char      *name;
 
481
    int        _config_file;
 
482
    int        _start_line;
 
483
 
 
484
    char      *servicegroup_name;
 
485
    char      *alias;
 
486
    char      *members;
 
487
    char      *servicegroup_members;
 
488
    char      *notes;
 
489
    char      *notes_url;
 
490
    char      *action_url;
 
491
 
 
492
    int       have_members;
 
493
    int       have_servicegroup_members;
 
494
    int       have_notes;
 
495
    int       have_notes_url;
 
496
    int       have_action_url;
 
497
 
 
498
    int       has_been_resolved;
 
499
    int       register_object;
 
500
    struct xodtemplate_servicegroup_struct *next;
 
501
} xodtemplate_servicegroup;
502
502
 
503
503
 
504
504
/* SERVICEDEPENDENCY TEMPLATE STRUCTURE */
505
 
typedef struct xodtemplate_servicedependency_struct{
506
 
        char       *template;
507
 
        char       *name;
508
 
        int        _config_file;
509
 
        int        _start_line;
510
 
 
511
 
        char       *host_name;
512
 
        char       *service_description;
513
 
        char       *dependent_host_name;
514
 
        char       *dependent_service_description;
515
 
        char       *servicegroup_name;
516
 
        char       *hostgroup_name;
517
 
        char       *dependent_servicegroup_name;
518
 
        char       *dependent_hostgroup_name;
519
 
        char       *dependency_period;
520
 
        int        inherits_parent;
521
 
        int        fail_notify_on_ok;
522
 
        int        fail_notify_on_unknown;
523
 
        int        fail_notify_on_warning;
524
 
        int        fail_notify_on_critical;
525
 
        int        fail_notify_on_pending;
526
 
        int        fail_execute_on_ok;
527
 
        int        fail_execute_on_unknown;
528
 
        int        fail_execute_on_warning;
529
 
        int        fail_execute_on_critical;
530
 
        int        fail_execute_on_pending;
531
 
 
532
 
        int        have_host_name;
533
 
        int        have_service_description;
534
 
        int        have_dependent_host_name;
535
 
        int        have_dependent_service_description;
536
 
        int        have_servicegroup_name;
537
 
        int        have_hostgroup_name;
538
 
        int        have_dependent_servicegroup_name;
539
 
        int        have_dependent_hostgroup_name;
540
 
        int        have_dependency_period;
541
 
 
542
 
        int        have_inherits_parent;
543
 
        int        have_notification_dependency_options;
544
 
        int        have_execution_dependency_options;
545
 
 
546
 
        int        has_been_resolved;
547
 
        int        register_object;
548
 
        struct xodtemplate_servicedependency_struct *next;
549
 
        }xodtemplate_servicedependency;
 
505
typedef struct xodtemplate_servicedependency_struct {
 
506
    char       *template;
 
507
    char       *name;
 
508
    int        _config_file;
 
509
    int        _start_line;
 
510
 
 
511
    char       *host_name;
 
512
    char       *service_description;
 
513
    char       *dependent_host_name;
 
514
    char       *dependent_service_description;
 
515
    char       *servicegroup_name;
 
516
    char       *hostgroup_name;
 
517
    char       *dependent_servicegroup_name;
 
518
    char       *dependent_hostgroup_name;
 
519
    char       *dependency_period;
 
520
    int        inherits_parent;
 
521
    int        fail_notify_on_ok;
 
522
    int        fail_notify_on_unknown;
 
523
    int        fail_notify_on_warning;
 
524
    int        fail_notify_on_critical;
 
525
    int        fail_notify_on_pending;
 
526
    int        fail_execute_on_ok;
 
527
    int        fail_execute_on_unknown;
 
528
    int        fail_execute_on_warning;
 
529
    int        fail_execute_on_critical;
 
530
    int        fail_execute_on_pending;
 
531
 
 
532
    int        have_host_name;
 
533
    int        have_service_description;
 
534
    int        have_dependent_host_name;
 
535
    int        have_dependent_service_description;
 
536
    int        have_servicegroup_name;
 
537
    int        have_hostgroup_name;
 
538
    int        have_dependent_servicegroup_name;
 
539
    int        have_dependent_hostgroup_name;
 
540
    int        have_dependency_period;
 
541
 
 
542
    int        have_inherits_parent;
 
543
    int        have_notification_dependency_options;
 
544
    int        have_execution_dependency_options;
 
545
 
 
546
    int        has_been_resolved;
 
547
    int        register_object;
 
548
    struct xodtemplate_servicedependency_struct *next;
 
549
} xodtemplate_servicedependency;
550
550
 
551
551
 
552
552
/* SERVICEESCALATION TEMPLATE STRUCTURE */
553
 
typedef struct xodtemplate_serviceescalation_struct{
554
 
        char      *template;
555
 
        char      *name;
556
 
        int        _config_file;
557
 
        int        _start_line;
558
 
 
559
 
        char      *host_name;
560
 
        char      *service_description;
561
 
        char      *servicegroup_name;
562
 
        char      *hostgroup_name;
563
 
        int       first_notification;
564
 
        int       last_notification;
565
 
        double    notification_interval;
566
 
        char      *escalation_period;
567
 
        int       escalate_on_warning;
568
 
        int       escalate_on_unknown;
569
 
        int       escalate_on_critical;
570
 
        int       escalate_on_recovery;
571
 
        char      *contact_groups;
572
 
        char      *contacts;
573
 
 
574
 
        int       have_host_name;
575
 
        int       have_service_description;
576
 
        int       have_servicegroup_name;
577
 
        int       have_hostgroup_name;
578
 
        int       have_escalation_period;
579
 
        int       have_contact_groups;
580
 
        int       have_contacts;
581
 
 
582
 
        int       have_first_notification;
583
 
        int       have_last_notification;
584
 
        int       have_notification_interval;
585
 
        int       have_escalation_options;
586
 
 
587
 
        int       has_been_resolved;
588
 
        int       register_object;
589
 
        struct xodtemplate_serviceescalation_struct *next;
590
 
        }xodtemplate_serviceescalation;
 
553
typedef struct xodtemplate_serviceescalation_struct {
 
554
    char      *template;
 
555
    char      *name;
 
556
    int        _config_file;
 
557
    int        _start_line;
 
558
 
 
559
    char      *host_name;
 
560
    char      *service_description;
 
561
    char      *servicegroup_name;
 
562
    char      *hostgroup_name;
 
563
    int       first_notification;
 
564
    int       last_notification;
 
565
    double    notification_interval;
 
566
    char      *escalation_period;
 
567
    int       escalate_on_warning;
 
568
    int       escalate_on_unknown;
 
569
    int       escalate_on_critical;
 
570
    int       escalate_on_recovery;
 
571
    char      *contact_groups;
 
572
    char      *contacts;
 
573
 
 
574
    int       have_host_name;
 
575
    int       have_service_description;
 
576
    int       have_servicegroup_name;
 
577
    int       have_hostgroup_name;
 
578
    int       have_escalation_period;
 
579
    int       have_contact_groups;
 
580
    int       have_contacts;
 
581
 
 
582
    int       have_first_notification;
 
583
    int       have_last_notification;
 
584
    int       have_notification_interval;
 
585
    int       have_escalation_options;
 
586
 
 
587
    int       has_been_resolved;
 
588
    int       register_object;
 
589
    struct xodtemplate_serviceescalation_struct *next;
 
590
} xodtemplate_serviceescalation;
591
591
 
592
592
 
593
593
/* HOSTDEPENDENCY TEMPLATE STRUCTURE */
594
 
typedef struct xodtemplate_hostdependency_struct{
595
 
        char      *template;
596
 
        char      *name;
597
 
        int        _config_file;
598
 
        int        _start_line;
599
 
 
600
 
        char      *host_name;
601
 
        char      *dependent_host_name;
602
 
        char      *hostgroup_name;
603
 
        char      *dependent_hostgroup_name;
604
 
        char      *dependency_period;
605
 
        int       inherits_parent;
606
 
        int       fail_notify_on_up;
607
 
        int       fail_notify_on_down;
608
 
        int       fail_notify_on_unreachable;
609
 
        int       fail_notify_on_pending;
610
 
        int       fail_execute_on_up;
611
 
        int       fail_execute_on_down;
612
 
        int       fail_execute_on_unreachable;
613
 
        int       fail_execute_on_pending;
614
 
 
615
 
        int       have_host_name;
616
 
        int       have_dependent_host_name;
617
 
        int       have_hostgroup_name;
618
 
        int       have_dependent_hostgroup_name;
619
 
        int       have_dependency_period;
620
 
 
621
 
        int       have_inherits_parent;
622
 
        int       have_notification_dependency_options;
623
 
        int       have_execution_dependency_options;
624
 
 
625
 
        int       has_been_resolved;
626
 
        int       register_object;
627
 
        struct xodtemplate_hostdependency_struct *next;
628
 
        }xodtemplate_hostdependency;
 
594
typedef struct xodtemplate_hostdependency_struct {
 
595
    char      *template;
 
596
    char      *name;
 
597
    int        _config_file;
 
598
    int        _start_line;
 
599
 
 
600
    char      *host_name;
 
601
    char      *dependent_host_name;
 
602
    char      *hostgroup_name;
 
603
    char      *dependent_hostgroup_name;
 
604
    char      *dependency_period;
 
605
    int       inherits_parent;
 
606
    int       fail_notify_on_up;
 
607
    int       fail_notify_on_down;
 
608
    int       fail_notify_on_unreachable;
 
609
    int       fail_notify_on_pending;
 
610
    int       fail_execute_on_up;
 
611
    int       fail_execute_on_down;
 
612
    int       fail_execute_on_unreachable;
 
613
    int       fail_execute_on_pending;
 
614
 
 
615
    int       have_host_name;
 
616
    int       have_dependent_host_name;
 
617
    int       have_hostgroup_name;
 
618
    int       have_dependent_hostgroup_name;
 
619
    int       have_dependency_period;
 
620
 
 
621
    int       have_inherits_parent;
 
622
    int       have_notification_dependency_options;
 
623
    int       have_execution_dependency_options;
 
624
 
 
625
    int       has_been_resolved;
 
626
    int       register_object;
 
627
    struct xodtemplate_hostdependency_struct *next;
 
628
} xodtemplate_hostdependency;
629
629
 
630
630
 
631
631
/* HOSTESCALATION TEMPLATE STRUCTURE */
632
 
typedef struct xodtemplate_hostescalation_struct{
633
 
        char      *template;
634
 
        char      *name;
635
 
        int        _config_file;
636
 
        int        _start_line;
637
 
 
638
 
        char      *host_name;
639
 
        char      *hostgroup_name;
640
 
        int       first_notification;
641
 
        int       last_notification;
642
 
        double    notification_interval;
643
 
        char      *escalation_period;
644
 
        int       escalate_on_down;
645
 
        int       escalate_on_unreachable;
646
 
        int       escalate_on_recovery;
647
 
        char      *contact_groups;
648
 
        char      *contacts;
649
 
 
650
 
        int       have_host_name;
651
 
        int       have_hostgroup_name;
652
 
        int       have_escalation_period;
653
 
        int       have_contact_groups;
654
 
        int       have_contacts;
655
 
 
656
 
        int       have_first_notification;
657
 
        int       have_last_notification;
658
 
        int       have_notification_interval;
659
 
        int       have_escalation_options;
660
 
 
661
 
        int       has_been_resolved;
662
 
        int       register_object;
663
 
        struct xodtemplate_hostescalation_struct *next;
664
 
        }xodtemplate_hostescalation;
 
632
typedef struct xodtemplate_hostescalation_struct {
 
633
    char      *template;
 
634
    char      *name;
 
635
    int        _config_file;
 
636
    int        _start_line;
 
637
 
 
638
    char      *host_name;
 
639
    char      *hostgroup_name;
 
640
    int       first_notification;
 
641
    int       last_notification;
 
642
    double    notification_interval;
 
643
    char      *escalation_period;
 
644
    int       escalate_on_down;
 
645
    int       escalate_on_unreachable;
 
646
    int       escalate_on_recovery;
 
647
    char      *contact_groups;
 
648
    char      *contacts;
 
649
 
 
650
    int       have_host_name;
 
651
    int       have_hostgroup_name;
 
652
    int       have_escalation_period;
 
653
    int       have_contact_groups;
 
654
    int       have_contacts;
 
655
 
 
656
    int       have_first_notification;
 
657
    int       have_last_notification;
 
658
    int       have_notification_interval;
 
659
    int       have_escalation_options;
 
660
 
 
661
    int       has_been_resolved;
 
662
    int       register_object;
 
663
    struct xodtemplate_hostescalation_struct *next;
 
664
} xodtemplate_hostescalation;
665
665
 
666
666
 
667
667
/* HOSTEXTINFO TEMPLATE STRUCTURE */
668
 
typedef struct xodtemplate_hostextinfo_struct{
669
 
        char       *template;
670
 
        char       *name;
671
 
        int        _config_file;
672
 
        int        _start_line;
673
 
 
674
 
        char       *host_name;
675
 
        char       *hostgroup_name;
676
 
        char       *notes;
677
 
        char       *notes_url;
678
 
        char       *action_url;
679
 
        char       *icon_image;
680
 
        char       *icon_image_alt;
681
 
        char       *vrml_image;
682
 
        char       *statusmap_image;
683
 
        int        x_2d;
684
 
        int        y_2d;
685
 
        double     x_3d;
686
 
        double     y_3d;
687
 
        double     z_3d;
688
 
 
689
 
        int        have_host_name;
690
 
        int        have_hostgroup_name;
691
 
        int        have_notes;
692
 
        int        have_notes_url;
693
 
        int        have_action_url;
694
 
        int        have_icon_image;
695
 
        int        have_icon_image_alt;
696
 
        int        have_vrml_image;
697
 
        int        have_statusmap_image;
698
 
        
699
 
        int        have_2d_coords;
700
 
        int        have_3d_coords;
701
 
 
702
 
        int        has_been_resolved;
703
 
        int        register_object;
704
 
        struct xodtemplate_hostextinfo_struct *next;
705
 
        }xodtemplate_hostextinfo;
 
668
typedef struct xodtemplate_hostextinfo_struct {
 
669
    char       *template;
 
670
    char       *name;
 
671
    int        _config_file;
 
672
    int        _start_line;
 
673
 
 
674
    char       *host_name;
 
675
    char       *hostgroup_name;
 
676
    char       *notes;
 
677
    char       *notes_url;
 
678
    char       *action_url;
 
679
    char       *icon_image;
 
680
    char       *icon_image_alt;
 
681
    char       *vrml_image;
 
682
    char       *statusmap_image;
 
683
    int        x_2d;
 
684
    int        y_2d;
 
685
    double     x_3d;
 
686
    double     y_3d;
 
687
    double     z_3d;
 
688
 
 
689
    int        have_host_name;
 
690
    int        have_hostgroup_name;
 
691
    int        have_notes;
 
692
    int        have_notes_url;
 
693
    int        have_action_url;
 
694
    int        have_icon_image;
 
695
    int        have_icon_image_alt;
 
696
    int        have_vrml_image;
 
697
    int        have_statusmap_image;
 
698
 
 
699
    int        have_2d_coords;
 
700
    int        have_3d_coords;
 
701
 
 
702
    int        has_been_resolved;
 
703
    int        register_object;
 
704
    struct xodtemplate_hostextinfo_struct *next;
 
705
} xodtemplate_hostextinfo;
706
706
 
707
707
 
708
708
/* SERVICEEXTINFO TEMPLATE STRUCTURE */
709
 
typedef struct xodtemplate_serviceextinfo_struct{
710
 
        char       *template;
711
 
        char       *name;
712
 
        int        _config_file;
713
 
        int        _start_line;
714
 
 
715
 
        char       *host_name;
716
 
        char       *hostgroup_name;
717
 
        char       *service_description;
718
 
        char       *notes;
719
 
        char       *notes_url;
720
 
        char       *action_url;
721
 
        char       *icon_image;
722
 
        char       *icon_image_alt;
723
 
 
724
 
        int        have_host_name;
725
 
        int        have_hostgroup_name;
726
 
        int        have_service_description;
727
 
        int        have_notes;
728
 
        int        have_notes_url;
729
 
        int        have_action_url;
730
 
        int        have_icon_image;
731
 
        int        have_icon_image_alt;
732
 
 
733
 
        int        has_been_resolved;
734
 
        int        register_object;
735
 
        struct xodtemplate_serviceextinfo_struct *next;
736
 
        }xodtemplate_serviceextinfo;
 
709
typedef struct xodtemplate_serviceextinfo_struct {
 
710
    char       *template;
 
711
    char       *name;
 
712
    int        _config_file;
 
713
    int        _start_line;
 
714
 
 
715
    char       *host_name;
 
716
    char       *hostgroup_name;
 
717
    char       *service_description;
 
718
    char       *notes;
 
719
    char       *notes_url;
 
720
    char       *action_url;
 
721
    char       *icon_image;
 
722
    char       *icon_image_alt;
 
723
 
 
724
    int        have_host_name;
 
725
    int        have_hostgroup_name;
 
726
    int        have_service_description;
 
727
    int        have_notes;
 
728
    int        have_notes_url;
 
729
    int        have_action_url;
 
730
    int        have_icon_image;
 
731
    int        have_icon_image_alt;
 
732
 
 
733
    int        has_been_resolved;
 
734
    int        register_object;
 
735
    struct xodtemplate_serviceextinfo_struct *next;
 
736
} xodtemplate_serviceextinfo;
737
737
 
738
738
 
739
739
/* CONTACT LIST STRUCTURE */
740
 
typedef struct xodtemplate_contactlist_struct{
741
 
        char      *contact_name;
742
 
        struct xodtemplate_contactlist_struct *next;
743
 
        }xodtemplate_contactlist;
 
740
typedef struct xodtemplate_contactlist_struct {
 
741
    char      *contact_name;
 
742
    struct xodtemplate_contactlist_struct *next;
 
743
} xodtemplate_contactlist;
744
744
 
745
745
 
746
746
/* HOST LIST STRUCTURE */
747
 
typedef struct xodtemplate_hostlist_struct{
748
 
        char      *host_name;
749
 
        struct xodtemplate_hostlist_struct *next;
750
 
        }xodtemplate_hostlist;
 
747
typedef struct xodtemplate_hostlist_struct {
 
748
    char      *host_name;
 
749
    struct xodtemplate_hostlist_struct *next;
 
750
} xodtemplate_hostlist;
751
751
 
752
752
 
753
753
/* SERVICE LIST STRUCTURE */
754
 
typedef struct xodtemplate_servicelist_struct{
755
 
        char      *host_name;
756
 
        char      *service_description;
757
 
        struct xodtemplate_servicelist_struct *next;
758
 
        }xodtemplate_servicelist;
 
754
typedef struct xodtemplate_servicelist_struct {
 
755
    char      *host_name;
 
756
    char      *service_description;
 
757
    struct xodtemplate_servicelist_struct *next;
 
758
} xodtemplate_servicelist;
759
759
 
760
760
 
761
761
/* MEMBER LIST STRUCTURE */
762
 
typedef struct xodtemplate_memberlist_struct{
763
 
        char      *name1;
764
 
        char      *name2;
765
 
        struct xodtemplate_memberlist_struct *next;
766
 
        }xodtemplate_memberlist;
 
762
typedef struct xodtemplate_memberlist_struct {
 
763
    char      *name1;
 
764
    char      *name2;
 
765
    struct xodtemplate_memberlist_struct *next;
 
766
} xodtemplate_memberlist;
767
767
 
768
768
 
769
769
/***** CHAINED HASH DATA STRUCTURES ******/
770
770
 
771
 
typedef struct xodtemplate_service_cursor_struct{
772
 
        int xodtemplate_service_iterator;
773
 
        xodtemplate_service *current_xodtemplate_service;
774
 
        }xodtemplate_service_cursor;
 
771
typedef struct xodtemplate_service_cursor_struct {
 
772
    int xodtemplate_service_iterator;
 
773
    xodtemplate_service *current_xodtemplate_service;
 
774
} xodtemplate_service_cursor;
775
775
 
776
776
 
777
777
 
778
778
/********* FUNCTION DEFINITIONS **********/
779
779
 
780
 
int xodtemplate_read_config_data(char *,int,int,int);       /* top-level routine processes all config files */
 
780
int xodtemplate_read_config_data(char *, int, int, int);    /* top-level routine processes all config files */
781
781
int xodtemplate_grab_config_info(char *);                   /* grabs variables from main config file */
782
 
int xodtemplate_process_config_file(char *,int);            /* process data in a specific config file */
783
 
int xodtemplate_process_config_dir(char *,int);             /* process all files in a specific config directory */
 
782
int xodtemplate_process_config_file(char *, int);           /* process data in a specific config file */
 
783
int xodtemplate_process_config_dir(char *, int);            /* process all files in a specific config directory */
784
784
 
785
785
#ifdef NSCORE
786
 
char *xodtemplate_config_file_name(int);                    /* returns the name of a numbered config file */
787
 
 
788
 
xodtemplate_memberlist *xodtemplate_expand_contactgroups_and_contacts(char *,char *,int,int);
789
 
int xodtemplate_expand_contactgroups(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
790
 
int xodtemplate_expand_contacts(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
791
 
int xodtemplate_add_contactgroup_members_to_memberlist(xodtemplate_memberlist **,xodtemplate_contactgroup *,int,int);
792
 
 
793
 
xodtemplate_memberlist *xodtemplate_expand_hostgroups_and_hosts(char *,char *,int,int);
794
 
int xodtemplate_expand_hostgroups(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
795
 
int xodtemplate_expand_hosts(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
796
 
int xodtemplate_add_hostgroup_members_to_memberlist(xodtemplate_memberlist **,xodtemplate_hostgroup *,int,int);
797
 
 
798
 
xodtemplate_memberlist *xodtemplate_expand_servicegroups_and_services(char *,char *,char *,int,int);
799
 
int xodtemplate_expand_servicegroups(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
800
 
int xodtemplate_expand_services(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,char *,int,int);
801
 
int xodtemplate_add_servicegroup_members_to_memberlist(xodtemplate_memberlist **,xodtemplate_servicegroup *,int,int);
802
 
 
803
 
char *xodtemplate_process_contactgroup_names(char *,int,int);
804
 
int xodtemplate_get_contactgroup_names(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
805
 
 
806
 
char *xodtemplate_process_hostgroup_names(char *,int,int);
807
 
int xodtemplate_get_hostgroup_names(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
808
 
 
809
 
char *xodtemplate_process_servicegroup_names(char *,int,int);
810
 
int xodtemplate_get_servicegroup_names(xodtemplate_memberlist **,xodtemplate_memberlist **,char *,int,int);
811
 
 
812
 
int xodtemplate_add_member_to_memberlist(xodtemplate_memberlist **,char *,char *);
 
786
xodtemplate_memberlist *xodtemplate_expand_contactgroups_and_contacts(char *, char *, int, int);
 
787
int xodtemplate_expand_contactgroups(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
788
int xodtemplate_expand_contacts(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
789
int xodtemplate_add_contactgroup_members_to_memberlist(xodtemplate_memberlist **, xodtemplate_contactgroup *, int, int);
 
790
 
 
791
xodtemplate_memberlist *xodtemplate_expand_hostgroups_and_hosts(char *, char *, int, int);
 
792
int xodtemplate_expand_hostgroups(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
793
int xodtemplate_expand_hosts(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
794
int xodtemplate_add_hostgroup_members_to_memberlist(xodtemplate_memberlist **, xodtemplate_hostgroup *, int, int);
 
795
 
 
796
xodtemplate_memberlist *xodtemplate_expand_servicegroups_and_services(char *, char *, char *, int, int);
 
797
int xodtemplate_expand_servicegroups(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
798
int xodtemplate_expand_services(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, char *, int, int);
 
799
int xodtemplate_add_servicegroup_members_to_memberlist(xodtemplate_memberlist **, xodtemplate_servicegroup *, int, int);
 
800
 
 
801
char *xodtemplate_process_contactgroup_names(char *, int, int);
 
802
int xodtemplate_get_contactgroup_names(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
803
 
 
804
char *xodtemplate_process_hostgroup_names(char *, int, int);
 
805
int xodtemplate_get_hostgroup_names(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
806
 
 
807
char *xodtemplate_process_servicegroup_names(char *, int, int);
 
808
int xodtemplate_get_servicegroup_names(xodtemplate_memberlist **, xodtemplate_memberlist **, char *, int, int);
 
809
 
 
810
int xodtemplate_add_member_to_memberlist(xodtemplate_memberlist **, char *, char *);
813
811
int xodtemplate_free_memberlist(xodtemplate_memberlist **);
814
 
void xodtemplate_remove_memberlist_item(xodtemplate_memberlist *,xodtemplate_memberlist **);
 
812
void xodtemplate_remove_memberlist_item(xodtemplate_memberlist *, xodtemplate_memberlist **);
815
813
#endif
816
814
 
817
815
 
818
 
int xodtemplate_begin_object_definition(char *,int,int,int);
819
 
int xodtemplate_add_object_property(char *,int);
 
816
int xodtemplate_begin_object_definition(char *, int, int, int);
 
817
int xodtemplate_add_object_property(char *, int);
820
818
int xodtemplate_end_object_definition(int);
821
819
 
822
 
int xodtemplate_parse_timeperiod_directive(xodtemplate_timeperiod *,char *,char *);
823
 
xodtemplate_daterange *xodtemplate_add_exception_to_timeperiod(xodtemplate_timeperiod *,int,int,int,int,int,int,int,int,int,int,int,int,char *);
824
 
int xodtemplate_get_month_from_string(char *,int *);
825
 
int xodtemplate_get_weekday_from_string(char *,int *);
 
820
int xodtemplate_parse_timeperiod_directive(xodtemplate_timeperiod *, char *, char *);
 
821
xodtemplate_daterange *xodtemplate_add_exception_to_timeperiod(xodtemplate_timeperiod *, int, int, int, int, int, int, int, int, int, int, int, int, char *);
 
822
int xodtemplate_get_month_from_string(char *, int *);
 
823
int xodtemplate_get_weekday_from_string(char *, int *);
826
824
 
827
 
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_host(xodtemplate_host *,char *,char *);
828
 
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_service(xodtemplate_service *,char *,char *);
829
 
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_contact(xodtemplate_contact *,char *,char *);
830
 
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_object(xodtemplate_customvariablesmember **,char *,char *);
 
825
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_host(xodtemplate_host *, char *, char *);
 
826
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_service(xodtemplate_service *, char *, char *);
 
827
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_contact(xodtemplate_contact *, char *, char *);
 
828
xodtemplate_customvariablesmember *xodtemplate_add_custom_variable_to_object(xodtemplate_customvariablesmember **, char *, char *);
831
829
 
832
830
 
833
831
int xodtemplate_register_objects(void);
842
840
int xodtemplate_resolve_objects(void);
843
841
 
844
842
int xodtemplate_sort_objects(void);
845
 
int xodtemplate_compare_strings1(char *,char *);
846
 
int xodtemplate_compare_strings2(char *,char *,char *,char *);
 
843
int xodtemplate_compare_strings1(char *, char *);
 
844
int xodtemplate_compare_strings2(char *, char *, char *, char *);
847
845
 
848
846
int xodtemplate_cache_objects(char *);
849
847
 
850
 
int xodtemplate_duplicate_service(xodtemplate_service *,char *);
851
 
int xodtemplate_duplicate_hostescalation(xodtemplate_hostescalation *,char *);
852
 
int xodtemplate_duplicate_serviceescalation(xodtemplate_serviceescalation *,char *,char *);
853
 
int xodtemplate_duplicate_hostdependency(xodtemplate_hostdependency *,char *,char *);
854
 
int xodtemplate_duplicate_servicedependency(xodtemplate_servicedependency *,char *,char *,char *, char *,char *,char *,char *,char *);
855
 
int xodtemplate_duplicate_hostextinfo(xodtemplate_hostextinfo *,char *);
856
 
int xodtemplate_duplicate_serviceextinfo(xodtemplate_serviceextinfo *,char *);
 
848
int xodtemplate_duplicate_service(xodtemplate_service *, char *);
 
849
int xodtemplate_duplicate_hostescalation(xodtemplate_hostescalation *, char *);
 
850
int xodtemplate_duplicate_serviceescalation(xodtemplate_serviceescalation *, char *, char *);
 
851
int xodtemplate_duplicate_hostdependency(xodtemplate_hostdependency *, char *, char *);
 
852
int xodtemplate_duplicate_servicedependency(xodtemplate_servicedependency *, char *, char *, char *, char *, char *, char *, char *, char *);
 
853
int xodtemplate_duplicate_hostextinfo(xodtemplate_hostextinfo *, char *);
 
854
int xodtemplate_duplicate_serviceextinfo(xodtemplate_serviceextinfo *, char *);
857
855
 
858
856
int xodtemplate_recombobulate_contactgroups(void);
859
 
int xodtemplate_recombobulate_contactgroup_subgroups(xodtemplate_contactgroup *,char **);
 
857
int xodtemplate_recombobulate_contactgroup_subgroups(xodtemplate_contactgroup *, char **);
860
858
int xodtemplate_recombobulate_object_contacts(void);
861
859
int xodtemplate_recombobulate_hostgroups(void);
862
860
int xodtemplate_recombobulate_hostgroup_subgroups(xodtemplate_hostgroup *, char **);
863
861
int xodtemplate_recombobulate_servicegroups(void);
864
 
int xodtemplate_recombobulate_servicegroup_subgroups(xodtemplate_servicegroup *,char **);
 
862
int xodtemplate_recombobulate_servicegroup_subgroups(xodtemplate_servicegroup *, char **);
865
863
 
866
864
int xodtemplate_resolve_timeperiod(xodtemplate_timeperiod *);
867
865
int xodtemplate_resolve_command(xodtemplate_command *);
892
890
int xodtemplate_sort_hostescalations(void);
893
891
 
894
892
int xodtemplate_merge_extinfo_ojects(void);
895
 
int xodtemplate_merge_host_extinfo_object(xodtemplate_host *,xodtemplate_hostextinfo *);
896
 
int xodtemplate_merge_service_extinfo_object(xodtemplate_service *,xodtemplate_serviceextinfo *);
 
893
int xodtemplate_merge_host_extinfo_object(xodtemplate_host *, xodtemplate_hostextinfo *);
 
894
int xodtemplate_merge_service_extinfo_object(xodtemplate_service *, xodtemplate_serviceextinfo *);
897
895
 
898
896
xodtemplate_timeperiod *xodtemplate_find_timeperiod(char *);
899
897
xodtemplate_command *xodtemplate_find_command(char *);
910
908
xodtemplate_host *xodtemplate_find_host(char *);
911
909
xodtemplate_host *xodtemplate_find_real_host(char *);
912
910
xodtemplate_service *xodtemplate_find_service(char *);
913
 
xodtemplate_service *xodtemplate_find_real_service(char *,char *);
 
911
xodtemplate_service *xodtemplate_find_real_service(char *, char *);
914
912
xodtemplate_hostdependency *xodtemplate_find_hostdependency(char *);
915
913
xodtemplate_hostescalation *xodtemplate_find_hostescalation(char *);
916
914
xodtemplate_hostextinfo *xodtemplate_find_hostextinfo(char *);
917
915
xodtemplate_serviceextinfo *xodtemplate_find_serviceextinfo(char *);
918
916
 
919
 
int xodtemplate_get_inherited_string(int *,char **,int *,char **);
 
917
int xodtemplate_get_inherited_string(int *, char **, int *, char **);
920
918
int xodtemplate_clean_additive_string(char **);
921
919
int xodtemplate_clean_additive_strings(void);
922
920
#endif
923
921
 
924
922
int xodtemplate_register_timeperiod(xodtemplate_timeperiod *);
925
 
int xodtemplate_get_time_ranges(char *,unsigned long *,unsigned long *);
 
923
int xodtemplate_get_time_ranges(char *, unsigned long *, unsigned long *);
926
924
int xodtemplate_register_command(xodtemplate_command *);
927
925
int xodtemplate_register_contactgroup(xodtemplate_contactgroup *);
928
926
int xodtemplate_register_hostgroup(xodtemplate_hostgroup *);