OSDN Git Service

Merge commit 'sfj/autotools-fix'; commit 'sfj/modulefix'; commit 'sfj/sslid-sslidleng...
[ultramonkey-l7/ultramonkey-l7-v2.git] / module / protocol / protomod_sslid.h
1 /*
2  * @file  protomod_sslid.h
3  * @brief protocol module of HTTPS(SSL/TLS).
4  * @brief this module provide session persistence by SSL session ID.
5  *
6  * L7VSD: Linux Virtual Server for Layer7 Load Balancing
7  * Copyright (C) 2008  NTT COMWARE Corporation.
8  * Copyright (C) 2009  Shinya TAKEBAYASHI
9  * Copyright (C) 2009  NTT Resonant Inc. O.Nakayama, T.Motoda.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24  * 02110-1301 USA
25  *
26  **********************************************************************/
27
28 #ifndef __PROTOMOD_SSLID_H_7E0F0EB6_200B_4839_8C5D_60E4473F9E40__
29 #define __PROTOMOD_SSLID_H_7E0F0EB6_200B_4839_8C5D_60E4473F9E40__
30
31 #include "l7vs_service.h"
32
33 #define SERVICE_ARG_MAXSIZE  (512)
34 #define SSLID_SERVICE_NUMBER (128)
35 #define SSLID_LENGTH         (32)
36
37 struct l7vs_sslid_service {
38         handle_t service_handle;
39         int timeout;
40         int maxlist;
41         struct ssl_session* session;
42         void* hash_map;
43         void* hash_list;
44         void* replication_addr;
45         int reschedule;
46 };
47
48 struct l7vs_sslid_service_arg {
49         int timeout;
50         int maxlist;
51         int reschedule;
52 };
53
54 struct ssl_session {
55         int  id_len;            /* Session id length 2009.4.8 T.Motoda@NTTR */
56         char id[SSLID_LENGTH];
57         struct l7vs_dest dest;
58         time_t last_time;
59         char valid;
60 };
61
62 struct replication_header {
63         struct in_addr sin_addr;
64         unsigned short sin_port;
65         unsigned int size;
66         unsigned int offset;
67 };
68
69 #endif // __PROTOMOD_SSLID_H_7E0F0EB6_200B_4839_8C5D_60E4473F9E40__
70