OSDN Git Service

Update INSTALL.ja.utf-8 for new release.
[ultramonkey-l7/ultramonkey-l7-v2.git] / include / l7vs_iom.h
1 /*!
2  * @file @l7vs_iom.h
3  * @bried Iom is controlled.  
4  *
5  * L7VSD: Linux Virtual Server for Layer7 Load Balancing
6  * Copyright (C) 2005  NTT COMWARE Corporation.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  **********************************************************************/
24 #ifndef L7VS_IOM_H
25 #define L7VS_IOM_H
26
27 // I/O multiplexing support
28 //#define       L7VS_IOMUX_READ         0x0001
29 //#define L7VS_IOMUX_WRITE        0x0002
30 //#define L7VS_IOMUX_EXCEPT       0x0004
31
32 enum    iomaction{
33         iom_read        = 0,
34         iom_write       = 1,
35         iom_hup         = 3
36 };
37
38 enum    iomstatus{
39         iomux_none      = 0,
40         iomux_create,
41         iomux_disabled,
42
43         //config_common
44         iomux_config_init,                                      //! config before initialize
45         iomux_config_initialized,                               //! config was initialized
46         iomux_config_command_waiting,                           //! command waiting
47         iomux_config_command_response_sent,                     //! command response sent
48         iomux_config_signal_received,                           //! signal received
49         iomux_config_destroyed,                                 //! config finishing process was executed
50
51         //config_list_vs
52         iomux_config_command_list_vs_received,                  //! LIST_VS command received
53         iomux_config_command_list_vs_succeeded,                 //! LIST_VS command succeeded
54
55         //config_list_rs
56         iomux_config_command_list_rs_received,                  //! LIST_RS command received
57         iomux_config_command_list_rs_vs_found,                  //! virtual service was found
58         iomux_config_command_list_rs_succeeded,                 //! LIST_RS command succeeded
59
60         //config_add_vs
61         iomux_config_command_add_vs_received,                   //! ADD_VS command received
62         iomux_config_command_add_vs_vs_not_found,               //! virtual service was not found
63         iomux_config_command_add_vs_lsock_not_found,            //! listening socket was not found
64         iomux_config_command_add_vs_lsock_created,              //! listening socket was created
65         iomux_config_command_add_vs_lsock_got,                  //! listening socket got
66         iomux_config_command_add_vs_protomod_not_found,         //! protocol module was not found
67         iomux_config_command_add_vs_protomod_loaded,            //! protocol module was loaded
68         iomux_config_command_add_vs_protomod_got,               //! protocol module got
69         iomux_config_command_add_vs_sched_not_found,            //! schedule module was not found
70         iomux_config_command_add_vs_sched_loaded,               //! schedule module was loaded
71         iomux_config_command_add_vs_sched_got,                  //! schedule module got
72         iomux_config_command_add_vs_pmod_created,               //! protocol module was created
73         iomux_config_command_add_vs_dup_checked,                //! virtual service duplication check done
74         iomux_config_command_add_vs_vs_created,                 //! virtual service has created
75         iomux_config_command_add_vs_succeeded,                  //! ADD_VS command succeeded
76
77         //config_del_vs
78         iomux_config_command_del_vs_received,                   //! DEL_VS command received
79         iomux_config_command_del_vs_vs_found,                   //! virtual service was found
80         iomux_config_command_del_vs_dest_destroyed,             //! destination was destroyed
81         iomux_config_command_del_vs_succeeded,                  //! DELVS command succeeded
82
83         //config_edit_vs
84         iomux_config_command_edit_vs_received,                  //! EDIT_VS command received
85         iomux_config_command_edit_vs_vs_found,                  //! virtual serveice was found
86         iomux_config_command_edit_vs_sched_not_found,           //! schedule module not found
87         iomux_config_command_edit_vs_sched_loaded,              //! schedule module was loaded
88         iomux_config_command_edit_vs_sched_got,                 //! schedule module got
89         iomux_config_command_edit_vs_succeeded,                 //! EDIT_VS command succeeded
90
91         //config_add_rs
92         iomux_config_command_add_rs_received,                   //! ADD_RS command received
93         iomux_config_command_add_rs_vs_found,                   //! virtual servece was found
94         iomux_config_command_add_rs_rs_not_found,               //! real server was not found
95         iomux_config_command_add_rs_succeeded,                  //! ADD_RS command succeeded
96
97         //config_del_rs
98         iomux_config_command_del_rs_received,                   //! DEL_RS command recdeived
99         iomux_config_command_del_rs_vs_found,                   //! virtual service was found
100         iomux_config_command_del_rs_rs_found,                   //! real service was found
101         iomux_config_command_del_rs_succeeded,                  //! DEL_RS command succeeed
102
103         //config_edit_rs
104         iomux_config_command_edit_rs_received,                  //! EDIT_RS command received
105         iomux_config_command_edit_rs_rs_found,                  //! real service found
106         iomux_config_command_edit_rs_vs_found,                  //! virtual service found
107         iomux_config_command_edit_rs_succeeded,                 //! EDIT_RS command succeeded
108
109         //config_flush_vs
110         iomux_config_command_flush_vs_received,                 //! FLUSH_VS command received
111         iomux_config_command_flush_vs_succeeded,                //! FLUSH_VS command succeeded
112
113         //config_sync_initialize
114         iomux_config_command_sync_initialize_received,          //! SYNC_INIT command received
115         iomux_config_command_sync_initialize_succeeded,         //! SYNC_INIT command succeeded
116
117         //config_sync_initialize
118         iomux_config_command_sync_finalize_received,            //! SYNC_FINI command received
119         iomux_config_command_sync_finalize_succeeded,           //! SYNC_FINI command succeeded
120
121         //config_error
122         iomux_config_command_recv_error,                        //! command receive error
123         iomux_config_command_nomem_error,                       //! no memory error
124         iomux_config_command_novs_error,                        //! virtual service was not found error
125         iomux_config_command_nors_error,                        //! real server was not found error
126         iomux_config_command_vs_exist_error,                    //! virtual service already exist error
127         iomux_config_command_rs_exist_error,                    //! real service already exist error
128         iomux_config_command_nosock_error,                      //! listening socket was not found error
129         iomux_config_command_noprotomod_error,                  //! protocol module was not found error
130         iomux_config_command_nosched_error,                     //! scheduler module was not found error
131         iomux_config_command_vs_create_error,                   //! virtual service create error
132         iomux_config_command_set_qos_error,                     //! set qos error
133         iomux_config_command_set_sorry_server_error,            //! set sorry server error
134
135         //lsock_initialize
136         iomux_lsock_init,                                       //! listening socket before initialize
137         iomux_lsock_initalized,                                 //! listening socket was initialized
138
139         //lsock_create
140         iomux_lsock_not_found,                                  //! listening socket was not found
141         iomux_lsock_created,                                    //! listening socket was created
142         iomux_lsock_got,                                        //! listening socket got
143
144         //lsock_connect_waiting
145         iomux_lsock_connect_waiting,                            //! wait for client connection
146         iomux_lsock_accepted,                                   //! listening socket was accepted
147         iomux_lsock_conn_created,                               //! connection was created
148
149         //lsock_destroy
150         iomux_lsock_released,                                   //! listeing socket was released
151         iomux_lsock_destroyed,                                  //! listeing socket was destroyed
152
153         //lsock_error
154         iomux_lsock_create_error,                               //! listening socket error
155         iomux_lsock_conn_create_error,                          //! create conn error
156
157         //conn_initialize
158         iomux_conn_init,                                        //! connection befor initialize
159         iomux_conn_created,                                     //! connection was created
160
161         //conn_data_excahnge
162         iomux_conn_receive_ready,                               //! data receive ready
163         iomux_conn_receiving,                                   //! data receiving now 
164         iomux_conn_received,                                    //! data receiving finished
165         iomux_conn_send_ready,                                  //! data sending ready
166         iomux_conn_send_ready_busy,                             //! data sending ready and was connected
167         iomux_conn_sending,                                     //! data sending
168         iomux_conn_sending_busy,                                //! data sending and  was connected
169         iomux_conn_sent,                                        //! data sent
170         iomux_conn_sent_busy,                                   //! data send and was connected
171
172         //conn_data_read_control
173         iomux_conn_block,                                       //! can not receive nor sent becase of buffer in use
174         iomux_conn_busy,                                        //! connect action happened during block state
175
176         //conn_process_status
177         iomux_conn_dest_absent,                                 //! destination was absent
178         iomux_conn_dest_decided,                                //! destination was decided
179         iomux_conn_service_selected,                            //! virtual service was selected
180         iomux_conn_rs_connected,                                //! real server was connected
181         iomux_conn_rsdata_modified,                             //! data from real server was modified
182
183         //conn_disconnected
184         iomux_conn_disconnected,                                //! connection was disconnected
185
186         //conn_destroy
187         iomux_conn_destroyed,                                   //! connection was destroyed
188
189         //conn_error
190         iomux_conn_create_error,                                //! create connection error
191         iomux_conn_buffer_realloc_error,                        //! buffer re-allocation error
192
193         iomux_conn_receive_error,                               //! data receive error
194         iomux_conn_send_error,                                  //! data send error
195         iomux_conn_rs_connect_error,                            //! real server connect error
196         iomux_conn_rsdata_modify_error,                         //! data from real server modify error
197
198         //sync_send
199         iomux_sync_sending,                                     //! sending data
200
201         //sync_recv
202         iomux_sync_receving,                                    //! recevind data
203
204         //sync_error
205         iomux_sync_modeerr,                                     //! mode error 
206
207         //sync__destroy
208         iomux_sync_destroy,                                     //! sync finish
209
210         //replication_status
211         iomux_replication_sending,                              //! replication data is sending
212         iomux_replication_receving,                             //! replication data is reciveing
213         iomux_replication_send_wait,                            //! replication data is send wait
214         iomux_replication_recv_wait,                            //! replication data is recv wait
215         iomux_replication_send_stop,                            //! send is stop
216         iomux_replication_recv_stop,                            //! recive is stop
217         iomux_replication_out,                                  //! mode is nothing
218
219
220         // snmpbridge_status
221         iomux_snmp_waiting,                                     //! snmp connection waiting
222         iomux_snmp_receive_ready,                               //! snmp data receive ready
223         iomux_snmp_send_ready,                          //! snmp data send ready
224
225         //replication_status
226         iomux_replication_error,                                //! mode error
227
228         //sync__destroy
229         iomux_replication_destroy                               //! sync finish
230
231 };
232
233 struct  l7vs_iomux{
234         int     fd;
235         int     (*callback)(struct l7vs_iomux* iom );
236         enum    iomstatus status;
237         void*   data;
238 };
239
240 #endif  //L7VS_IOM