3
A brief file description
5
@section license License
7
Licensed to the Apache Software Foundation (ASF) under one
8
or more contributor license agreements. See the NOTICE file
9
distributed with this work for additional information
10
regarding copyright ownership. The ASF licenses this file
11
to you under the Apache License, Version 2.0 (the
12
"License"); you may not use this file except in compliance
13
with the License. You may obtain a copy of the License at
15
http://www.apache.org/licenses/LICENSE-2.0
17
Unless required by applicable law or agreed to in writing, software
18
distributed under the License is distributed on an "AS IS" BASIS,
19
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
See the License for the specific language governing permissions and
21
limitations under the License.
24
/**************************************
27
* Base Manager Class, base class for all managers.
29
* $Date: 2004-02-03 22:12:02 $
34
#ifndef _BASE_MANAGER_H
35
#define _BASE_MANAGER_H
37
#include "ink_thread.h"
38
#include "ink_mutex.h"
39
#include "ink_llqueue.h"
44
/*******************************************
45
* used by LocalManager and in Proxy Main. *
47
#define MAX_OPTION_SIZE 2048
48
#define MAX_PROXY_SERVER_PORTS 48
49
#define MAX_ATTR_LEN 5
50
/*******************************************/
55
// Event flows: traffic manager -> traffic server
56
#define MGMT_EVENT_SYNC_KEY 10000
57
#define MGMT_EVENT_SHUTDOWN 10001
58
#define MGMT_EVENT_RESTART 10002
59
#define MGMT_EVENT_BOUNCE 10003
60
#define MGMT_EVENT_CLEAR_STATS 10004
61
#define MGMT_EVENT_CONFIG_FILE_UPDATE 10005
62
#define MGMT_EVENT_PLUGIN_CONFIG_UPDATE 10006
63
#define MGMT_EVENT_HTTP_CLUSTER_DELTA 10007
64
#define MGMT_EVENT_ROLL_LOG_FILES 10008
65
#define MGMT_EVENT_LIBRECORDS 10009
67
/***********************************************************************
69
* MODULAIZATTION: if you are adding new signals, please ensure to add
70
* the corresponding signals in librecords/I_RecSignals.h
73
***********************************************************************/
75
// Signal flows: traffic server -> traffic manager
76
#define MGMT_SIGNAL_PID 0
77
#define MGMT_SIGNAL_MACHINE_UP 1 /* Data is ip addr */
78
#define MGMT_SIGNAL_MACHINE_DOWN 2
79
#define MGMT_SIGNAL_CONFIG_ERROR 3 /* Data is descriptive string */
80
#define MGMT_SIGNAL_SYSTEM_ERROR 4
81
#define MGMT_SIGNAL_LOG_SPACE_CRISIS 5
82
#define MGMT_SIGNAL_CONFIG_FILE_READ 6
83
#define MGMT_SIGNAL_CACHE_ERROR 7
84
#define MGMT_SIGNAL_CACHE_WARNING 8
85
#define MGMT_SIGNAL_LOGGING_ERROR 9
86
#define MGMT_SIGNAL_LOGGING_WARNING 10
87
// Currently unused: 11
88
#define MGMT_SIGNAL_PLUGIN_CONFIG_REG 12
89
#define MGMT_SIGNAL_PLUGIN_ADD_REC 13
90
#define MGMT_SIGNAL_PLUGIN_SET_CONFIG 14
91
#define MGMT_SIGNAL_LOG_FILES_ROLLED 15
92
#define MGMT_SIGNAL_LIBRECORDS 16
93
#define MGMT_SIGNAL_HTTP_CONGESTED_SERVER 20 /* Congestion control -- congested server */
94
#define MGMT_SIGNAL_HTTP_ALLEVIATED_SERVER 21 /* Congestion control -- alleviated server */
96
// Wireless (WDA) plugin signal
97
// Warning: 1. Don't change the # mapping 'cuase 3rd party software depends on them.
98
// 2. Ensure 1:1 maps with alarms in Alarm.h
99
#define INK_MGMT_SIGNAL_WDA_BILLING_CONNECTION_DIED 100
100
#define INK_MGMT_SIGNAL_WDA_BILLING_CORRUPTED_DATA 101
101
#define INK_MGMT_SIGNAL_WDA_XF_ENGINE_DOWN 102
102
#define INK_MGMT_SIGNAL_WDA_RADIUS_CORRUPTED_PACKETS 103
104
#define INK_MGMT_SIGNAL_ACC_ALARMS_START 200
105
#define INK_MGMT_SIGNAL_ACC_ALARMS_END 299
107
#define INK_MGMT_SIGNAL_SAC_SERVER_DOWN 400
109
typedef struct _mgmt_message_hdr_type
116
typedef struct _mgmt_event_callback_list
120
struct _mgmt_event_callback_list *next;
132
int registerMgmtCallback(int msg_id, MgmtCallback func, void *opaque_callback_data = NULL);
134
int signalMgmtEntity(int msg_id, char *data_str = NULL);
135
int signalMgmtEntity(int msg_id, char *data_raw, int data_len);
137
LLQ *mgmt_event_queue;
138
InkHashTable *mgmt_callback_table;
142
void executeMgmtCallback(int msg_id, char *data_raw, int data_len);
146
}; /* End class BaseManager */
149
#endif /* _BASE_MANAGER_H */