1 /**********************************************************************
2 * l7vs_sched.h May 2007
4 * L7VSD: Linux Virtual Server for Layer7 Load Balancing
5 * Copyright (C) 2005 NTT COMWARE Corporation.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 **********************************************************************/
26 #include "l7vs_module.h"
27 #include "logger_wrapper.h"
34 struct l7vs_scheduler{
36 char modname[L7VS_MODNAME_LEN+1];
38 struct l7vs_dest* (*schedule)( struct l7vs_service*, struct l7vs_conn*);
39 void (*bind)( struct l7vs_service*);
40 void (*unbind)(struct l7vs_service*);
42 enum LOG_LEVEL_TAG (*get_log_level)(const enum LOG_CATEGORY_TAG);
43 void (*put_log_debug)(const enum LOG_CATEGORY_TAG, const unsigned int, char*, int, const char*);
44 void (*put_log_info)(const enum LOG_CATEGORY_TAG, const unsigned int, char*, int, const char*);
45 void (*put_log_warn)(const enum LOG_CATEGORY_TAG, const unsigned int, char*, int, const char*);
46 void (*put_log_error)(const enum LOG_CATEGORY_TAG, const unsigned int, char*, int, const char*);
47 void (*put_log_fatal)(const enum LOG_CATEGORY_TAG, const unsigned int, char*, int, const char*);
53 extern struct l7vs_scheduler* l7vs_sched_get(char*);
54 extern void l7vs_sched_put( struct l7vs_scheduler* );
55 extern void l7vs_sched_bind( struct l7vs_scheduler*, struct l7vs_service* );
56 extern void l7vs_sched_unbind( struct l7vs_scheduler*, struct l7vs_service* );
57 extern int l7vs_sched_sorry_check(struct l7vs_service*, int);
58 extern struct l7vs_dest* l7vs_sched_sorry_dest(struct l7vs_service*, struct l7vs_conn*, int);