[Sep. 06 2010] 3.0.0-0 Norihisa NAKAI, Hiromasa KANDA, LANG XIJIAN
- - Implimented Multi-threading architecture using Boost::Asio and Boost::Thread library.
- - Implimented IPv6 protocol logic.
- - Implimented SorryURI support.
+ - Implemented Multi-threading architecture using Boost::Asio and Boost::Thread library.
+ - Implemented IPv6 protocol logic.
+ - Implemented SorryURI support.
- Change protocol between l7vsadm and l7vsd from DGRAM to STREAM.
And serialized stream data using Boost::Serializable.
- Change protocol and schedule module architecture to module event driven model.
- Fixed algorithm for logger. (Search Log mode logic added.)
- Fixed algorithm for parameter. (Using boost algorithm template.)
- - Implimented SNMPAgent function in l7vsd.
+ - Implemented SNMPAgent function in l7vsd.
/*
FIXME add other changes
[Dec. 17 2008] 2.1.0-0 Shinya TAKEBAYASHI
- Added option for FAST SCHEDULE to sessionless module
Establishing connection when client connection was established.
- - Implimented access logger ( CLIENT-DESTINATION mapping )
+ - Implemented access logger ( CLIENT-DESTINATION mapping )
- Optimized event listener.
- Fixed algorithms for some check type.
- "Checkout" has been enabled.
- Created "man" page.(Japanese(UTF-8) only ;))
- - Implimented flow control logic(sever).
+ - Implemented flow control logic(sever).
- Eliminated flow control logic(client).
[May. 26 2008] 2.0.0-0 Shinya TAKEBAYASHI
- Changed logger library( vanessa_logger -> log4cxx)
- Implemented configuration function(using configuration file: /etc/l7vs\l7vs.cf)
- - Implemented replication system(forHA clustering)
+ - Implemented replication system(for HA clustering)
- Added new protocol module(sessionless - Layer-4 LB like module)
[Dec. 11 2007] 1.0.0-1 Shinya TAKEBAYASHI
- Implemented blocking mode switching function
[Oct. 11 2007] 1.0.0-0 Shinya TAKEBAYASHI
- - Change liblary from GLib1.2 to GLib2.0 (memory leak fix)
+ - Change library from GLib1.2 to GLib2.0 (memory leak fix)
- Change from select() to epoll ET.
- - Change bloking mode to non-blocking mode(recv() and send()).
+ - Change blocking mode to non-blocking mode(recv() and send()).
- Change from service conn list to service conn hash.
- Change from iomux-list to hash-map and available list.
- Add QoS Control.
######################################################################
# Makefile Dec 2008
#
-# UltraMonkey-L7: Linux Layer7 loadbarancer Server
+# UltraMonkey-L7: Linux Layer7 load balancing server
# Copyright (C) 2008 NTT COMWARE Corporation.
#
# This program is free software; you can redistribute it and/or
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 192.168.0.50:80
real = 192.168.0.51:80 masq 1
%define _sysconfdir /etc
%define _localstatedir /var
-Summary: UltraMonkey-l7 Layer7 software load brancer server
+Summary: UltraMonkey-l7 Layer7 software load balancing server
Name: l7vsd
Version: 3.0.0
Release: 0
#Requires:
%description
-Layer7 load barancer server daemon that works with TCP/UDP barancing
+Layer7 load balancing server daemon that works with TCP/UDP balancing
%prep
rm -rf ${RPM_BUILD_ROOT}
# will result in fewer portability problems than using the one supplied
# by various vendours. I fear that I hope in vein.
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
-if [ -f confgure.in ]; then
+if [ -f configure.in ]; then
aclocal
libtoolize --force --copy
automake
# ${RPM_BUILD_DIR}/%{name}-%{version}/etc/init.d/sslproxy.rh \
# ${RPM_BUILD_ROOT}/etc/init.d/sslproxy
-# Install eveything else
+# Install everything else
#make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -c -m 755 -D src/l7vsadm $RPM_BUILD_ROOT%{_sbindir}
-install -c -m 755 -D src/l7vsd $RPM_BUILD_ROOT%{_sibdir}
+install -c -m 755 -D src/l7vsd $RPM_BUILD_ROOT%{_sbindir}
install -c -m 755 -D init.d/sslproxy $RPM_BUILD_ROOT%{_sysconfdir}/init.d
std::string rotation_key; //!< parameter rotation kind key
LOG_ROTATION_TAG
rotation_value; //!< parameter rotation kind value
- std::string max_backup_index_key; //!< parameter backup maximam number key
- unsigned int max_backup_index_value; //!< parameter backup maximam number value
- std::string max_file_size_key; //!< parameter maximam backup size key
+ std::string max_backup_index_key; //!< parameter backup maximum number key
+ unsigned int max_backup_index_value; //!< parameter backup maximum number value
+ std::string max_file_size_key; //!< parameter maximum backup size key
unsigned long long
- max_file_size_value; //!< parameter maximam backup size value
+ max_file_size_value; //!< parameter maximum backup size value
std::string rotation_timing_key; //!< parameter rotation timing key
LOG_ROTATION_TIMING_TAG
rotation_timing_value; //!< parameter rotation timing value
std::string rotation_timing_value_key; //!< parameter rotation timing value key
std::string rotation_timing_value_value;//!< parameter rotation timing value value
- appender_property() : //!< constractor
+ appender_property() : //!< constructor
rotation_value(LOG_ROT_SIZE),
max_backup_index_value(0),
max_file_size_value(0),
boost::asio::io_service &dispatcher;
//! acceptor
boost::asio::local::stream_protocol::acceptor acceptor_;
- //! l7vsd refference
+ //! l7vsd reference
l7vsd &vsd;
- //! socketfile
+ //! socket file
std::string sockfile;
//! @brief accept handler
//! @brief constructor
//! @param[in] io_service
//! @param[in] socket file
- //! @param[in] l7vsd refernce
+ //! @param[in] l7vsd reference
command_receiver(boost::asio::io_service &, const std::string &, l7vsd &);
//! @brief destructor
l7vsadm_request request_data;
//! l7vsd response data
l7vsd_response response_data;
- //! l7vsd refferecne
+ //! l7vsd reference
l7vsd &vsd;
//! command to handler map
command_handler_map_type command_handler_map;
public:
//! @brief constructor
//! @param[in] io_service
- //! @param[in] l7vsd refernce
+ //! @param[in] l7vsd reference
command_session(boost::asio::io_service &, l7vsd &);
- //! @brief return unixsocket
+ //! @brief return unix socket
unixsocket_type &socket() {
return unixsocket;
}
class data_buff_base : private boost::noncopyable
{
public:
- //! construcor
+ //! constructor
data_buff_base();
//! destructor
~data_buff_base();
-//! construcor
+//! constructor
template< typename InternetProtocol >
data_buff_base< InternetProtocol >::data_buff_base()
{
/*!
* @file error_code.h
- * @brief error code and error messege impliment class
+ * @brief error code and error message implement class
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
class error_code
{
protected:
- bool flag; //!< errorcode flag
- std::string msg; //!< errorcode message
+ bool flag; //!< error code flag
+ std::string msg; //!< error code message
public:
- error_code() : flag(false) {} //!< constractor
- //! setter constractor
+ error_code() : flag(false) {} //!< constructor
+ //! setter constructor
//! @param[in] flags
//! @param[in] error message
error_code(const bool inflg, const std::string &instr) {
msg = instr;
}
bool operator==(const bool in)const {
- return (flag == in); //!< operator== orverload
+ return (flag == in); //!< operator== overload
}
bool operator!=(const bool in)const {
- return (flag != in); //!< operator!= orverload
+ return (flag != in); //!< operator!= overload
}
bool operator!() const {
- return !flag; //!< operator! orverload
+ return !flag; //!< operator! overload
}
typedef void (*unspecified_bool_type)(); //!< if return function
- static void unspecified_bool_true() {} //!< if true orverload function
+ static void unspecified_bool_true() {} //!< if true overload function
operator unspecified_bool_type() const {
- return flag == 0 ? 0 : unspecified_bool_true; //!< if() orverload
+ return flag == 0 ? 0 : unspecified_bool_true; //!< if() overload
}
const std::string &get_message() const {
return msg; //!< message getter
LOG_LEVEL_TAG log_level; //!< use log level change mode target category log level
PARAMETER_COMPONENT_TAG reload_param; //!< set reload param mode
snmp_info snmpinfo;
- //! constractor
+ //! constructor
l7vsadm_request() : command(CMD_NONE),
replication_command(REP_NONE),
log_category(LOG_CAT_NONE),
replication::REPLICATION_MODE_TAG replication_mode_status;//!< replication status.
std::list< log_category_level_type >
- log_status_list; //!< log cateogries statuses.
+ log_status_list; //!< log categories statuses.
//bool snmp_connection_status; //!< snmp connection status
snmp_info snmpinfo;
unsigned long long total_bps; //!< l7vsd's total bit par sec
- unsigned long long total_client_recv_byte; //!< l7vsd's total client recive bytes
+ unsigned long long total_client_recv_byte; //!< l7vsd's total client receive bytes
unsigned long long total_client_send_byte; //!< l7vsd's total client send bytes
- unsigned long long total_realserver_recv_byte; //!< l7vsd's total realserver recive bytes
+ unsigned long long total_realserver_recv_byte; //!< l7vsd's total realserver receive bytes
unsigned long long total_realserver_send_byte; //!< l7vsd's total realserver send bytes
std::vector<virtualservice_element>
virtualservice_vec; //!< virtualservice lists
private:
friend class boost::serialization::access; //! friend boost serializable class
//! serializable
- //! @brief using boost serialiable. class serializable function.
+ //! @brief using boost serializable. class serializable function.
//! @param[in] archive
//! @param[in] version
template <class Archive > void serialize(Archive &ar, const unsigned int version) {
}
};
-} // namespase l7vsd
+} // namespace l7vsd
#endif //L7COMMAND_H
bool parse_opt_vs_fwdmode_func(int &, int, char*[]);
//! virtualservice option qosupstream function
bool parse_opt_vs_qosup_func(int &, int, char*[]);
- //! virtualservice option qosdownstream functipn
+ //! virtualservice option qosdownstream function
bool parse_opt_vs_qosdown_func(int &, int, char*[]);
//! virtualservice option udp func.
bool parse_opt_vs_udp_func(int &, int, char*[]);
l7vsadm_request request; //!< send_request
l7vsd_response response; //!< recv_response
- // l7vsadm using datas.
+ // l7vsadm using data.
bool numeric_flag; //!< numeric flag
boost::asio::io_service io_service; //!< io_service
int command_wait_count;
public:
- //! constractor
+ //! constructor
l7vsadm();
//! execute function
typedef Hash hasher_type;
hasher_type hasher;
- // constractor
+ // constructor
lockfree_hashmap(size_t num = 65535, Hash inhasher = boost::hash< const Tkey * >()) :
element_num(num) {
hashmap = new container[element_num];
__sync_lock_test_and_set(&counter, 0);
}
- // destractor
+ // destructor
virtual ~lockfree_hashmap() {
delete [] hashmap;
}
}
}
- //eracer
+ //eraser
void erase(const Tkey *key) {
size_t hashvalue = get_hashvalue(key);
for (;;) {
__sync_lock_test_and_set(&counter, 0);
}
- //poper
+ //popper
void pop(Tkey*& key, Tvalue*& value) {
for (size_t i = 0 ; likely(i < element_num) ; ++i) {
if (unlikely(hashmap[i].key)) {
return !counter;
}
- // functor
+ // functor XXX
void do_all(boost::function< void(Tvalue *) > func) {
for (size_t i = 0; likely(i < element_num) ; ++i) {
if (unlikely(hashmap[i].key)) {
size_t get_hashvalue(const Tkey *key) {
return hasher(key) % element_num;
}
- //reget array number case of collision(method chain)
+ //re-get array number case of collision(method chain)
size_t get_rehashvalue(size_t &key) {
return ((key + 1) % element_num);
}
volatile node_type *node;
const size_t element_num;
public:
- // constractor
+ // constructor
explicit lockfree_queue(size_t num = 65535) : counter(0), element_num(num) {
node = new node_type[element_num];
headloc = tailloc = 0;
}
- // destractor
+ // destructor
~lockfree_queue() {
delete [] node;
}
return true;
}
- //poper
+ //popper
Tvalue *pop() {
size_t head, nexthead;
Tvalue *rtnvalue;
//! @class Logger
//! @brief Logger creation class.
-//! @brief this class create Logger Inmlement class and mediate function.
+//! @brief this class create Logger Implement class and mediate function.
class Logger
{
//! default constructor creates implement class.
Logger();
- //! log output constractor
- //! scoped log output( Logger destractor output log)
+ //! log output constructor
+ //! scoped log output( Logger destructor output log)
//! @param[in] Log output category tag
//! @param[in] log id
//! @param[in] log message
//! @param[in] lineno (=__LINE__)
Logger(LOG_CATEGORY_TAG, const unsigned int, const std::string &, const char *, int);
- //! destructor.(output log then use log output constractor)
+ //! destructor.(output log then use log output constructor)
~Logger();
//! load Configuration.
//! @param[in] logcategory
//! @param[in] loglevel
//! @return true success loglevel change
- //! @return false failer loglevel change
+ //! @return false fail loglevel change
static bool setLogLevel(LOG_CATEGORY_TAG cat, LOG_LEVEL_TAG level);
//! set all category's log level.
//! @param[in] logcategory
//! @param[in] loglevel
//! @return true success loglevel change
- //! @return false failer loglevel change
+ //! @return false frailer loglevel change
static bool setLogLevelAll(LOG_LEVEL_TAG level);
//! output fatal log.
namespace l7vs
{
-//! @class Lologger_access_managergger
+//! @class logger_access_manager
//! @brief logger_implement_access creation class.
//! @brief this class create logger_implement_access and rotate check function.
class logger_access_manager
accesslog_rotate_default_map_type_iterator;
/*!
- * initialze function.
+ * initialize function.
*
* @retrun current instance.
*/
* log rotate parameter check function.
*
* @param logrotation designation contents
- * @retrun false faild.
+ * @retrun false failed.
*/
bool access_log_logrotate_parameter_check(
const std::map<std::string, std::string>& rotatedata);
LOG_LV_FATAL //!< loglevel is fatal
};
-//! loglevel enum incliment function
-//! @param[in] logleveltag refarence
+//! loglevel enum increment function
+//! @param[in] logleveltag reference
//! @return logleveltag reference
inline LOG_LEVEL_TAG &operator++(LOG_LEVEL_TAG &level)
{
LOG_CAT_L7VSD_SESSION, //!< logcategory is session
LOG_CAT_L7VSD_SESSION_THREAD, //!< logcategory is session thread
LOG_CAT_L7VSD_REALSERVER, //!< logcategory is realserver
- LOG_CAT_L7VSD_SORRYSERVER, //!< logcategory is sollyserver
- LOG_CAT_L7VSD_MODULE, //!< logcategory is module controler
+ LOG_CAT_L7VSD_SORRYSERVER, //!< logcategory is sorryserver
+ LOG_CAT_L7VSD_MODULE, //!< logcategory is module controller
LOG_CAT_L7VSD_REPLICATION, //!< logcategory is replication
LOG_CAT_L7VSD_REPLICATION_SENDTHREAD, //!< logcategory is replication send thread
LOG_CAT_L7VSD_PARAMETER, //!< logcategory is parameter
LOG_CAT_L7VSD_LOGGER, //!< logcategory is logger
- LOG_CAT_L7VSD_COMMAND, //!< logcategory is command reciver
+ LOG_CAT_L7VSD_COMMAND, //!< logcategory is command receiver
LOG_CAT_L7VSD_START_STOP, //!< logcategory is main function used
LOG_CAT_L7VSD_SYSTEM, //!< logcategory is systemcall other
LOG_CAT_L7VSD_SYSTEM_MEMORY, //!< logcategory is systemcall memory
};
-//! logcategory enum incliment function
-//! @param[in] logcategorytag refarence
+//! logcategory enum increment function
+//! @param[in] logcategorytag reference
//! @return logcategorytag reference
inline LOG_CATEGORY_TAG &operator++(LOG_CATEGORY_TAG &cat)
{
//! returns current instance.
static LoggerImpl &getInstance();
- //! initialze function
+ //! initialize function
virtual bool init();
//! Configuration function
/*!
* output fatal log.
*
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output error log.
*
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output warn log.
*
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output info log.
*
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output debug log.
*
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
//! default constructor initialize member variables.
LoggerImpl();
- //! cpoy constructor disable
+ //! copy constructor disable
LoggerImpl(const LoggerImpl &);
//! operator= disable
LoggerImpl &operator=(const LoggerImpl &);
- //! LOG_LEVEL_TAG to log4cxx::LevelPtr transrator
+ //! LOG_LEVEL_TAG to log4cxx::LevelPtr translator
virtual inline const log4cxx::LevelPtr toLevel(LOG_LEVEL_TAG level) {
return log4cxx::Level::toLevel(levelTable[level]);
}
- //! if error occured, switch appenders to syslogappender and fileappender(/dev/console)
+ //! if error occurred, switch appenders to syslogappender and fileappender(/dev/console)
virtual void errorConf(unsigned int messageId,
const std::string &errorMessage,
const char *file,
virtual void logic_error(const unsigned int, const std::string &, const char *, const unsigned int);
/*
- //! log4cxx::LevelPtr to LOG_LEVEL_TAG transrator
+ //! log4cxx::LevelPtr to LOG_LEVEL_TAG translator
virtual inline LOG_LEVEL_TAG toLevelTag(const log4cxx::LevelPtr level){
int levelInt = level->toInt();
switch (levelInt) {
//! category - loglevel hash map
category_level_map_type category_level_map;
category_level_read_map_type category_level_read_map;
- //! category string -> logcateogry hash map
+ //! category string -> logcategory hash map
name_category_map_type name_category_map;
//! log_category -> category string hash map
category_name_map_type category_name_map;
virtual ~logger_implement_access() {};
/*!
- * initialze function.
+ * initialize function.
*
* @param default logrotation info use flag
* @param default logrotation info
}
/*!
- * increase reffernce count.
+ * increase reference count.
*
* @retrun void
*/
virtual void addRef();
/*!
- * decrease reffernce count.
+ * decrease reference count.
*
* @retrun void
*/
virtual void releaseRef();
/*!
- * decrease reffernce count.
+ * decrease reference count.
*
* @param inequal check object
* @return check result
/*!
- * @file logger_rogrote_utility.h
+ * @file logger_logrotate_utility.h
* @brief log rotation utility header.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
/*!
* rotate type check.
*
- * @param rotaton string("size" or "date" or "datesize")
+ * @param rotation string("size" or "date" or "datesize")
* @return LOG_ROTATION_TAG val
*/
static LOG_ROTATION_TAG check_rotate_type(
*
* @param check object.
* @param appender property
- * @return false faild
+ * @return false failed
*/
- static bool acccess_log_LogrotateParamCheck(
+ static bool access_log_LogrotateParamCheck(
accesslog_rotate_map_type &rotatedata,
appender_property &access_log_property);
* @param line no
* @return void
*/
- static void loglotation_utility_logic_error(
+ static void logrotation_utility_logic_error(
const unsigned int logno,
const std::string &str,
const char *file ,
};
-#endif // LOGGER_ROGROTATE_UTILITY
+#endif // LOGGER_LOGROTATE_UTILITY
mibdata& operator=(const mibdata &);
/*!
- * update virtual service table infomation.
+ * update virtual service table information.
*
* @param l7vsd * l7vsd pointer
* @param error_code & error code
void update_vs_table(l7vsd *, error_code &);
/*!
- * update real server table infomation.
+ * update real server table information.
*
* @param const std::vector<rsdata> & temporary real server list
* @param error_code & error code
//! @class module_base
//! @brief protocol module and schedule module base class
-//! @brief all module class is extened this class.
+//! @brief all module class is extend this class.
class module_base
{
public:
logger_func_type putLogInfo; //!< info log output function object
logger_func_type putLogDebug; //!< debug log output function object
- //! replication memory peyment method
+ //! replication memory payment method
replicationpaymemory_func_type replication_pay_memory;
//! replication area lock function object
boost::asio::ip::udp::endpoint virtual_service_endpoint_udp;
public:
- //! constractor
+ //! constructor
module_base(std::string in_modulename) {
name = in_modulename;
}
- //! destractor
+ //! destructor
virtual ~module_base() {}
//! tcp protocol support check
//! @return tcp support is true
//! replication function object setter.
//! @param[in] replication pay memory function object
//! @param[in] replication lock function object
- //! @param[in] replication unlock undontion object
+ //! @param[in] replication unlock function object
//! @param[in] virtual service endpoint tcp
//! @param[in] virtual service endpoint udp
void init_replication_functions(
// Because Loop and Timer control is in virtual_service.
// virtual_service call replication_interrupt in specified time at once.
// when called, replication_interrupt write data at once.
- //! replication interval interrrupt
+ //! replication interval interrupt
//! timer thread call this function. from virtualservice.
virtual void replication_interrupt() = 0;
};
/*!
* @file protocol_module_base.h
- * @brief shared object protocol module absctract class
+ * @brief shared object protocol module abstract class
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
{
protected:
std::string modulefile_path; //!< shared object path
- virtual ~module_control_base() {}; //!< destractor
+ virtual ~module_control_base() {}; //!< destructor
public:
//! @brief initialize prototype function is fist called
virtual void initialize(const std::string &infile_path) = 0;
/*!
* @file parameter.h
- * @brief ultramonke-l7 parameter class.
+ * @brief ultramonkey-l7 parameter class.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
class Parameter
{
public:
- Parameter(); //!< default constractor
- ~Parameter(); //!< default destractor
+ Parameter(); //!< default constructor
+ ~Parameter(); //!< default destructor
//! initialize(file designation)
//! @param[in] component tag
//! @param[in] file name
//! @return true success
- //! @return false failer
+ //! @return false fail
bool init(const PARAMETER_COMPONENT_TAG, const std::string &);
//! reload file function
- //! @param[in] parameter conponent tag
+ //! @param[in] parameter component tag
//! @param[in] configuration filename
//! default:PARAMETER_FILE
//! @return true success file read
const std::string& = PARAMETER_FILE);
//! parameter int value getter
- //! @param[in] parametercategory
+ //! @param[in] parameter category
//! @param[in] parameter key
//! @param[out] error code
//! @param[in] configuration filename
const std::string& = PARAMETER_FILE);
//! parameter string value getter
- //! @param[in] parametercategory
+ //! @param[in] parameter category
//! @param[in] parameter key
//! @param[out] error code
//! @param[in] configuration filename
const std::string& = PARAMETER_FILE);
//! parameter multistring value getter
- //! @param[in] parametercategory
+ //! @param[in] parameter category
//! @param[in] parameter key
//! @param[inout] string vector
//! @param[out] error code
/*!
* @file parameter_enum.h
- * @brief ultramonke-l7 parameter enum prototype.
+ * @brief ultramonkey-l7 parameter enum prototype.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
namespace l7vs
{
-//! @enum PARAMTER_COMPONENT_TAG
+//! @enum PARAMETER_COMPONENT_TAG
//! @brief parameter key tags
enum PARAMETER_COMPONENT_TAG {
PARAM_COMP_NOCAT = 0, //!< parameter category is none
/*!
- * @file paramter_impl.h
- * @brief ultramonke-l7 parameter impliment class.
+ * @file parameter_impl.h
+ * @brief ultramonkey-l7 parameter implement class.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
boost::mutex create_mutex;
//! read / write mutex
boost::mutex param_mutex;
- //! componenttag to section name map
+ //! component tag to section name map
std::map< PARAMETER_COMPONENT_TAG, std::string >
tag_section_table_map;
- //! constractor
+ //! constructor
ParameterImpl() {}
- //! destractor
+ //! destructor
~ParameterImpl() {}
public:
- //! instansgetter
+ //! instance getter
//! @return instance
static ParameterImpl &get_instance() {
static ParameterImpl instance;
//! initialize
//! @return true success
- //! @return false failer
+ //! @return false fail
bool init();
//! initialize(file designation)
//! @param[in] component tag
//! @param[in] file name
//! @return true success
- //! @return false failer
+ //! @return false fail
bool init(const PARAMETER_COMPONENT_TAG, const std::string &);
//! target component read
//! @param[in] component tag
//! @param[in] file name
- //! @return false failer
+ //! @return false fail
//! @return true success
bool read_file(const PARAMETER_COMPONENT_TAG, const std::string &);
//! int value getter
//! @param[in] component tag
- //! @param[in] keystring
- //! @param[out] errorcode
+ //! @param[in] key string
+ //! @param[out] error code
//! @param[in] file name
//! @return int value
int get_int(const PARAMETER_COMPONENT_TAG,
//! string value getter
//! @param[in] component tag
- //! @param[in] keystring
- //! @param[out] errorcode
+ //! @param[in] key string
+ //! @param[out] error code
//! @param[in] file name
//! @return string value
std::string get_string(const PARAMETER_COMPONENT_TAG,
//! multistring value getter
//! @param[in] component tag
- //! @param[in] keystring
+ //! @param[in] key string
//! @param[inout] string vector
- //! @param[out] errorcode
+ //! @param[out] error code
//! @param[in] file name
//! @return void
void get_multistring(const PARAMETER_COMPONENT_TAG,
{
//! @class stats_base
-//! @brief this class is base class of all statistic infomation classes.
+//! @brief this class is base class of all statistic information classes.
class stats_base
{
public:
//! constructor
stats_base(STATS_MODE_TAG m) : mode(m) {};
- //! destractor
+ //! destructor
~stats_base() {};
//! get statistic mode
};
//! @class stats_base
-//! @brief this class is a class of http statistic infomation classes.
+//! @brief this class is a class of http statistic information classes.
class http_stats : public stats_base
{
public:
http_post_requests = 0;
};
- //! destractor
+ //! destructor
~http_stats(){};
//! http request counts
//! @struct check_message_result
//! @brief this class is POD. this class used then return multi value
struct check_message_result {
- bool flag; //! return flasg
+ bool flag; //! return flag
std::string message; //! return message
//! == operator
//! @param[in] check_message_result& is equal check object.
bool operator!=(const check_message_result &in) {
return ((flag != in.flag) || (message != in.message));
}
- //! constractor
+ //! constructor
check_message_result() : flag(false) {}
};
protected:
bool statistic; //!< collect statistic flag
public:
- //! constractor
+ //! constructor
protocol_module_base(std::string in_modulename) : module_base(in_modulename), statistic(false) {};
- //! destractor
+ //! destructor
virtual ~protocol_module_base() {};
//! initialize function. called from module control. module loaded call
//! @param[in] realserver list iterator begin function object type
//! module parameter check.used by l7vsadm
- //! @param[in] module paramter string list
- //! @return result.flag true is parameter is noproblem.
- //! @return result.flag false is paramter is problem.
+ //! @param[in] module parameter string list
+ //! @return result.flag true is parameter is no problem.
+ //! @return result.flag false is parameter is problem.
virtual check_message_result check_parameter(const std::vector<std::string>& args) = 0;
//! parameter set
- //! @param[in] module paramter string list
- //! @return result.flag true is parameter is noproblem.
- //! @return result.flag false is paramter is problem.
+ //! @param[in] module parameter string list
+ //! @return result.flag true is parameter is no problem.
+ //! @return result.flag false is parameter is problem.
virtual check_message_result set_parameter(const std::vector<std::string>& args) = 0;
//! parameter add
- //! @param[in] module paramter string list
- //! @return result.flag true is parameter is noproblem.
- //! @return result.flag false is paramter is problem.
+ //! @param[in] module parameter string list
+ //! @return result.flag true is parameter is no problem.
+ //! @return result.flag false is parameter is problem.
virtual check_message_result add_parameter(const std::vector<std::string>& args) = 0;
//! get option info
//! @param[out] module parameter string
virtual void get_option_info(std::string &option) = 0;
- //! TCP/IP scheduled function registation.
+ //! TCP/IP scheduled function registration.
//! @param[in] schedule module TCP/IP scheduled function object type
virtual void register_schedule(tcp_schedule_func_type inschedule) = 0;
- //! UDP scheduled function registation
- //! @param[in] schedule module UDP scheduled funtion object type
+ //! UDP scheduled function registration
+ //! @param[in] schedule module UDP scheduled function object type
virtual void register_schedule(udp_schedule_func_type inschedule) = 0;
- //! called from session initialzie use in upstream_thread
+ //! called from session initialize use in upstream_thread
//! @param[in] upstream thread id.
//! @param[in] downstream thread id
//! @return session use EVENT mode.
//! called from after session recv in client socket. use in upstream thread.
//! @param[in] upstream thread id
- //! @param[in] recive buffer refarence.
- //! @param[in] recive length
+ //! @param[in] receive buffer reference.
+ //! @param[in] receive length
//! @return session use EVENT mode.
virtual EVENT_TAG handle_client_recv(
const boost::thread::id thread_id,
//! called from after realserver select
//! @param[in] upstream thread id
//! @param[out] realserver UDP endpoint
- //! @param[out] sendbudffer reference
+ //! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode.
virtual EVENT_TAG handle_realserver_select(
//! called from after realserver connect
//! @param[in] upstream thread id
- //! @param[out] sendbuffer reference
+ //! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode.
virtual EVENT_TAG handle_realserver_connect(
//! called from after sorryserver select
//! @param[in] upstream thread id
- //! @param[in] sorryserver endppiont reference
+ //! @param[in] sorryserver endpoint reference
//! @return session use EVENT mode.
virtual EVENT_TAG handle_sorryserver_select(
const boost::thread::id thread_id,
//! @return session use EVENT mode.
virtual EVENT_TAG handle_sorryserver_send(const boost::thread::id thread_id) = 0;
- //! called from after realserver recvive for TCP/IP
+ //! called from after realserver receive for TCP/IP
//! @param[in] downstream thread id
//! @param[in] realserver TCP/IP endpoint reference
- //! @param[in] realserver recive buffer reference.
+ //! @param[in] realserver receive buffer reference.
//! @param[in] recv data length
//! @return session use EVENT mode.
virtual EVENT_TAG handle_realserver_recv(
const boost::asio::ip::tcp::endpoint &rs_endpoint,
const boost::array<char, MAX_BUFFER_SIZE>& recvbuffer,
const size_t recvlen) = 0;
- //! called from after realserver recive.for UDP
+ //! called from after realserver receive.for UDP
//! @param[in] downstream thread id
//! @param[in] realserver UDP endpoint reference
- //! @param[in] recive from realserver buffer reference
+ //! @param[in] receive from realserver buffer reference
//! @param[in] recv data length
//! @return session use EVENT mode.
virtual EVENT_TAG handle_realserver_recv(
const boost::array<char, MAX_BUFFER_SIZE>& recvbuffer,
const size_t recvlen) = 0;
- //! called from after sorryserver recive
+ //! called from after sorryserver receive
//! @param[in] downstream thread id
//! @param[in] sorryserver endpoint reference
- //! @param[in] recive from realserver buffer reference.
+ //! @param[in] receive from realserver buffer reference.
//! @param[in] recv data length
//! @return session use EVENT mode
virtual EVENT_TAG handle_sorryserver_recv(
const boost::array<char, MAX_BUFFER_SIZE>& recvbuffer,
const size_t recvlen) = 0;
- //! called from UPSTEEARM thread. make module original message.
+ //! called from UPSTREAM thread. make module original message.
//! @param[in] downstream thread id.
//! @return session use EVENT mode
virtual EVENT_TAG handle_response_send_inform(
//! called from after client connection check. use TCP/IP only. create client send message.
//! @param[in] downstream thread id
- //! @param[out] send budffer reference
+ //! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode
virtual EVENT_TAG handle_client_connection_check(
const boost::thread::id thread_id,
const boost::asio::ip::tcp::endpoint &rs_endpoint) = 0;
- //! call from sorry server disconnect. use upstraem thread and downstream thread
+ //! call from sorry server disconnect. use upstream thread and downstream thread
//! @param[in] upstream and downstream thread id( check! one thread one event )
//! @param[in] disconnect sorryserver endpoint
//! @return session use EVENT mode
//! @class protocol_module_control
//! @brief protocol module control class is load protocol module from shared object file.
//! @brief many virtual service class used protocol module instance.
-//! @brief but, shared object load is once. and unload when vitual service refarence count is zero.
+//! @brief but, shared object load is once. and unload when virtual service reference count is zero.
class protocol_module_control : public module_control_base
{
public:
//! @brief protocol module information structure.
struct protocol_module_info {
void *handle; //!< dlopen handle
- unsigned int ref_count; //!< refarence count
+ unsigned int ref_count; //!< reference count
create_func_type create_func; //!< create function object
destroy_func_type destroy_func; //!< destroy function object
- protocol_module_info() : ref_count(0) {} //!< constractor
+ protocol_module_info() : ref_count(0) {} //!< constructor
};
//! name module map type typedef
private:
friend class boost::serialization::access; //! friend boost serializable class
//! serializable
- //! @brief using boost serialiable. class serializable function.
+ //! @brief using boost serializable. class serializable function.
//! @param[in] archive
//! @param[in] version
template <class Archive>
block_size(0) {}
};
- //! State Infomation struct to execute Replication.
+ //! State Information struct to execute Replication.
struct replication_state_struct {
enum REPLICATION_MODE_TAG service_status; //!< States Type of Replication Function
unsigned long long send_time; //!< Completion last time to send data(no use)
//
//! @class schedule_module_base
//! @brief schedule module abstract base class.
-//! @brief all schedule module is extened this class.
+//! @brief all schedule module is extend this class.
class schedule_module_base : public module_base
{
public:
typedef boost::function< rslist_type::iterator(rslist_type::iterator)>
rslist_iterator_next_func_type;
public:
- //! constractor
+ //! constructor
schedule_module_base(std::string in_modulename) : module_base(in_modulename) {};
- //! destractor
+ //! destructor
virtual ~schedule_module_base() {};
//! initialize function
virtual void initialize() = 0;
rslist_iterator_next_func_type,
boost::asio::ip::tcp::endpoint &) = 0;
- //! handle schedule calles then schedule function for UDP endpoint
+ //! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
//! @class schedule_module_control
//! @brief schedule module control class is load schedule module from shared object file.
//! @brief many virtual service class used schedule module instance.
-//! @brief but, shared object load is once. and unload when vitual service refarence count is zero.
+//! @brief but, shared object load is once. and unload when vitual service reference count is zero.
class schedule_module_control : public module_control_base
{
public:
//! @brief schedule module information structure.
struct schedule_module_info {
void *handle; //!< dlopen handle
- unsigned int ref_count; //!< refarence count
+ unsigned int ref_count; //!< reference count
create_func_type create_func; //!< create function object
destroy_func_type destroy_func; //!< destroy function object
- schedule_module_info() : ref_count(0) {} //!< constractor
+ schedule_module_info() : ref_count(0) {} //!< constructor
};
//! name module map type typedef
//!
//! @brief session thread pooling utility class.
-//! @class session_thread_control is session thread pool utirity.
+//! @class session_thread_control is session thread pool utility.
class session_thread_control : private boost::noncopyable
{
public:
int sched_priority;
int num_of_core_uses;
public:
- //! constractor.
+ //! constructor.
//! @param session_ptr session class shared ptr
session_thread_control(tcp_session *ptr, cpu_set_t in_upcpu, cpu_set_t in_downcpu, int in_sched_algorithm) :
upthread_state(WAIT),
session.reset(ptr);
}
- //! destractor
+ //! destructor
~session_thread_control() {
}
void startdownstream();
//! upstream thread stop function
void stopupstream();
- //! downstream thread stop funtion
+ //! downstream thread stop function
void stopdownstream();
- //! all thread destory function.
+ //! all thread destroy function.
void join();
//! upstream-thread id getter
//! @return thread_id_type upstream thread id
static void set_logtrap_level(const LOG_LEVEL_TAG in_level);
/*!
- * get snmp infomation.
+ * get snmp information.
*
- * @return snmp infomation
+ * @return snmp information
*/
static snmp_info get_snmp_info();
void refresh_statistics(const boost::asio::ip::tcp::endpoint &vs_endpoint, const std::string &protocol);
/*!
- * set vsd infomation.
+ * set vsd information.
*
* @param[in] vsd is vsd pointer.
* @retrun void
void set_vsd_info(l7vsd *vsd);
/*!
- * get snmp infomation.
+ * get snmp information.
*
- * @retrun snmp_info is snmp infomation.
+ * @retrun snmp_info is snmp information.
*/
snmp_info get_snmp_info();
netsnmp_request_info *requests);
/*!
- * initialize snmp scaler and table data set handles.
+ * initialize snmp scalar and table data set handles.
*
* @param[in] error_code& is trap error code
* @retrun void
public:
//! default constructor
StrictTimeBasedRollingPolicy();
- //! increase reffernce count
+ //! increase reference count
void addRef() const;
- //! decrease reffernce count
+ //! decrease reference count
void releaseRef() const;
//! option setter
void setOption(const LogString &, const LogString &);
l7vs::LOG_ROTATION_TIMING_TAG getRotationTiming();
//! rotationTiming setter
void setRotationTiming(const l7vs::LOG_ROTATION_TIMING_TAG);
- //! rotatioTimingValue getter
+ //! rotationTimingValue getter
std::string getRotationTimingValue();
- //! rotatioTimingValue setter
+ //! rotationTimingValue setter
void setRotationTimingValue(const std::string &);
//! rolling policy initialize
{
//! @class tcp_realserver_connect_socket_list
-//! @brief this class is connected realsever list by up thread.
+//! @brief this class is connected realserver list by up thread.
class tcp_realserver_connect_socket_list : private boost::noncopyable
{
public:
//! realserver list element type first : connection endpoint second : socket pointer
typedef std::pair<boost::asio::ip::tcp::endpoint, tcp_socket_ptr > list_element;
- //! construcor
+ //! constructor
tcp_realserver_connect_socket_list();
//! destructor
~tcp_realserver_connect_socket_list();
//! @brief tcp_thread_message class name define.
class tcp_thread_message;
-//! @class loger_implement_access
+//! @class logger_implement_access
//! @brief logger_implement_access class name define.
class logger_implement_access;
ACCESS_LOG_OFF
};
- //! construcor
+ //! constructor
//! @param[in/out] vs is parent virtualservice object
//! @param[in/out] io is session use io service object
//! @param[in] set_option is
UP_FUNC_CLIENT_RECEIVE, //! up_thread_client_receive function
UP_FUNC_CLIENT_RESPOND_SEND, //! up_thread_client_respond function
UP_FUNC_CLIENT_RESPOND_SEND_EVENT, //! up_thread_client_respond_event function
- UP_FUNC_REALSERVER_GET_DEST_EVENT, //! up_thread_realserver_get_distination_event function
+ UP_FUNC_REALSERVER_GET_DEST_EVENT, //! up_thread_realserver_get_destination_event function
UP_FUNC_REALSERVER_CONNECT, //! up_thread_realserver_connect function
UP_FUNC_REALSERVER_CONNECT_EVENT, //! up_thread_realserver_connect_event function
UP_FUNC_REALSERVER_CONNECT_FAIL_EVENT, //! up_thread_realserver_connection_fail_event function
//! virtual service message convert to down thread function object map
std::map< TCP_VIRTUAL_SERVICE_MESSAGE_TAG, tcp_session_func>
virtual_service_message_down_thread_function_map;
- //! client conection src endpoint
+ //! client connection src endpoint
boost::asio::ip::tcp::endpoint client_endpoint;
//! virtualservice accept endpoint
boost::asio::ip::tcp::endpoint virtualservice_endpoint;
//! reset ssl object for reuse
//! @param[in/out] clear_ssl is clear target SSL structure pointer
virtual bool ssl_clear_keep_cache(SSL *clear_ssl);
- //! endpoint data to string infomation
+ //! endpoint data to string information
//! @param[in] endpoint is target endpoint object
virtual std::string endpoint_to_string(
const boost::asio::ip::tcp::endpoint &target_endpoint);
//! up thread accept client side
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_accept(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_accept
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_accept_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread receive client side and raise module event of handle_client_recv
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_receive(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise client respond send event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_respond(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_response_send_inform
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_respond_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread close client socket and raise client disconnect event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_client_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_client_disconnect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread send realserver and raise module event of handle_client_recv
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_send(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_realserver_select
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_get_destination_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread connect realserver
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_connect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_realserver_connect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_connect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_realserver_connection_fail
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_connection_fail_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread close realserver socket and raise realserver disconnect event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_realserver_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_realserver_disconnect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread close all realserver socket and raise module event of handle_realserver_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_all_realserver_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread send sorryserver and raise module event of handle_sorryserver_send
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_send(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_sorryserver_select
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_get_destination_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread connect sorryserver
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_connect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_sorryserver_connect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_connect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_sorryserver_connection_fail
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_connection_fail_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread close sorryserver socket and raise sorryserver disconnect event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread close sorryserver socket and raise module sorryserver disconnect event
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_mod_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_sorryserver_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorryserver_disconnect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_sorry_enable
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorry_enable_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread raise module event of handle_sorry_disable
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_sorry_disable_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread exit main loop
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void up_thread_exit(
const TCP_PROCESS_TYPE_TAG process_type);
//! up thread close all socket
virtual void up_thread_all_socket_close(void);
//! down thread receive from realserver and raise module event of handle_realserver_recv
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_realserver_receive(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread close realserver socket and raise realserver disconnect event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_realserver_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_realserver_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_realserver_disconnect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread close all realserver socket and raise module event of handle_realserver_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_all_realserver_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_client_connection_check
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_client_connection_chk_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_response_send_inform
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_client_respond_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread send for client and raise module event of handle_client_send
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_client_send(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread close client socket and raise client disconnect event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_client_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_client_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_client_disconnect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread receive from sorryserver and raise module event of handle_sorryserver_recv
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_sorryserver_receive(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread close sorryserver socket and raise sorryserver disconnect event message for up and down thread
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_sorryserver_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread close sorryserver socket and raise module sorryserver disconnect event
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_sorryserver_mod_disconnect(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_sorryserver_disconnect
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_sorryserver_disconnect_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_sorry_enable
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_sorry_enable_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread raise module event of handle_sorry_disable
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_sorry_disable_event(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread exit main loop
- //! @param[in] process_type is prosecess type
+ //! @param[in] process_type is process type
virtual void down_thread_exit(
const TCP_PROCESS_TYPE_TAG process_type);
//! down thread close all socket
class tcp_socket : private boost::noncopyable
{
public:
- //! construcor
+ //! constructor
//! @param[in/out] socket use io service object
//! @param[in] set socket option info
tcp_socket(boost::asio::io_service &io,
//! @return false is set non blocking mode failure
bool set_non_blocking_mode(boost::system::error_code &ec);
//! write socket
- //! @param[in] buffers is wite data buffer
+ //! @param[in] buffers is write data buffer
//! @param[out] ec is reference error code object
//! @return write data size
std::size_t write_some(boost::asio::mutable_buffers_1 buffers, boost::system::error_code &ec);
wr_mutex close_mutex;
//! socket open flag
bool open_flag;
- //! set nonblocking flag
+ //! set non-blocking flag
bool non_blocking_flag;
//! socket option
tcp_socket_option_info opt_info;
class tcp_ssl_socket : private boost::noncopyable
{
public:
- //! construcor
+ //! constructor
//! @param[in/out] socket use io service object
//! @param[in] set socket option info
tcp_ssl_socket(boost::asio::io_service &io,
//! @return false is set non blocking mode failure
bool set_non_blocking_mode(boost::system::error_code &ec);
//! write socket
- //! @param[in] buffers is wite data buffer
+ //! @param[in] buffers is write data buffer
//! @param[out] ec is reference error code object
//! @return write data size
std::size_t write_some(boost::asio::mutable_buffers_1 buffers, boost::system::error_code &ec);
wr_mutex close_mutex;
//! socket open flag
bool open_flag;
- //! set nonblocking flag
+ //! set non-blocking flag
bool non_blocking_flag;
//! socket option
tcp_socket_option_info opt_info;
class tcp_thread_message : private boost::noncopyable
{
public:
- //! construcor
+ //! constructor
tcp_thread_message() {}
//! destructor
~tcp_thread_message() {}
};// class udp_request
}// namespace l7vs
-#endif//UDP_REQUES_H
+#endif//UDP_REQUEST_H
#ifndef __UTILITY_H__
#define __UTILITY_H__
-//! gcc extention code output macro.
-//! static "if" weight algolithm teach compiler.
+//! gcc extension code output macro.
+//! static "if" weight algorithm teach compiler.
//! compiler output CPU TBL code.
//! usage:
-//! if( likely( hoge ) ){ fasecall } else { slowcall }
+//! if( likely( hoge ) ){ fastcall } else { slowcall }
//! if( unlikely( hoge ) ){ slowcall } else { fastcall }
#define likely(c) __builtin_expect(!!(c), 1)
#define unlikely(c) __builtin_expect(!!(c), 0)
-#endif //__ULITITY_H__
+#endif //__UTILITY_H__
//! Default count for number of session-pool size
const static int SESSION_POOL_NUM_DEFAULT = 256;
- //! bps calcurate interval(500ms)
+ //! bps calculate interval(500ms)
const static long BPS_INTERVAL_DEFAULT = 500;
//! replication-data create interval(500ms)
const static long REP_INTERVAL_DEFAULT = 500;
Logger log;
- boost::asio::io_service dispatcher; //! dispatcer service
+ boost::asio::io_service dispatcher; //! dispatcher service
deadline_timer_ptr_type calc_bps_timer; //! timer object
deadline_timer_ptr_type replication_timer; //! timer object
deadline_timer_ptr_type protomod_rep_timer; //! timer object
AUUL recvsize_up; //! upstream total receive data size
AUUL current_up_recvsize; //! current upstream receive data size
- //! for calcurate upstream throughput
+ //! for calculate upstream throughput
AUUL sendsize_up; //! upstream total send data size
AUUL recvsize_down; //! downstream total receive data size
AUUL current_down_recvsize; //! current downstream receive data size for
- //! calcurate upstream throughput
+ //! calculate upstream throughput
AUUL sendsize_down; //! downstream total send data size
AUUL throughput_up; //! upstream throughput value
AUUL wait_count_up; //! upstream recv wait count
AUUL wait_count_down; //! downstream recv wait count
- AUUL interrupt_running_flag; //! interrunpt routine is running
+ AUUL interrupt_running_flag; //! interrupt routine is running
AUUL virtualservice_stop_flag; //! virtualservice is now shutting down
// protocol module option string
private:
friend class boost::serialization::access; //! friend boost serializable class
//! serializable
- //! @brief using boost serialiable. class serializable function.
+ //! @brief using boost serializable. class serializable function.
//! @param[in] archive
//! @param[in] version
template <class Archive>
* @file utility.h
* @brief read - write spin lock class.
* @brief this lock used CPU power upon blocking.
- * @brief don't used contextswitch. little clitical section use.
+ * @brief don't used context switch. little critical section use.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
protected:
pthread_rwlock_t mutex; //! mutex
public:
- //! default constractor
+ //! default constructor
wr_mutex() {
pthread_rwlock_init(&mutex, NULL);
}
- //! destractor.
+ //! destructor.
~wr_mutex() {
pthread_rwlock_destroy(&mutex);
}
- //! reaqd lock function. non-blocking read threads.
+ //! read lock function. non-blocking read threads.
//! be blocked write thread mutex.
void rdlock() {
pthread_rwlock_rdlock(&mutex);
void wrlock() {
pthread_rwlock_wrlock(&mutex);
}
- //! unlock funtion. unlock rdlock and wrlock.
+ //! unlock function. unlock rdlock and wrlock.
void unlock() {
pthread_rwlock_unlock(&mutex);
}
protected:
T &mutex; //! mutex reference.
public:
- //! constractor. use explicit keyword.
+ //! constructor. use explicit keyword.
explicit read_scoped_lock(T &m) : mutex(m) {
mutex.rdlock();
}
- //! destractor.
+ //! destructor.
~read_scoped_lock() {
mutex.unlock();
}
protected:
T &mutex; //! mutex reference.
public:
- //! default constractor.
+ //! default constructor.
explicit readwrite_scoped_lock(T &m) : mutex(m) {
mutex.wrlock();
}
- //! default destractor
+ //! default destructor
~readwrite_scoped_lock() {
mutex.unlock();
}
#
# Author: Shinya TAKEBAYASHI
# Released: January 2008
-# Licence: GNU General Public Licence
+# License: GNU General Public License
L7VSD_OPTIONS=""
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
- echo "error occured."
+ echo "error occurred."
echo "$PROG was not started."
else
echo "done."
//! check http status code function
//! @param const char* buffer
//! @param const size_t buffer_len
-//! @return CHECK_RESULT_TAG status code is nomal or error
+//! @return CHECK_RESULT_TAG status code is normal or error
l7vs::http_protocol_module_base::CHECK_RESULT_TAG
l7vs::http_protocol_module_base::check_status_code(const char *buffer,
const size_t buffer_len)
}
-//! serch uri function
+//! search uri function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& uri offset
}
-//! serch status function
+//! search status function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& status offset
}
-//! serch http header function
+//! search http header function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param const string& header name
}
-//! serch http header Cookie function
+//! search http header Cookie function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
}
-//! serch http header Content_Length function
+//! search http header Content_Length function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
}
-//! serch http header X_Forwarded_For function
+//! search http header X_Forwarded_For function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
}
-//! serch http header all function
+//! search http header all function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @brief check tag is return to http protocol module.
enum CHECK_RESULT_TAG {
CHECK_OK = 0, //!< check ok
- CHECK_NG, //!< check ng
+ CHECK_NG, //!< check NG
CHECK_IMPOSSIBLE //!< check impossible
};
//! check http status code function
//! @param const char* buffer
//! @param const size_t buffer_len
- //! @return CHECK_RESULT_TAG status code is nomal or error
+ //! @return CHECK_RESULT_TAG status code is normal or error
CHECK_RESULT_TAG check_status_code(const char *, const size_t);
//! check http method and version function
//! @return CHECK_RESULT_TAG http version and status code is valid
CHECK_RESULT_TAG check_http_version_and_status_code(const char *, const size_t);
- //! serch uri function
+ //! search uri function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& uri offset
//! @return bool find is true. not find is false
bool find_uri(const char *, const size_t, size_t &, size_t &);
- //! serch status function
+ //! search status function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& status offset
//! @return bool find is true. not find is false
bool find_status_code(const char *, const size_t, size_t &, size_t &);
- //! serch http header function
+ //! search http header function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param const string& header name
//! @return bool find is true. not find is false
bool find_http_header(const char *, const size_t, const std::string &, size_t &, size_t &);
- //! serch http header Cookie function
+ //! search http header Cookie function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @return bool find is true. not find is false
bool find_http_header_cookie(const char *, const size_t, size_t &, size_t &);
- //! serch http header Content_Length function
+ //! search http header Content_Length function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @return bool find is true. not find is false
bool find_http_header_content_length(const char *, const size_t, size_t &, size_t &);
- //! serch http header X_Forwarded_For function
+ //! search http header X_Forwarded_For function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @return bool find is true. not find is false
bool find_http_header_x_forwarded_for(const char *, const size_t, size_t &, size_t &);
- //! serch http header all function
+ //! search http header all function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @param const char* buffer
void increment_stats(const char *buffer);
- //! http statistic infomation
+ //! http statistic information
http_stats http_stats_info;
public:
- //! constractor
+ //! constructor
http_protocol_module_base(std::string in_modulename) : protocol_module_base(in_modulename) {};
- //! destractor
+ //! destructor
virtual ~http_protocol_module_base() {};
//! get base statistic object.
}
-//! serch uri function
+//! search uri function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& uri offset
}
-//! serch status function
+//! search status function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& status offset
}
-//! serch http header function
+//! search http header function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param const string& header name
}
-//! serch http header Cookie function
+//! search http header Cookie function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
}
-//! serch http header Content_Length function
+//! search http header Content_Length function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
}
-//! serch http header X_Forwarded_For function
+//! search http header X_Forwarded_For function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
}
-//! serch http header all function
+//! search http header all function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
class http_utility
{
public:
- //! constractor
+ //! constructor
http_utility() {};
- //! destractor
+ //! destructor
virtual ~http_utility() {};
//! @enum CHECK_RESULT_TAG
//! @brief check tag is return to http protocol module.
enum CHECK_RESULT_TAG {
CHECK_OK = 0, //!< check ok
- CHECK_NG, //!< check ng
+ CHECK_NG, //!< check NG
CHECK_IMPOSSIBLE //!< check impossible
};
//! @return CHECK_RESULT_TAG http version and status code is valid
static CHECK_RESULT_TAG check_http_version_and_status_code(const char *, const size_t);
- //! serch uri function
+ //! search uri function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& uri offset
//! @return bool find is true. not find is false
static bool find_uri(const char *, const size_t, size_t &, size_t &);
- //! serch status function
+ //! search status function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& status offset
//! @return bool find is true. not find is false
static bool find_status_code(const char *, const size_t, size_t &, size_t &);
- //! serch http header function
+ //! search http header function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param const string& header name
//! @return bool find is true. not find is false
static bool find_http_header(const char *, const size_t, const std::string &, size_t &, size_t &);
- //! serch http header Cookie function
+ //! search http header Cookie function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @return bool find is true. not find is false
static bool find_http_header_cookie(const char *, const size_t, size_t &, size_t &);
- //! serch http header Content_Length function
+ //! search http header Content_Length function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @return bool find is true. not find is false
static bool find_http_header_content_length(const char *, const size_t, size_t &, size_t &);
- //! serch http header X_Forwarded_For function
+ //! search http header X_Forwarded_For function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
//! @return bool find is true. not find is false
static bool find_http_header_x_forwarded_for(const char *, const size_t, size_t &, size_t &);
- //! serch http header all function
+ //! search http header all function
//! @param const char* buffer
//! @param const size_t buffer_len
//! @param size_t& header offset
class ip_protocol_module_base : public protocol_module_base
{
protected:
- //! http statistic infomation
+ //! http statistic information
http_stats http_stats_info;
public:
- //! constractor
+ //! constructor
ip_protocol_module_base(std::string in_modulename) : protocol_module_base(in_modulename) {};
- //! destractor
+ //! destructor
virtual ~ip_protocol_module_base() {};
}
//! put data into temp list
-//! @param[in] ip_replication_temp_data refrence
+//! @param[in] ip_replication_temp_data reference
void ip_replication_data_processor::put_into_temp_list(
const ip_replication_temp_data &data)
{
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(600216, "in_function : void ip_replication_data_processor::"
- "write_replicaion_area().", __FILE__, __LINE__);
+ "write_replication_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(600217, "out_function : void ip_replication_data_processor::"
- "write_replicaion_area().", __FILE__, __LINE__);
+ "write_replication_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : void ip_replication_data_processor::"
- "write_replicaion_area() : 'A' : realserver_ip = %s, "
+ "write_replication_area() : 'A' : realserver_ip = %s, "
"realserver_prot = %d, last_time = %d.");
formatter % replication_area[temp_data.ip_hash].realserver_ip % replication_area[temp_data.ip_hash].realserver_port %
replication_area[temp_data.ip_hash].last_time;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : void ip_replication_data_processor::"
- "write_replicaion_area() : 'U' : last_time = %d.");
+ "write_replication_area() : 'U' : last_time = %d.");
formatter % replication_area[temp_data.ip_hash].last_time;
putLogDebug(600219, formatter.str(), __FILE__, __LINE__);
}
if (blocked) {
replication_area_unlock();
}
- std::cerr << "ip_replication_data_processor::write_replicaion_area() : exception : error " << e.what() << "." << std::endl;
- boost::format formatter("function : void ip_replication_data_processor::write_replicaion_area() : "
+ std::cerr << "ip_replication_data_processor::write_replication_area() : exception : error " << e.what() << "." << std::endl;
+ boost::format formatter("function : void ip_replication_data_processor::write_replication_area() : "
"exception : error = %s.");
formatter % e.what();
putLogError(600111, formatter.str(), __FILE__, __LINE__);
if (blocked) {
replication_area_unlock();
}
- std::cerr << "ip_replication_data_processor::write_replicaion_area() : exception." << std::endl;
- putLogError(600112, "function : void ip_replication_data_processor::write_replicaion_area() : "
+ std::cerr << "ip_replication_data_processor::write_replication_area() : exception." << std::endl;
+ putLogError(600112, "function : void ip_replication_data_processor::write_replication_area() : "
"Thread_interrupted exception.", __FILE__, __LINE__);
} catch (...) {
if (blocked) {
replication_area_unlock();
}
- std::cerr << "ip_replication_data_processor::write_replicaion_area() : Unknown exception." << std::endl;
- putLogError(600113, "function : void ip_replication_data_processor::write_replicaion_area() : "
+ std::cerr << "ip_replication_data_processor::write_replication_area() : Unknown exception." << std::endl;
+ putLogError(600113, "function : void ip_replication_data_processor::write_replication_area() : "
"Unknown exception.", __FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(600220, "out_function : void ip_replication_data_processor::"
- "write_replicaion_area().", __FILE__, __LINE__);
+ "write_replication_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
}
//! get data from temp list
-//! @param[out] ip_replication_temp_data refrence
+//! @param[out] ip_replication_temp_data reference
//! @return 0 : success for get data
-//! @return -1 : faild to get data
+//! @return -1 : failed to get data
int ip_replication_data_processor::get_from_temp_list(
ip_replication_temp_data &data)
{
//! get endpoint from session data
//! @param[in] ip hash
-//! @param[out] endpoint refrence
+//! @param[out] endpoint reference
//! @return 0 : success
//! @return 1: failed
//! @return -1:exception
//! write session data to session table
//! @param[in] ip hash
-//! @param[in] endpoint refrence
+//! @param[in] endpoint reference
//! @param[in] now time
//! @return 0 : success
//! @return 1: failed
const int protocol_module_ip::COLLECT_STATS_ON = 1;
using namespace boost::xpressive;
-//! constractor
+//! constructor
protocol_module_ip::protocol_module_ip() :
ip_protocol_module_base(MODULE_NAME), forwarded_for(FORWARDED_FOR_OFF)
{
sorry_uri.assign('\0');
sorry_uri[0] = '/';
}
-//! destractor
+//! destructor
protocol_module_ip::~protocol_module_ip()
{
}
return false;
}
-//! replication interval interrrupt
+//! replication interval interrupt
//! timer thread call this function. from virtualservice.
void protocol_module_ip::replication_interrupt()
{
rs_list_end = inlist_end;
//RealServer list next function
rs_list_next = inlist_next;
- //RealServer list lock funtion
+ //RealServer list lock function
rs_list_lock = inlist_lock;
- //RealServer list unlock funtion
+ //RealServer list unlock function
rs_list_unlock = inlist_unlock;
/*-------- DEBUG LOG --------*/
}
/*------DEBUG LOG END------*/
- //RealServer list functions initializtion
+ //RealServer list functions initialization
//RealServer list begin function
rs_list_begin.clear();
//RealServer list end function
//RealServer list unlock function
rs_list_unlock.clear();
- //Replication functions initializtion
- //component memory allcate function
+ //Replication functions initialization
+ //component memory allocate function
replication_pay_memory.clear();
//component memory lock function
replication_area_lock.clear();
}
/*------DEBUG LOG END------*/
- //ScheduleModule's functions initializtion
+ //ScheduleModule's functions initialization
schedule_tcp.clear();
/*-------- DEBUG LOG --------*/
}
/*------DEBUG LOG END------*/
- //Module's option initializtion
+ //Module's option initialization
//forwarded_for
forwarded_for = FORWARDED_FOR_OFF;
//sorry-uri
}
/*------DEBUG LOG END------*/
- //logger functions initializtion
+ //logger functions initialization
//log level getting function
getloglevel.clear();
//logger(Fatal)
}
//! module parameter check.used by l7vsadm
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_base::check_message_result protocol_module_ip::check_parameter(const std::vector <
std::string > & args)
{
try {
unsigned long ultimeout = 0;
ultimeout = boost::lexical_cast<unsigned long>(*it);
- // int maxvalue check
+ // int max value check
if (ultimeout > INT_MAX) {
check_result.flag = false;
formatter.parse("'-T/--timeout' option value '%s' is too large.");
// not set reschedule flag
no_reschedule_flag = true;
} else {
- // already set reshcedule flag
+ // already set reschedule flag
check_result.flag = false;
check_result.message = "You have to choose either of reschedule or no-reschedule.";
putLogError(600004, check_result.message, __FILE__, __LINE__);
}
//! parameter set
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_base::check_message_result protocol_module_ip::set_parameter(const std::vector <
std::string > & args)
{
try {
unsigned long ultimeout = 0;
ultimeout = boost::lexical_cast<unsigned long>(*it);
- // int maxvalue check
+ // int max value check
if (ultimeout > INT_MAX) {
check_result.flag = false;
formatter.parse("'-T/--timeout' option value '%s' is too large.");
reschedule = 0;
} else {
- // already set reshcedule flag
+ // already set reschedule flag
check_result.flag = false;
check_result.message = "You have to choose either of reschedule or no-reschedule.";
putLogError(600017, check_result.message, __FILE__, __LINE__);
// result check
if (check_result.flag) {
- // set timeout's default value
+ // set timeout default value
if (!timeout_flag) {
timeout = 3600;
}
- // set reschedule's default value
+ // set reschedule default value
if (!reschedule_flag) {
reschedule = 0;
}
}
//! parameter add
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_base::check_message_result protocol_module_ip::add_parameter(const std::vector <
std::string > & args)
{
}
//! get option info
-//! @param[out] module paramter string
+//! @param[out] module parameter string
void protocol_module_ip::get_option_info(std::string &option)
{
/*-------- DEBUG LOG --------*/
/*------DEBUG LOG END------*/
}
-//! TCP/IP scheduled function registation.
+//! TCP/IP scheduled function registration.
//! @param[in] schedule module TCP/IP scheduled function object type
void protocol_module_ip::register_schedule(tcp_schedule_func_type inschedule)
{
/*------DEBUG LOG END------*/
}
-//! UDP scheduled function registation
-//! @param[in] schedule module UDP scheduled funtion object type
+//! UDP scheduled function registration
+//! @param[in] schedule module UDP scheduled function object type
void protocol_module_ip::register_schedule(udp_schedule_func_type inschedule)
{
/*-------- DEBUG LOG --------*/
/*------DEBUG LOG END------*/
}
-//! called from session initialzie use in upstream_thread
+//! called from session initialize use in upstream_thread
//! @param[in] upstream thread id.
//! @param[in] downstream thread id
//! @return session use EVENT mode.
//! called from after session recv in client socket. use in upstream thread.
//! @param[in] upstream thread id
-//! @param[in] receive buffer refarence.
+//! @param[in] receive buffer reference.
//! @param[in] receive length
//! @return session use EVENT mode.
protocol_module_base::EVENT_TAG protocol_module_ip::handle_client_recv(const boost::thread::id thread_id,
//! called from after realserver select
//! @param[in] upstream thread id
//! @param[out] realserver UDP endpoint
-//! @param[out] sendbuffer reference
+//! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode.
protocol_module_base::EVENT_TAG protocol_module_ip::handle_realserver_select(
//! called from after sorryserver select
//! @param[in] upstream thread id
-//! @param[in] sorryserver endpiont reference
+//! @param[in] sorryserver endpoint reference
//! @return session use EVENT mode.
protocol_module_base::EVENT_TAG protocol_module_ip::handle_sorryserver_select(
const boost::thread::id thread_id, boost::asio::ip::tcp::endpoint &sorry_endpoint)
return STOP;
}
-//! called from after realserver recvive for TCP/IP
+//! called from after realserver receive for TCP/IP
//! @param[in] downstream thread id
//! @param[in] realserver TCP/IP endpoint reference
//! @param[in] realserver receive buffer reference.
}
-//! called from UPSTEEARM thread. make module original message.
+//! called from UPSTREAM thread. make module original message.
//! @param[in] downstream thread id.
//! @return session use EVENT mode
protocol_module_base::EVENT_TAG protocol_module_ip::handle_response_send_inform(
//! called from after client connection check. use TCP/IP only. create client send message.
//! @param[in] downstream thread id
-//! @param[out] send budffer reference
+//! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode
protocol_module_base::EVENT_TAG protocol_module_ip::handle_client_connection_check(
}
//data state is HTTP_BODY or UNKNOWN
else {
- //set ebd flag on
+ //set end flag on
session_data_ptr->end_flag = END_FLAG_ON;
/*-------- DEBUG LOG --------*/
return status;
}
-//! call from sorry server disconnect. use upstraem thread and downstream thread
+//! call from sorry server disconnect. use upstream thread and downstream thread
//! @param[in] upstream and downstream thread id( check! one thread one event )
//! @param[in] disconnect sorryserver endpoint
//! @return session use EVENT mode
char *tmpbuffer = NULL;
- //pointer volidate check
+ //pointer validate check
if (unlikely(data_ptr == NULL || data_ptr->data_buffer == NULL)) {
boost::format formatter("Invalid pointer. thread id : %d.");
formatter % boost::this_thread::get_id();
/*------DEBUG LOG END------*/
return true;
} else {
- //the new data can append to buffer through moving orignal data
+ //the new data can append to buffer through moving original data
if (data_ptr->data_buffer_size - data_ptr->data_length >= recvlen) {
memmove(data_ptr->data_buffer, data_ptr->data_buffer + data_ptr->data_offset, data_ptr->data_length);
/*-------- DEBUG LOG --------*/
size_t http_header_all_len = 0;
const char *X_FORWARDED_FOR = "X-Forwarded-For";
- //search "X-Forwared-For" header
+ //search "X-Forwarded-For" header
find_ret = http_utility::find_http_header_x_forwarded_for(buffer, buffer_len,
x_forwarded_for_offset, x_forwarded_for_len);
}
/*------DEBUG LOG END------*/
- //search "X-Forwared-For" result is OK
+ //search "X-Forwarded-For" result is OK
if (find_ret) {
- //create "X-Forwared-For" string
+ //create "X-Forwarded-For" string
x_forwarded_for_insert_pos = x_forwarded_for_offset + x_forwarded_for_len;
x_forwarded_for_context = ", ";
x_forwarded_for_context += client_endpoint;
}
/*------DEBUG LOG END------*/
- //create "X-Forwared-For" string
+ //create "X-Forwarded-For" string
x_forwarded_for_insert_pos = http_header_all_offset;
x_forwarded_for_context = X_FORWARDED_FOR;
x_forwarded_for_context += ": ";
-}//namesapce l7vsd
+}//namespace l7vsd
extern "C" l7vs::protocol_module_base*
create_module()
const int protocol_module_sessionless::COLLECT_STATS_OFF = 0;
const int protocol_module_sessionless::COLLECT_STATS_ON = 1;
-//! constractor
+//! constructor
protocol_module_sessionless::protocol_module_sessionless() :
http_protocol_module_base(MODULE_NAME), forwarded_for(FORWARDED_FOR_OFF)
{
sorry_uri.assign('\0');
sorry_uri[0] = '/';
}
-//! destractor
+//! destructor
protocol_module_sessionless::~protocol_module_sessionless()
{
}
return false;
}
-//! replication interval interrrupt
+//! replication interval interrupt
//! timer thread call this function. from virtualservice.
void protocol_module_sessionless::replication_interrupt()
{
rs_list_end = inlist_end;
//RealServer list next function
rs_list_next = inlist_next;
- //RealServer list lock funtion
+ //RealServer list lock function
rs_list_lock = inlist_lock;
- //RealServer list unlock funtion
+ //RealServer list unlock function
rs_list_unlock = inlist_unlock;
/*-------- DEBUG LOG --------*/
}
/*------DEBUG LOG END------*/
- //RealServer list functions initializtion
+ //RealServer list functions initialization
//RealServer list begin function
rs_list_begin.clear();
//RealServer list end function
}
/*------DEBUG LOG END------*/
- //Replication functions initializtion
- //component memory allcate function
+ //Replication functions initialization
+ //component memory allocate function
replication_pay_memory.clear();
//component memory lock function
replication_area_lock.clear();
}
/*------DEBUG LOG END------*/
- //ScheduleModule's functions initializtion
+ //ScheduleModule's functions initialization
schedule_tcp.clear();
/*-------- DEBUG LOG --------*/
}
/*------DEBUG LOG END------*/
- //Module's option initializtion
+ //Module's option initialization
//forwarded_for
forwarded_for = FORWARDED_FOR_OFF;
//sorry-uri
/*------DEBUG LOG END------*/
- //logger functions initializtion
+ //logger functions initialization
//log level getting function
getloglevel.clear();
//logger(Fatal)
}
//! module parameter check.used by l7vsadm
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_base::check_message_result protocol_module_sessionless::check_parameter(const std::vector <
std::string > & args)
{
}
//! parameter set
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_base::check_message_result protocol_module_sessionless::set_parameter(const std::vector <
std::string > & args)
{
}
//! parameter add
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_base::check_message_result protocol_module_sessionless::add_parameter(const std::vector <
std::string > & args)
{
}
//! get option info
-//! @param[out] module paramter string
+//! @param[out] module parameter string
void protocol_module_sessionless::get_option_info(std::string &option)
{
/*-------- DEBUG LOG --------*/
/*------DEBUG LOG END------*/
}
-//! TCP/IP scheduled function registation.
+//! TCP/IP scheduled function registration.
//! @param[in] schedule module TCP/IP scheduled function object type
void protocol_module_sessionless::register_schedule(tcp_schedule_func_type inschedule)
{
/*------DEBUG LOG END------*/
}
-//! UDP scheduled function registation
-//! @param[in] schedule module UDP scheduled funtion object type
+//! UDP scheduled function registration
+//! @param[in] schedule module UDP scheduled function object type
void protocol_module_sessionless::register_schedule(udp_schedule_func_type inschedule)
{
/*-------- DEBUG LOG --------*/
/*------DEBUG LOG END------*/
}
-//! called from session initialzie use in upstream_thread
+//! called from session initialize use in upstream_thread
//! @param[in] upstream thread id.
//! @param[in] downstream thread id
//! @return session use EVENT mode.
//! called from after session recv in client socket. use in upstream thread.
//! @param[in] upstream thread id
-//! @param[in] receive buffer refarence.
+//! @param[in] receive buffer reference.
//! @param[in] receive length
//! @return session use EVENT mode.
protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_client_recv(const boost::thread::id thread_id,
if (recv_data.receive_buffer_max_size < data_remain_size + recvlen) {
//the buffer's size that will be allocated is exceed the upper limit value
if (MAX_SESSIONLESS_MODULE_BUFFER_SIZE < data_remain_size + recvlen) {
- std::cerr << "protocol_module_sessionless::handle_client_recv() : the buffer's size that will be allacted is exceed the upper limit value." << std::endl;
+ std::cerr << "protocol_module_sessionless::handle_client_recv() : the buffer's size that will be allocated is exceed the upper limit value." << std::endl;
boost::format formatter("The buffer's size that will be allocated is exceed the upper limit value. thread id : %d.");
formatter % boost::this_thread::get_id();
putLogError(100030, formatter.str(), __FILE__, __LINE__);
//set new buffer's max size
recv_data.receive_buffer_max_size = buffer_size;
}
- //buffer's max size >= remain data size + requst size
+ //buffer's max size >= remain data size + request size
//buffer isn't need reallocate, but switch
else {
//pointer valid check
}
//using buffer is buffer2
else {
- //buffer1 initializtion
+ //buffer1 initialization
memset(recv_data.receive_buffer1, 0, recv_data.receive_buffer_max_size);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
//add new status to status_list
recv_data.send_status_list.push_back(new_send_state);
std::list<send_status>::reverse_iterator new_send_it = recv_data.send_status_list.rbegin();
- //cacl offset
+ //calc offset
new_send_it->send_offset = recv_data.receive_buffer_max_size - recv_data.receive_buffer_rest_size
- request_data_remain_size;
it->edit_division = EDIT_DIVISION_NO_EDIT;
if (send_buffer_remian_size > 0 && it->send_possible_size > 0) {
- //send_buffer_remian_size is larger
+ //send_buffer_remain_size is larger
if (send_buffer_remian_size >= it->send_possible_size) {
copy_size = it->send_possible_size;
/*-------- DEBUG LOG --------*/
}
//edit_data_list is not empty
else {
- //find the item in the list which has mininum insert_posission
+ //find the item in the list which has minimum insert_position
std::list<edit_data>::iterator edit_min = std::min_element(it->edit_data_list.begin(),
it->edit_data_list.end());
- //send_buffer_remian_size is larger than data that before X-Forwarded-For
+ //send_buffer_remain_size is larger than data that before X-Forwarded-For
if (send_buffer_remian_size >= edit_min->insert_posission - it->send_end_size) {
//copy data before X-Forwarded-For
copy_size = edit_min->insert_posission - it->send_end_size;
break;
}
}
- //data that before X-Forwarded-For is larger than send_buffer_remian_size
+ //data that before X-Forwarded-For is larger than send_buffer_remain_size
else {
copy_size = send_buffer_remian_size;
/*-------- DEBUG LOG --------*/
}
}
- //set copyed data length
+ //set copied data length
datalen = send_buffer_end_size - send_buffer_remian_size;
status = REALSERVER_SEND;
} catch (int e) {
//offset recalc
it->send_offset += it->send_end_size;
- //insert_posission recalc
+ //insert_position recalc
for (std::list<edit_data>::iterator list_it = it->edit_data_list.begin(); list_it
!= it->edit_data_list.end(); ++list_it) {
list_it->insert_posission -= it->send_end_size;
//! called from after sorryserver select
//! @param[in] upstream thread id
-//! @param[in] sorryserver endpiont reference
+//! @param[in] sorryserver endpoint reference
//! @return session use EVENT mode.
protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_sorryserver_select(
const boost::thread::id thread_id, boost::asio::ip::tcp::endpoint &sorry_endpoint)
it->edit_division = EDIT_DIVISION_NO_EDIT;
if (send_buffer_remian_size > 0 && it->send_possible_size > 0) {
- //send_buffer_remian_size is larger
+ //send_buffer_remain_size is larger
if (send_buffer_remian_size > it->send_possible_size) {
//copy data from receive_buffer to sendbuffer by sending_possible size
copy_size = it->send_possible_size;
}
//edit_data_list is not empty
else {
- //search item which insert_posission is mininum
+ //search item which insert_position is minimum
std::list<edit_data>::iterator edit_min = std::min_element(it->edit_data_list.begin(),
it->edit_data_list.end());
- //send_buffer_remian_size is larger than data that before X-Forwarded-For/uri
+ //send_buffer_remain_size is larger than data that before X-Forwarded-For/uri
if (send_buffer_remian_size >= edit_min->insert_posission - it->send_end_size) {
//copy data before X-Forwarded-For/url
copy_size = edit_min->insert_posission - it->send_end_size;
break;
}
}
- //data that before X-Forwarded-For/uri is larger than send_buffer_remian_size
+ //data that before X-Forwarded-For/uri is larger than send_buffer_remain_size
else {
copy_size = send_buffer_remian_size;
/*-------- DEBUG LOG --------*/
}
}
- //set copyed data length
+ //set copied data length
datalen = send_buffer_end_size - send_buffer_remian_size;
status = SORRYSERVER_SEND;
//offset recalc
it->send_offset += it->send_end_size;
- //insert_posission recalc
+ //insert_position recalc
for (std::list<edit_data>::iterator list_it = it->edit_data_list.begin(); list_it
!= it->edit_data_list.end(); ++list_it) {
list_it->insert_posission -= it->send_end_size;
}
//sending possible data is not exist
else {
- //can receive from clent continue
+ //can receive from client continue
if (it->send_rest_size > 0) {
//change status from SEND_OK to SEND_CONTINUE
it->status = SEND_CONTINUE;
}
- //can not receive from clent continue
+ //can not receive from client continue
else {
//change status from SEND_OK to SEND_END
it->status = SEND_END;
return STOP;
}
-//! called from after realserver recvive for TCP/IP
+//! called from after realserver receive for TCP/IP
//! @param[in] downstream thread id
//! @param[in] realserver TCP/IP endpoint reference
//! @param[in] realserver receive buffer reference.
if (recv_data.receive_buffer_max_size < data_remain_size + recvlen) {
//the buffer's size that will be allocated is exceed the upper limit value
if (MAX_SESSIONLESS_MODULE_BUFFER_SIZE < data_remain_size + recvlen) {
- std::cerr << "protocol_module_sessionless::handle_realserver_recv() : the buffer's size that will be allacted is exceed the upper limit value." << std::endl;
+ std::cerr << "protocol_module_sessionless::handle_realserver_recv() : the buffer's size that will be allocated is exceed the upper limit value." << std::endl;
boost::format formatter("The buffer's size that will be allocated is exceed the upper limit value. thread id : %d.");
formatter % boost::this_thread::get_id();
putLogError(100083, formatter.str(), __FILE__, __LINE__);
//set new buffer's max size
recv_data.receive_buffer_max_size = buffer_size;
}
- //buffer's max size >= remain data size + requst size
+ //buffer's max size >= remain data size + request size
//buffer isn't need reallocate, but switch
else {
//pointer valid check
if (recv_data.receive_buffer_max_size < data_remain_size + recvlen) {
//the buffer's size that will be allocated is exceed the upper limit value
if (MAX_SESSIONLESS_MODULE_BUFFER_SIZE < data_remain_size + recvlen) {
- std::cerr << "protocol_module_sessionless::handle_sorryserver_recv() : the buffer's size that will be allacted is exceed the upper limit value." << std::endl;
+ std::cerr << "protocol_module_sessionless::handle_sorryserver_recv() : the buffer's size that will be allocated is exceed the upper limit value." << std::endl;
boost::format formatter("The buffer's size that will be allocated is exceed the upper limit value. thread id : %d.");
formatter % boost::this_thread::get_id();
putLogError(100094, formatter.str(), __FILE__, __LINE__);
//set new buffer's max size
recv_data.receive_buffer_max_size = buffer_size;
}
- //buffer's max size >= remain data size + requst size
+ //buffer's max size >= remain data size + request size
//buffer isn't need reallocate, but switch
else {
//pointer valid check
}
//using buffer is buffer2
else {
- //buffer1 initializtion
+ //buffer1 initialization
memset(recv_data.receive_buffer1, 0, recv_data.receive_buffer_max_size);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
//add new status to status_list
recv_data.send_status_list.push_back(new_send_state);
std::list<send_status>::reverse_iterator new_send_it = recv_data.send_status_list.rbegin();
- //cacl offset
+ //calc offset
new_send_it->send_offset = recv_data.receive_buffer_max_size - recv_data.receive_buffer_rest_size
- request_data_remain_size;
return status;
}
-//! called from UPSTEEARM thread. make module original message.
+//! called from UPSTREAM thread. make module original message.
//! @param[in] downstream thread id.
//! @return session use EVENT mode
protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_response_send_inform(
//! called from after client connection check. use TCP/IP only. create client send message.
//! @param[in] downstream thread id
-//! @param[out] send budffer reference
+//! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode
protocol_module_base::EVENT_TAG protocol_module_sessionless::handle_client_connection_check(
/*------DEBUG LOG END------*/
//send_end_size recalc
it->send_end_size = it->send_possible_size;
- //set copyed data length
+ //set copied data length
datalen = it->send_possible_size;
//sending_possible size recalc
it->send_possible_size = 0;
it->send_end_size = send_buffer_size;
//sending_possible size recalc
it->send_possible_size -= send_buffer_size;
- //set copyed data length
+ //set copied data length
datalen = send_buffer_size;
}
}
//sending possible data is not exist
else {
- //can receive from clent continue
+ //can receive from client continue
if (it->send_rest_size > 0) {
//change status from SEND_OK to SEND_CONTINUE
it->status = SEND_CONTINUE;
}
- //can not receive from clent continue
+ //can not receive from client continue
else {
//change status from SEND_OK to SEND_END
it->status = SEND_END;
}
/*------DEBUG LOG END------*/
- //sending ng data is exist or send_rest_size > 0
+ //sending NG data is exist or send_rest_size > 0
if (send_disable) {
//set end flag on
session_data->end_flag = END_FLAG_ON;
send_possible = true;
}
- //sending ng data is exist or send_rest_size > 0
+ //sending NG data is exist or send_rest_size > 0
it = find_if(recv_data.send_status_list.begin(), recv_data.send_status_list.end(), data_send_disable());
if (it != recv_data.send_status_list.end()) {
send_disable = true;
putLogDebug(100244, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
- //sending ng data is exist or send_rest_size > 0
+ //sending NG data is exist or send_rest_size > 0
if (send_disable) {
//set end flag on
session_data->end_flag = END_FLAG_ON;
return status;
}
-//! call from sorry server disconnect. use upstraem thread and downstream thread
+//! call from sorry server disconnect. use upstream thread and downstream thread
//! @param[in] upstream and downstream thread id( check! one thread one event )
//! @param[in] disconnect sorryserver endpoint
//! @return session use EVENT mode
}
//! module parameter check.used by l7vsadm
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
//! @return result.flag false is parameter is problem.
protocol_module_sslid::check_message_result protocol_module_sslid::check_parameter(
const std::vector<std::string>& args)
// not set reschedule flag
no_reschedule_flag = true;
} else {
- // already set reshcedule flag
+ // already set reschedule flag
result.flag = false;
result.message = "You have to choose either of reschedule or no-reschedule.";
putLogError(300007, result.message, __FILE__, __LINE__);
}
//! parameter set
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_sslid::check_message_result protocol_module_sslid::set_parameter(
const std::vector<std::string>& args)
{
no_reschedule_flag = true;
reschedule = 0;
} else {
- // already set reshcedule flag
+ // already set reschedule flag
result.flag = false;
result.message = "You have to choose either of reschedule or no-reschedule.";
putLogError(300018, result.message, __FILE__, __LINE__);
// result check
if (result.flag) {
- // set timeout's default value
+ // set timeout default value
if (!timeout_flag) {
timeout = 3600;
}
- // set maxlist's default value
+ // set maxlist default value
if (!maxlist_flag) {
maxlist = 1024;
}
- // set reschedule's default value
+ // set reschedule default value
if (!reschedule_flag) {
reschedule = 0;
}
}
//! parameter add
-//! @param[in] module paramter string list
-//! @return result.flag true is parameter is noproblem.
-//! @return result.flag false is paramter is problem.
+//! @param[in] module parameter string list
+//! @return result.flag true is parameter is no problem.
+//! @return result.flag false is parameter is problem.
protocol_module_sslid::check_message_result protocol_module_sslid::add_parameter(
const std::vector<std::string>& args)
{
}
//! get option info
-//! @param[out] module paramter string
+//! @param[out] module parameter string
void protocol_module_sslid::get_option_info(std::string &option)
{
/*-------- DEBUG LOG --------*/
/*------DEBUG LOG END------*/
}
-//! TCP/IP scheduled function registation.
+//! TCP/IP scheduled function registration.
//! @param[in] schedule module TCP/IP scheduled function object type
void protocol_module_sslid::register_schedule(tcp_schedule_func_type inschedule)
{
/*------DEBUG LOG END------*/
}
-//! UDP scheduled function registation
-//! @param[in] schedule module UDP scheduled funtion object type
+//! UDP scheduled function registration
+//! @param[in] schedule module UDP scheduled function object type
void protocol_module_sslid::register_schedule(udp_schedule_func_type inschedule)
{
/*-------- DEBUG LOG --------*/
/*------DEBUG LOG END------*/
}
-//! called from session initialzie use in upstream_thread
+//! called from session initialize use in upstream_thread
//! @param[in] upstream thread id.
//! @param[in] downstream thread id
//! @return session use EVENT mode(ACCEPT, FINALIZE).
// data dump
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_session_initialize() : session_thread_data_sslid(upthread) : "
- "data_begain_offset = %d, data_size = %d, current_record_rest_size = %d, "
+ "data_begin_offset = %d, data_size = %d, current_record_rest_size = %d, "
"hello_message_flag = %d, sorry_flag = %d, end_flag = %d, accept_flag = %d, "
"thread_division = %d, pair_thread_id = %d, last_status = %d.");
formatter % threaddata_up->data_begain_offset
// data_dump
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_session_initialize() : session_thread_data_sslid(downthread) : "
- "data_begain_offset = %d, data_size = %d, current_record_rest_size = %d, "
+ "data_begin_offset = %d, data_size = %d, current_record_rest_size = %d, "
"hello_message_flag = %d, sorry_flag = %d, end_flag = %d, accept_flag = %d, "
"thread_division = %d, pair_thread_id = %d, last_status = %d.");
formatter % threaddata_down->data_begain_offset
//! called from after session recv in client socket. use in upstream thread.
//! @param[in] upstream thread id
-//! @param[in] receive buffer refarence.
+//! @param[in] receive buffer reference.
//! @param[in] receive length
//! @return session use EVENT mode(CLIENT_RECV, REALSERVER_SELECT, FINALIZE).
protocol_module_base::EVENT_TAG protocol_module_sslid::handle_client_recv(
status = CLIENT_RECV;
} else {
// the data can be sent, set the status REALSERVER_SELECT
- // set client helloworld shakehand flag
+ // set client hello shakehand flag
threaddata->hello_message_flag = ishellomessage;
threaddata->current_record_rest_size = alllength;
}
/*------DEBUG LOG END------*/
- // first connection get sessionid from the data buffer
+ // first connection get session id from the data buffer
std::string session_id;
if (threaddata->hello_message_flag &&
(get_ssl_session_id(threaddata->data_buffer.data() + threaddata->data_begain_offset,
/*------DEBUG LOG END------*/
if (session_id.empty()) {
- // no session id in hellomesseage
+ // no session id in hello message
// schedule the endpoint
boost::asio::ip::tcp::endpoint temp_endpoint;
boost::asio::ip::tcp::endpoint comp_endpoint; // for compare the endpoint
/*------DEBUG LOG END------*/
}
} else {
- // the session id is in the hellomessage
+ // the session id is in the hello message
// try to get the endpoint from session data by session id
int ret = session_data_processor->get_endpoint_from_session_data(
session_id,
//! called from after realserver select
//! @param[in] upstream thread id
//! @param[out] realserver UDP endpoint
-//! @param[out] sendbudffer reference
+//! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode(STOP).
protocol_module_base::EVENT_TAG protocol_module_sslid::handle_realserver_select(
status = CLIENT_RECV;
} else {
// the data can be sent, set the status REALSERVER_SELECT
- // set client helloworld shakehand flag
+ // set client hello shakehand flag
threaddata->hello_message_flag = ishellomessage;
threaddata->current_record_rest_size = alllength;
status = REALSERVER_CONNECT;
//! called from after sorryserver select
//! @param[in] upstream thread id
-//! @param[in] sorryserver endppiont reference
+//! @param[in] sorryserver endpoint reference
//! @return session use EVENT mode.
protocol_module_base::EVENT_TAG protocol_module_sslid::handle_sorryserver_select(
const boost::thread::id thread_id,
status = CLIENT_RECV;
} else {
// the data can be sent, set the status SORRYSERVER_CONNECT
- // set client helloworld shakehand flag
+ // set client hello shakehand flag
threaddata->hello_message_flag = ishellomessage;
threaddata->current_record_rest_size = alllength;
status = SORRYSERVER_CONNECT;
return status;
}
-//! called from after realserver recvive for TCP/IP
+//! called from after realserver receive for TCP/IP
//! @param[in] downstream thread id
//! @param[in] realserver TCP/IP endpoint reference
//! @param[in] realserver receive buffer reference.
status = REALSERVER_RECV;
} else {
// the data can be sent, set the status CLIENT_CONNECTION_CHECK
- // set client helloworld shakehand flag
+ // set client hello shakehand flag
threaddata->hello_message_flag = ishellomessage;
threaddata->current_record_rest_size = alllength;
status = CLIENT_CONNECTION_CHECK;
status = SORRYSERVER_RECV;
} else {
// the data can be sent, set the status CLIENT_CONNECTION_CHECK
- // set client helloworld shakehand flag
+ // set client hello shakehand flag
threaddata->hello_message_flag = ishellomessage;
threaddata->current_record_rest_size = alllength;
status = CLIENT_CONNECTION_CHECK;
return status;
}
-//! called from UPSTEEARM thread. make module original message.
+//! called from UPSTREAM thread. make module original message.
//! @param[in] downstream thread id.
//! @return session use EVENT mode(STOP).
protocol_module_base::EVENT_TAG protocol_module_sslid::handle_response_send_inform(
//! called from after client connection check. use TCP/IP only. create client send message.
//! @param[in] downstream thread id
-//! @param[out] send budffer reference
+//! @param[out] send buffer reference
//! @param[out] send data length
//! @return session use EVENT mode(CLIENT_SEND, FINALIZE).
protocol_module_base::EVENT_TAG protocol_module_sslid::handle_client_connection_check(
// check sorry state
if (threaddata->sorry_flag == SORRY_FLAG_OFF) {
- // serverhello message
+ // server hello message
if (threaddata->hello_message_flag) {
threaddata->hello_message_flag = false;
// it's server hello message
- // get sessionid from the data buffer
+ // get session id from the data buffer
std::string session_id;
if (get_ssl_session_id(threaddata->data_buffer.data() + threaddata->data_begain_offset,
threaddata->data_size, session_id) == -1) {
}
} else {
// the data is sendable, set the status CLIENT_CONNECTION_CHECK
- // set client helloworld shakehand flag
+ // set client hello shakehand flag
threaddata->hello_message_flag = ishellomessage;
threaddata->current_record_rest_size = alllength;
status = CLIENT_CONNECTION_CHECK;
return FINALIZE;
}
-//! call from sorry server disconnect. use upstraem thread and downstream thread
+//! call from sorry server disconnect. use upstream thread and downstream thread
//! @param[in] upstream and downstream thread id(check! one thread one event)
//! @param[in] disconnect sorryserver endpoint
//! @return session use EVENT mode(FINALIZE).
return STOP;
}
-//! replication interval interrrupt
+//! replication interval interrupt
//! timer thread call this function. from virtualservice.
void protocol_module_sslid::replication_interrupt()
{
//! put data into send buffer function
//! @param[in] upstream and downstream thread id
-//! @param[out] sendbudffer reference
+//! @param[out] send buffer reference
//! @param[out] send data length
//! @return 0 : success
//! @return -1: failed
// begin offset add
threaddata->data_begain_offset += sendbufsize;
- // remian data size minus
+ // remain data size minus
threaddata->current_record_rest_size -= sendbufsize;
// return data length
datalen = sendbufsize;
}
/*------DEBUG LOG END------*/
- // remain data size greater than send data buffersize
+ // remain data size greater than send data buffer size
// put the data to send data buffer
memcpy(senddatabegin, databegin + threaddata->data_begain_offset, sendbufsize);
}
//! judge pointed endpoint whether selected
-//! @param[in] endpoint refrence
+//! @param[in] endpoint reference
//! @return false if endpoint is not selected
//! @return true if endpoint is selected
bool protocol_module_sslid::realserver_selected(const boost::asio::ip::tcp::endpoint &rs_endpoint)
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("in_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
- "char* sslid_replication_area_begain, int sslid_replication_area_size, "
+ "char* sslid_replication_area_begin, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
"logger_func_type inputLogError, logger_func_type inputLogWarn, "
"logger_func_type inputLogInfo, logger_func_type inputLogDebug) : "
- "maxlist = %d, sslid_replication_area_begain = &(%d), "
+ "maxlist = %d, sslid_replication_area_begin = &(%d), "
"sslid_replication_area_size = %d, virtual_service_endpoint = [%s]:%d.");
formatter % maxlist % static_cast<void *>(sslid_replication_area_begain)
% sslid_replication_area_size % virtual_service_endpoint.address().to_string()
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(300198, "out_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
- "char* sslid_replication_area_begain, int sslid_replication_area_size, "
+ "char* sslid_replication_area_begin, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
"logger_func_type inputLogError, logger_func_type inputLogWarn, "
__FILE__, __LINE__);
putLogDebug(300201, "out_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
- "char* sslid_replication_area_begain, int sslid_replication_area_size, "
+ "char* sslid_replication_area_begin, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
"logger_func_type inputLogError, logger_func_type inputLogWarn, "
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(300211, "out_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
- "char* sslid_replication_area_begain, int sslid_replication_area_size, "
+ "char* sslid_replication_area_begin, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
"logger_func_type inputLogError, logger_func_type inputLogWarn, "
}
//! put data into temp list
-//! @param[in] sslid_replication_temp_data refrence
+//! @param[in] sslid_replication_temp_data reference
void sslid_replication_data_processor::put_into_temp_list(
const sslid_replication_temp_data &data)
{
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(300215, "in_function : void sslid_replication_data_processor::"
- "write_replicaion_area().", __FILE__, __LINE__);
+ "write_replication_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(300216, "out_function : void sslid_replication_data_processor::"
- "write_replicaion_area().", __FILE__, __LINE__);
+ "write_replication_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return;
std::string buffer;
ssl_protocol_module_base::dump_session_id(session_id_temp, SSLID_LENGTH, buffer);
boost::format formatter("function : void sslid_replication_data_processor::"
- "write_replicaion_area() : 'A' : session_id = %s.");
+ "write_replication_area() : 'A' : session_id = %s.");
formatter % buffer;
putLogDebug(300217, formatter.str(), __FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : void sslid_replication_data_processor::"
- "write_replicaion_area() : 'A' : realserver_ip = %s, "
+ "write_replication_area() : 'A' : realserver_ip = %s, "
"realserver_prot = %d.");
formatter % replication_area[i].realserver_ip % replication_area[i].realserver_port;
putLogDebug(300218, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : void sslid_replication_data_processor::"
- "write_replicaion_area() : 'U' : last_time(before) = %lu, "
+ "write_replication_area() : 'U' : last_time(before) = %lu, "
"last_time(after) = %lu.");
formatter % replication_area[i].last_time % temp_data.last_time;
putLogDebug(300219, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
boost::format formatter("function : void sslid_replication_data_processor::"
- "write_replicaion_area() : 'D' : data valid(before) = %d, "
+ "write_replication_area() : 'D' : data valid(before) = %d, "
"data valid(after) = %d.");
formatter % replication_area[i].valid % 0;
putLogDebug(300220, formatter.str(), __FILE__, __LINE__);
if (blocked) {
replication_area_unlock();
}
- std::cerr << "sslid_replication_data_processor::write_replicaion_area() : exception : error " << e.what() << "." << std::endl;
- boost::format formatter("function : void sslid_replication_data_processor::write_replicaion_area() : "
+ std::cerr << "sslid_replication_data_processor::write_replication_area() : exception : error " << e.what() << "." << std::endl;
+ boost::format formatter("function : void sslid_replication_data_processor::write_replication_area() : "
"exception : error = %s.");
formatter % e.what();
putLogError(300101, formatter.str(), __FILE__, __LINE__);
if (blocked) {
replication_area_unlock();
}
- std::cerr << "sslid_replication_data_processor::write_replicaion_area() : exception." << std::endl;
- putLogError(300102, "function : void sslid_replication_data_processor::write_replicaion_area() : "
+ std::cerr << "sslid_replication_data_processor::write_replication_area() : exception." << std::endl;
+ putLogError(300102, "function : void sslid_replication_data_processor::write_replication_area() : "
"Thread_interrupted exception.", __FILE__, __LINE__);
} catch (...) {
if (blocked) {
replication_area_unlock();
}
- std::cerr << "sslid_replication_data_processor::write_replicaion_area() : Unknown exception." << std::endl;
- putLogError(300103, "function : void sslid_replication_data_processor::write_replicaion_area() : "
+ std::cerr << "sslid_replication_data_processor::write_replication_area() : Unknown exception." << std::endl;
+ putLogError(300103, "function : void sslid_replication_data_processor::write_replication_area() : "
"Unknown exception.", __FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel())) {
putLogDebug(300221, "out_function : void sslid_replication_data_processor::"
- "write_replicaion_area().", __FILE__, __LINE__);
+ "write_replication_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
}
//! get data from temp list
-//! @param[out] sslid_replication_temp_data refrence
+//! @param[out] sslid_replication_temp_data reference
//! @return 0 : success for get data
-//! @return -1 : faild to get data
+//! @return -1 : failed to get data
int sslid_replication_data_processor::get_from_temp_list(
sslid_replication_temp_data &data)
{
}
//! get endpoint from session data
-//! @param[in] session_id refrence
-//! @param[out] endpoint refrence
+//! @param[in] session_id reference
+//! @param[out] endpoint reference
//! @return 0 : success
//! @return 1: failed
//! @return -1:exception
}
//! write session data to map
-//! @param[in] session_id refrence
-//! @param[in] endpoint refrence
+//! @param[in] session_id reference
+//! @param[in] endpoint reference
//! @param[in] now time
//! @return 0 : success
//! @return 1: failed
namespace l7vs
{
-//! constractor
+//! constructor
schedule_module_least_connection::schedule_module_least_connection() : schedule_module_base("lc")
{
}
-//! destractor
+//! destructor
schedule_module_least_connection::~schedule_module_least_connection() {}
//! initialize function
}
}
-//! handle schedule calles then schedule function for UDP endpoint
+//! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
}
}
-//! replication interval interrrupt
+//! replication interval interrupt
//! timer thread call this function. from virtualservice.
void schedule_module_least_connection::replication_interrupt() {}
class schedule_module_least_connection : public schedule_module_base
{
public:
- //! constractor
+ //! constructor
schedule_module_least_connection();
- //! destractor
+ //! destructor
~schedule_module_least_connection();
//! initialize function
rslist_iterator_next_func_type inlist_next,
boost::asio::ip::tcp::endpoint &outendpoint);
- //! handle schedule calles then schedule function for UDP endpoint
+ //! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
rslist_iterator_next_func_type inlist_next,
boost::asio::ip::udp::endpoint &outendpoint);
- //! replication interval interrrupt
+ //! replication interval interrupt
//! timer thread call this function. from virtualservice.
void replication_interrupt();
};
namespace l7vs
{
-//! constractor
+//! constructor
schedule_module_round_robin::schedule_module_round_robin() : schedule_module_base("rr")
{
}
-//! destractor
+//! destructor
schedule_module_round_robin::~schedule_module_round_robin() {}
//! initialize function
}
}
-//! handle schedule calles then schedule function for UDP endpoint
+//! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
}
}
-//! replication interval interrrupt
+//! replication interval interrupt
//! timer thread call this function. from virtualservice.
void schedule_module_round_robin::replication_interrupt() {}
boost::asio::ip::tcp::endpoint tcp_endpoint ;
boost::asio::ip::udp::endpoint udp_endpoint ;
public:
- //! constractor
+ //! constructor
schedule_module_round_robin();
- //! destractor
+ //! destructor
~schedule_module_round_robin();
//! initialize function
rslist_iterator_next_func_type inlist_next,
boost::asio::ip::tcp::endpoint &outendpoint);
- //! handle schedule calles then schedule function for UDP endpoint
+ //! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
rslist_iterator_next_func_type inlist_next,
boost::asio::ip::udp::endpoint &outendpoint);
- //! replication interval interrrupt
+ //! replication interval interrupt
//! timer thread call this function. from virtualservice.
void replication_interrupt();
};
namespace l7vs
{
-//! constractor
+//! constructor
schedule_module_weighted_round_robin::schedule_module_weighted_round_robin() : schedule_module_base("wrr")
{
}
-//! destractor
+//! destructor
schedule_module_weighted_round_robin::~schedule_module_weighted_round_robin() {}
//! initialize function
vs_weights.gcd = 0;
if (likely(!putLogInfo.empty())) {
- putLogInfo(300000, "Saved endpoint, weight and gcd were initialized.", __FILE__, __LINE__);
+ putLogInfo(300000, "Saved endpoint, weight and G.C.D. were initialized.", __FILE__, __LINE__);
}
if (likely(!getloglevel.empty())) {
}
}
-//! handle schedule calles then schedule function for UDP endpoint
+//! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
}
}
-//! replication interval interrrupt
+//! replication interval interrupt
//! timer thread call this function. from virtualservice.
void schedule_module_weighted_round_robin::replication_interrupt() {}
struct wrr_weights {
int currentWeight; /*! Current Weight */
int maxWeight; /*! Max of Weight */
- int gcd; /*! GCD of RealServer list */
+ int gcd; /*! G.C.D. of RealServer list */
wrr_weights() : currentWeight(0), maxWeight(0), gcd(0) {}
} vs_weights;
public:
- //! constractor
+ //! constructor
schedule_module_weighted_round_robin();
- //! destractor
+ //! destructor
~schedule_module_weighted_round_robin();
//! initialize function
rslist_iterator_next_func_type inlist_next,
boost::asio::ip::tcp::endpoint &outendpoint);
- //! handle schedule calles then schedule function for UDP endpoint
+ //! handle schedule calls then schedule function for UDP endpoint
//! @param[in] thread id
//! @param[in] list iterator first function object
//! @param[in] list iterator last function object
rslist_iterator_next_func_type inlist_next,
boost::asio::ip::udp::endpoint &outendpoint);
- //! replication interval interrrupt
+ //! replication interval interrupt
//! timer thread call this function. from virtualservice.
void replication_interrupt();
//! @brief constructor
//! @param[in] io_service
//! @param[in] socket file
-//! @param[in] l7vsd refernce
+//! @param[in] l7vsd reference
command_receiver::command_receiver(boost::asio::io_service &io_service, const std::string &file, l7vsd &parent)
: dispatcher(io_service),
acceptor_(io_service, boost::asio::local::stream_protocol::endpoint(file)),
sockfile = file;
- // create command_session for first acception.
+ // create command_session for first accept.
command_session::command_session_ptr session(new command_session(dispatcher, vsd));
// start an asynchronous accept for first.
acceptor_.async_accept(session->socket(),
if (!err) {
// command_session start.
session->start();
- // create command_session for next acception.
+ // create command_session for next accept.
session.reset(new command_session(dispatcher, vsd));
// start an asynchronous accept for next.
acceptor_.async_accept(session->socket(),
//! @brief constructor
//! @param[in] io_service
-//! @param[in] l7vsd refernce
+//! @param[in] l7vsd reference
command_session::command_session(boost::asio::io_service &io_service, l7vsd &parent)
: unixsocket(io_service),
vsd(parent)
{
Logger logger(LOG_CAT_L7VSD_COMMAND, 8, "command_session::execute_command", __FILE__, __LINE__);
- // deserialize requestdata
+ // deserialize request data
std::stringstream ss;
ss << &(request_buffer[0]);
boost::archive::text_iarchive ia(ss);
}
/*------ DEBUG LOG END ------*/
- // serialize responsedata
+ // serialize response data
boost::archive::text_oarchive oa(response_stream);
oa << (const l7vsd_response &) response_data;
}
{
Logger logger(LOG_CAT_L7VSD_COMMAND, 11, "command_session::start", __FILE__, __LINE__);
- // start async read requestdata from unixsocket.
+ // start async read request data from unixsocket.
unixsocket.async_read_some(boost::asio::buffer(request_buffer),
boost::bind(&command_session::handle_read,
shared_from_this(),
return false;
}
try {
- virtualservice_element &elem = request.vs_element; // request virtualservice element refalence get.
+ virtualservice_element &elem = request.vs_element; // request virtualservice element reference get.
std::string tmp = argv[pos];
std::string::reverse_iterator ritr = tmp.rbegin();
if (*ritr == 'G' || *ritr == 'g') {
}
return true;
}
-//! virtualservice option qosdownstream functipn
+//! virtualservice option qosdownstream function
//! @param[in] argument position
//! @param[in] argument count
//! @param[in] argument value
return false;
}
try {
- virtualservice_element &elem = request.vs_element; // request virtualservice element refalence get.
+ virtualservice_element &elem = request.vs_element; // request virtualservice element reference get.
std::string tmp = argv[pos];
std::string::reverse_iterator ritr = tmp.rbegin();
if (*ritr == 'G' || *ritr == 'g') {
{
Logger logger(LOG_CAT_L7VSADM_COMMON, 12, "l7vsadm::parse_opt_vs_udp_func", __FILE__, __LINE__);
- virtualservice_element &elem = request.vs_element; // request virtualservie element reference get.
+ virtualservice_element &elem = request.vs_element; // request virtualservice element reference get.
elem.udpmode = true; // udpmode on.
boost::asio::ip::tcp::endpoint zeropoint;
- if (zeropoint != elem.tcp_accept_endpoint) { // adddress tcp_acceptor endpoint
+ if (zeropoint != elem.tcp_accept_endpoint) { // address tcp_acceptor endpoint
std::stringstream sstream;
sstream << elem.tcp_accept_endpoint;
std::string endpoint = sstream.str();
std::cout <<
"Options:\n"
" --tcp-service -t service-address service-address is host:port\n"
- " --proto-module -m proto-module protocol module name and module argment\n"
+ " --proto-module -m proto-module protocol module name and module argument\n"
" [module-args]\n"
" --scheduler -s scheduler one of rr,lc,wrr\n"
" --upper -u connection-count maximum number of connections\n"
" --bypass -b sorry-server sorry server address is host:port\n"
" --tproxy -T set sorry server connection to IP transparent mode.\n"
- " --masq -M set sorry server connection to IP masquarade mode.\n"
+ " --masq -M set sorry server connection to IP masquerade mode.\n"
" --flag -f sorry-flag sorry status set to virtual service\n"
" --qos-up -Q QoSval-up QoS Threshold(bps) set to real server direction\n"
" --real-server -r server-address server-address is host:port\n"
" --weight -w weight scheduling weight set to real server\n"
" --tproxy -T set real server connection to IP transparent mode.\n"
- " --masq -M set real server connection to IP masquarade mode.\n"
+ " --masq -M set real server connection to IP masquerade mode.\n"
" --switch -s replication-switch start or stop replication\n"
" --force -f force replication start\n"
" --dump -d dump replication memory\n"
}
std::cout << buf.str();
}
-//! l7vsadm constractor.
+//! l7vsadm constructor.
//! create including all dictionary.
l7vs::l7vsadm::l7vsadm()
: numeric_flag(false),
}
/*------ DEBUG LOG END ------*/
- // set sighanlder
+ // set sighandler
if (0 > set_sighandlers()) {
std::string buf("set_sighandlers failed.");
std::cerr << "COMMON ERROR: " << buf << std::endl;
return false;
}
- // readparam
+ // read param
set_parameter();
// Get l7vsadm execute file path from /proc/(pid)/exe (symbolic link)
signal_flag = true;
}
-//! set singal handler function
+//! set signal handler function
//! @param[in] signal
//! @param[in] handler function pointer
//! @return 0/success, -1/fail
return 0;
}
-//! set all singal handler function
+//! set all signal handler function
//! @return 0/success, -1/fail
static int set_sighandlers()
{
}
//! virtual_service list command
-//! @param[out] arry of vs_element
+//! @param[out] array of vs_element
//! @param[out] error_code
void l7vsd::list_virtual_service(vselist_type *out_vslist, error_code &err)
{
}
//! virtual_service list verbose command
-//! @param[out] arry of vs_element
+//! @param[out] array of vs_element
//! @param[out] error_code
void l7vsd::list_virtual_service_verbose(l7vsd_response *response, error_code &err)
{
std::ostringstream oss;
oss << "TRAP00020004,A real server was added.vs:";
- //virtualservice infomation
+ //virtualservice information
if (in_vselement->udpmode) {
if (in_vselement->udp_recv_endpoint.address().is_v6()) {
oss << "[" << in_vselement->udp_recv_endpoint.address().to_string() << "]:" << in_vselement->udp_recv_endpoint.port();
}
}
- //realserver infomation
+ //realserver information
BOOST_FOREACH(realserver_element elem, in_vselement->realserver_vector) {
if (in_vselement->udpmode) {
if (elem.udp_endpoint.address().is_v6()) {
std::ostringstream oss;
oss << "TRAP00020006,A real server was eliminated.vs:";
- //virtualservice infomation
+ //virtualservice information
if (in_vselement->udpmode) {
if (in_vselement->udp_recv_endpoint.address().is_v6()) {
oss << "[" << in_vselement->udp_recv_endpoint.address().to_string() << "]:" << in_vselement->udp_recv_endpoint.port();
}
}
- //realserver infomation
+ //realserver information
BOOST_FOREACH(realserver_element elem, in_vselement->realserver_vector) {
if (in_vselement->udpmode) {
if (elem.udp_endpoint.address().is_v6()) {
std::ostringstream oss;
oss << "TRAP00020005,The real server was changed.vs:";
- //virtualservice infomation
+ //virtualservice information
if (in_vselement->udpmode) {
if (in_vselement->udp_recv_endpoint.address().is_v6()) {
oss << "[" << in_vselement->udp_recv_endpoint.address().to_string() << "]:" << in_vselement->udp_recv_endpoint.port();
}
}
- //realserver infomation
+ //realserver information
BOOST_FOREACH(realserver_element elem, in_vselement->realserver_vector) {
if (in_vselement->udpmode) {
if (elem.udp_endpoint.address().is_v6()) {
}
//! replication command
-//! @param[in] replicaiton command
+//! @param[in] replication command
//! @param[out] error_code
void l7vsd::replication_command(const l7vsadm_request::REPLICATION_COMMAND_TAG *cmd, error_code &err)
{
boost::thread sigthread(boost::bind(&l7vsd::sig_exit_handler, this));
sigthread.detach();
- // protoclol module control initialize
+ // protocol module control initialize
protocol_module_control::getInstance().initialize(L7VS_MODULE_PATH);
// schedule module control initialize
for (;;) {
if (unlikely(exit_requested)) {
std::stringstream buf;
- buf << boost::format("l7vsd signal(%d) received. exitting...") % received_sig;
+ buf << boost::format("l7vsd signal(%d) received. exiting...") % received_sig;
logger.putLogInfo(LOG_CAT_L7VSD_MAINTHREAD, 1, buf.str(), __FILE__, __LINE__);
break;
}
// schedule module control finalize
schedule_module_control::getInstance().finalize();
- // protpcol module control finalize
+ // protocol module control finalize
protocol_module_control::getInstance().finalize();
} catch (std::exception &e) {
std::stringstream buf;
}
}
-//! log output constractor
-//! scoped log output( Logger destractor output log)
+//! log output constructor
+//! scoped log output( Logger destructor output log)
//! @param[in] Log output category tag
//! @param[in] log id
//! @param[in] log message
/*!
* output fatal log.
* this is only wrapper to implement method.
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
}
/*!
- * output errorl log.
+ * output error log.
* this is only wrapper to implement method.
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output warn log.
* this is only wrapper to implement method.
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output info log.
* this is only wrapper to implement method.
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
/*!
* output debug log.
* this is only wrapper to implement method.
- * @param category that logging matter occured
+ * @param category that logging matter occurred
* @param log message id
* @param log message
* @param current file
#include "parameter.h"
/*!
- * initialze function.
+ * initialize function.
*
* @retrun current instance.
*/
* log rotate parameter check function.
*
* @param logrotation designation contents
- * @retrun false faild.
+ * @retrun false failed.
*/
bool l7vs::logger_access_manager::access_log_logrotate_parameter_check(
const std::map<std::string, std::string>& rotatedata)
appender_property access_log_property;
std::map<std::string, std::string> rotatedata_cpy = rotatedata;
- return(logger_logrotate_utility::acccess_log_LogrotateParamCheck(rotatedata_cpy , access_log_property));
+ return(logger_logrotate_utility::access_log_LogrotateParamCheck(rotatedata_cpy , access_log_property));
}
/*!
rotation_type = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_ROTATION_KEY, ec);
if (ec) {
- logger_logrotate_utility::loglotation_utility_logic_error(110, "Not Exist Log Rotation Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(110, "Not Exist Log Rotation Setting.", __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + ACCESS_LOG_ROTATE_TYPE + " " + rotation_type;
max_backup_index = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_MAX_BACKUP_INDEX_KEY, ec);
if (ec) {
- logger_logrotate_utility::loglotation_utility_logic_error(111, "Not Exist Log MaxBackupIndex Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(111, "Not Exist Log MaxBackupIndex Setting.", __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATE_MAX_BACKUP_INDEX + " " + max_backup_index;
max_file_size = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_MAX_FILE_SIZE_KEY, ec);
if (ec) {
- logger_logrotate_utility::loglotation_utility_logic_error(112, "Not Exist Log MaxFileSize Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(112, "Not Exist Log MaxFileSize Setting.", __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATE_MAX_FILESIZE + " " + max_file_size;
rotation_timing = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_ROTATION_TIMING_KEY, ec);
if (ec) {
- logger_logrotate_utility::loglotation_utility_logic_error(113, "Not Exist Log RotaionTiming Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(113, "Not Exist Log RotationTiming Setting.", __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATE_ROTATION_TIMING + " " + rotation_timing;
rotation_timing_value_key = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_ROTATION_TIMING_VALUE_KEY, ec);
if (ec) {
std::stringstream ss;
- ss << "Not Exist Log RotaionTiming " << rotation_timing << " Setting.";
- logger_logrotate_utility::loglotation_utility_logic_error(114, ss.str(), __FILE__, __LINE__);
+ ss << "Not Exist Log RotationTiming " << rotation_timing << " Setting.";
+ logger_logrotate_utility::logrotation_utility_logic_error(114, ss.str(), __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATION_TIMING_VALUE + " " + rotation_timing_value_key;
max_file_size = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_MAX_FILE_SIZE_KEY, ec);
if (ec) {
- logger_logrotate_utility::loglotation_utility_logic_error(115, "Not Exist Log MaxFileSize Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(115, "Not Exist Log MaxFileSize Setting.", __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATE_MAX_FILESIZE + " " + max_file_size;
rotation_timing = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_ROTATION_TIMING_KEY, ec);
if (ec) {
- logger_logrotate_utility::loglotation_utility_logic_error(116, "Not Exist Log RotaionTiming Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(116, "Not Exist Log RotationTiming Setting.", __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATE_ROTATION_TIMING + " " + rotation_timing;
rotation_timing_value_key = param.get_string(PARAM_COMP_LOGGER, ACCESS_LOG_ROTATION_TIMING_VALUE_KEY, ec);
if (ec) {
std::stringstream ss;
- ss << "Not Exist Log RotaionTiming " << rotation_timing << " Setting.";
- logger_logrotate_utility::loglotation_utility_logic_error(117, ss.str(), __FILE__, __LINE__);
+ ss << "Not Exist Log RotationTiming " << rotation_timing << " Setting.";
+ logger_logrotate_utility::logrotation_utility_logic_error(117, ss.str(), __FILE__, __LINE__);
}
rotate_default_verbose_displayed_contents = rotate_default_verbose_displayed_contents + " " + ACCESS_LOG_ROTATION_TIMING_VALUE + " " + rotation_timing_value_key;
name_category_map["l7vsd_system_signal"] = LOG_CAT_L7VSD_SYSTEM_SIGNAL;
category_name_map[LOG_CAT_L7VSD_SYSTEM_SIGNAL] = "l7vsd_system_signal";
- //l7vsd system enviroment category initialize
+ //l7vsd system environment category initialize
category_level_map[LOG_CAT_L7VSD_SYSTEM_ENVIRONMENT] = LOG_LV_ERROR;
name_category_map["l7vsd_system_environment"] = LOG_CAT_L7VSD_SYSTEM_ENVIRONMENT;
category_name_map[LOG_CAT_L7VSD_SYSTEM_ENVIRONMENT] = "l7vsd_system_environment";
/*!
* error handling function.
- * if error occured, switch appenders to syslogappender and fileappender(/dev/console)
+ * if error occurred, switch appenders to syslogappender and fileappender(/dev/console)
* message will output to syslog/fileappender appender
*
* @param log message id
else if ("hour" == rotationTimingStr) property->rotation_timing_value = LOG_TIM_HOUR;
else logic_error(10, "Invalid Log RotationTiming Setting.", __FILE__, __LINE__);
} else {
- logic_error(11, "Not Exist Log RotaionTiming Setting.", __FILE__, __LINE__);
+ logic_error(11, "Not Exist Log RotationTiming Setting.", __FILE__, __LINE__);
}
if (LOG_TIM_YEAR == property->rotation_timing_value) {
logic_error(22, "Parse Timing Year Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(2) << month
<< std::setfill('0') << std::setw(2) << date
property->rotation_timing_value_value = oss.str();
} else {
- logic_error(23, "Not Exist Log RotaionTiming Year Setting.", __FILE__, __LINE__);
+ logic_error(23, "Not Exist Log RotationTiming Year Setting.", __FILE__, __LINE__);
}
}
logic_error(31, "Parse Timing Month Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::stringstream oss;
oss << std::setfill('0') << std::setw(2) << date
<< std::setfill('0') << std::setw(2) << hour
property->rotation_timing_value_value = oss.str();
} else {
- logic_error(32, "Not Exist Log RotaionTiming Month Setting.", __FILE__, __LINE__);
+ logic_error(32, "Not Exist Log RotationTiming Month Setting.", __FILE__, __LINE__);
}
}
logic_error(39, "Parse Timing Week Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(1) << week
<< std::setfill('0') << std::setw(2) << hour
property->rotation_timing_value_value = oss.str();
} else {
- logic_error(40, "Not Exist Log RotaionTiming Week Setting.", __FILE__, __LINE__);
+ logic_error(40, "Not Exist Log RotationTiming Week Setting.", __FILE__, __LINE__);
}
}
logic_error(45, "Parse Timing Date Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(2) << hour
<< std::setfill('0') << std::setw(2) << minute;
property->rotation_timing_value_value = oss.str();
} else {
- logic_error(46, "Not Exist Log RotaionTiming Date Setting.", __FILE__, __LINE__);
+ logic_error(46, "Not Exist Log RotationTiming Date Setting.", __FILE__, __LINE__);
}
}
logic_error(48, "Parse Timing Hour Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(2) << minute;
property->rotation_timing_value_value = oss.str();
} else {
- logic_error(49, "Not Exist Log RotaionTiming Hour Setting.", __FILE__, __LINE__);
+ logic_error(49, "Not Exist Log RotationTiming Hour Setting.", __FILE__, __LINE__);
}
}
}
switch (property->rotation_value) {
case LOG_ROT_SIZE: {
- // create FixedWindcd owRollingPolicy
+ // create FixedWindowRollingPolicy
log4cxx::rolling::FixedWindowRollingPolicyPtr fixedRollingPolicy =
new log4cxx::rolling::FixedWindowRollingPolicy();
}
/*!
- * initialze function.
+ * initialize function.
*
* @param default logrotation info use flag
* @param default logrotation info
if (this->rotate_default_flag == true) {
lotate_check_flag =
- logger_logrotate_utility::acccess_log_LogrotateParamCheck(
+ logger_logrotate_utility::access_log_LogrotateParamCheck(
rotatedata,
access_log_property);
} else {
}
/*!
- * increase reffernce count.
+ * increase reference count.
*
* @retrun void
*/
}
/*!
- * decrease reffernce count.
+ * decrease reference count.
*
* @retrun void
*/
}
/*!
- * decrease reffernce count.
+ * decrease reference count.
*
* @param inequal check object
* @return check result
/*!
- * @file logger_rogrote_utility.cpp
+ * @file logger_logrotate_utility.cpp
* @brief logger module implementation class For access log.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
/*!
* rotate type check.
*
- * @param rotaton string("size" or "date" or "datesize")
+ * @param rotation string("size" or "date" or "datesize")
* @return LOG_ROTATION_TAG val
*/
LOG_ROTATION_TAG logger_logrotate_utility::check_rotate_type(const std::string &rotation_type)
else {
std::stringstream ss;
ss << "Invalid Log Rotation Setting : " << rotation_type;
- logger_logrotate_utility::loglotation_utility_logic_error(51, ss.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(51, ss.str(), __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(52, "Not Exist Log Rotation Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(52, "Not Exist Log Rotation Setting.", __FILE__, __LINE__);
}
return(rotation_value);
} catch (const boost::bad_lexical_cast &bc) {
std::stringstream ss;
ss << "Invalid MaxBackupIndex Value : " << max_backup_index << ".";
- logger_logrotate_utility::loglotation_utility_logic_error(53, ss.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(53, ss.str(), __FILE__, __LINE__);
}
if (LOGGER_BACKUP_INDEX_LOWER_LIMIT > max_backup_index_value) {
std::stringstream ss;
ss << "Max Backup Index must at least " << LOGGER_BACKUP_INDEX_LOWER_LIMIT << ".";
- logger_logrotate_utility::loglotation_utility_logic_error(54, ss.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(54, ss.str(), __FILE__, __LINE__);
}
if (LOGGER_BACKUP_INDEX_LIMIT < max_backup_index_value) {
std::stringstream ss;
ss << "Max Backup Index must at most " << LOGGER_BACKUP_INDEX_LIMIT << ".";
- logger_logrotate_utility::loglotation_utility_logic_error(55, ss.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(55, ss.str(), __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(56, "Not Exist Log MaxBackupIndex Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(56, "Not Exist Log MaxBackupIndex Setting.", __FILE__, __LINE__);
}
return(max_backup_index_value);
unsigned long long max_file_size_value = 0;
if (max_file_size == "") {
- logger_logrotate_utility::loglotation_utility_logic_error(57, "Not Exist Log MaxFileSize Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(57, "Not Exist Log MaxFileSize Setting.", __FILE__, __LINE__);
}
std::string size_val;
int maxFileSizeStr_length = max_file_size.length();
if (maxFileSizeStr_length <= 0) {
- logger_logrotate_utility::loglotation_utility_logic_error(58, "Invalid FileSize Value.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(58, "Invalid FileSize Value.", __FILE__, __LINE__);
}
std::string last_str = max_file_size.substr(maxFileSizeStr_length - 1, 1);
try {
max_file_size_value = boost::lexical_cast<size_t>(size_val);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(59, "Invalid FileSize Value.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(59, "Invalid FileSize Value.", __FILE__, __LINE__);
}
if ("K" == last_str) {
if ((ULLONG_MAX / 1024) < max_file_size_value) {
- logger_logrotate_utility::loglotation_utility_logic_error(60, "Invalid FileSize Value.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(60, "Invalid FileSize Value.", __FILE__, __LINE__);
}
max_file_size_value = max_file_size_value * 1024;
} else if ("M" == last_str) {
if ((ULLONG_MAX / 1024 / 1024) < max_file_size_value)
- logger_logrotate_utility::loglotation_utility_logic_error(61, "Invalid FileSize Value.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(61, "Invalid FileSize Value.", __FILE__, __LINE__);
max_file_size_value = max_file_size_value * 1024 * 1024;
} else if ("G" == last_str) {
if ((ULLONG_MAX / 1024 / 1024 / 1024) < max_file_size_value)
- logger_logrotate_utility::loglotation_utility_logic_error(62, "Invalid FileSize Value.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(62, "Invalid FileSize Value.", __FILE__, __LINE__);
max_file_size_value = max_file_size_value * 1024 * 1024 * 1024;
}
if (LOGGER_FILESIZE_LOWER_LIMIT > max_file_size_value) {
int limit = LOGGER_FILESIZE_LOWER_LIMIT;
std::ostringstream oss;
oss << "FileSize must at least " << limit << " bytes.";
- logger_logrotate_utility::loglotation_utility_logic_error(63, oss.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(63, oss.str(), __FILE__, __LINE__);
}
else if ("week" == rotation_timing) rotation_timing_value = LOG_TIM_WEEK;
else if ("date" == rotation_timing) rotation_timing_value = LOG_TIM_DATE;
else if ("hour" == rotation_timing) rotation_timing_value = LOG_TIM_HOUR;
- else logger_logrotate_utility::loglotation_utility_logic_error(64, "Invalid Log RotationTiming Setting.", __FILE__, __LINE__);
+ else logger_logrotate_utility::logrotation_utility_logic_error(64, "Invalid Log RotationTiming Setting.", __FILE__, __LINE__);
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(65, "Not Exist Log RotaionTiming Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(65, "Not Exist Log RotationTiming Setting.", __FILE__, __LINE__);
}
try {
month = boost::lexical_cast<int>(monthStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(66, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(66, "Parse Timing Year Error.", __FILE__, __LINE__);
}
if (1 > month || month > 12) {
- logger_logrotate_utility::loglotation_utility_logic_error(67, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(67, "Parse Timing Year Error.", __FILE__, __LINE__);
}
fpos = rpos + 1;
// find date
try {
date = boost::lexical_cast<int>(dateStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(68, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(68, "Parse Timing Year Error.", __FILE__, __LINE__);
}
}
- if (1 > date || date > 31) logger_logrotate_utility::loglotation_utility_logic_error(69, "Parse Timing Year Error.", __FILE__, __LINE__);
+ if (1 > date || date > 31) logger_logrotate_utility::logrotation_utility_logic_error(69, "Parse Timing Year Error.", __FILE__, __LINE__);
int dates[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- if (date > dates[month - 1]) logger_logrotate_utility::loglotation_utility_logic_error(70, "Parse Timing Year Error.", __FILE__, __LINE__);
+ if (date > dates[month - 1]) logger_logrotate_utility::logrotation_utility_logic_error(70, "Parse Timing Year Error.", __FILE__, __LINE__);
fpos = rpos + 1;
// find hour
try {
hour = boost::lexical_cast<int>(hourStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(71, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(71, "Parse Timing Year Error.", __FILE__, __LINE__);
}
- if (0 > hour || hour > 23) logger_logrotate_utility::loglotation_utility_logic_error(72, "Parse Timing Year Error.", __FILE__, __LINE__);
+ if (0 > hour || hour > 23) logger_logrotate_utility::logrotation_utility_logic_error(72, "Parse Timing Year Error.", __FILE__, __LINE__);
// minute
std::string minuteStr = ret.substr(rpos + 1);
try {
minute = boost::lexical_cast<int>(minuteStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(73, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(73, "Parse Timing Year Error.", __FILE__, __LINE__);
}
- if (0 > minute || minute > 59) logger_logrotate_utility::loglotation_utility_logic_error(74, "Parse Timing Year Error.", __FILE__, __LINE__);
+ if (0 > minute || minute > 59) logger_logrotate_utility::logrotation_utility_logic_error(74, "Parse Timing Year Error.", __FILE__, __LINE__);
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(75, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(75, "Parse Timing Year Error.", __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(76, "Parse Timing Year Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(76, "Parse Timing Year Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(2) << month
<< std::setfill('0') << std::setw(2) << date
rotation_timing_value_value = oss.str();
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(77, "Not Exist Log RotaionTiming Year Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(77, "Not Exist Log RotationTiming Year Setting.", __FILE__, __LINE__);
}
}
try {
date = boost::lexical_cast<int>(dateStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(78, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(78, "Parse Timing Month Error.", __FILE__, __LINE__);
}
if (1 > date || date > 31) {
- logger_logrotate_utility::loglotation_utility_logic_error(79, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(79, "Parse Timing Month Error.", __FILE__, __LINE__);
}
fpos = rpos + 1;
// find hour
try {
hour = boost::lexical_cast<int>(hourStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(80, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(80, "Parse Timing Month Error.", __FILE__, __LINE__);
}
if (0 > hour || hour > 23) {
- logger_logrotate_utility::loglotation_utility_logic_error(81, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(81, "Parse Timing Month Error.", __FILE__, __LINE__);
}
// minute
std::string minuteStr = ret.substr(rpos + 1);
try {
minute = boost::lexical_cast<int>(minuteStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(82, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(82, "Parse Timing Month Error.", __FILE__, __LINE__);
}
if (0 > minute || minute > 59) {
- logger_logrotate_utility::loglotation_utility_logic_error(83, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(83, "Parse Timing Month Error.", __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(84, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(84, "Parse Timing Month Error.", __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(85, "Parse Timing Month Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(85, "Parse Timing Month Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::stringstream oss;
oss << std::setfill('0') << std::setw(2) << date
<< std::setfill('0') << std::setw(2) << hour
rotation_timing_value_value = oss.str();
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(86, "Not Exist Log RotaionTiming Month Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(86, "Not Exist Log RotationTiming Month Setting.", __FILE__, __LINE__);
}
}
else if ("fri" == weekStr) week = 5;
else if ("sat" == weekStr) week = 6;
else {
- logger_logrotate_utility::loglotation_utility_logic_error(87, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(87, "Parse Timing Week Error.", __FILE__, __LINE__);
}
fpos = rpos + 1;
// find hour
try {
hour = boost::lexical_cast<int>(hourStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(88, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(88, "Parse Timing Week Error.", __FILE__, __LINE__);
}
if (0 > hour || hour > 23) {
- logger_logrotate_utility::loglotation_utility_logic_error(89, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(89, "Parse Timing Week Error.", __FILE__, __LINE__);
}
// minute
std::string minuteStr = ret.substr(rpos + 1);
try {
minute = boost::lexical_cast<int>(minuteStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(90, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(90, "Parse Timing Week Error.", __FILE__, __LINE__);
}
if (0 > minute || minute > 59) {
- logger_logrotate_utility::loglotation_utility_logic_error(91, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(91, "Parse Timing Week Error.", __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(92, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(92, "Parse Timing Week Error.", __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(93, "Parse Timing Week Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(93, "Parse Timing Week Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(1) << week
<< std::setfill('0') << std::setw(2) << hour
rotation_timing_value_value = oss.str();
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(94, "Not Exist Log RotaionTiming Week Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(94, "Not Exist Log RotationTiming Week Setting.", __FILE__, __LINE__);
}
}
try {
hour = boost::lexical_cast<int>(hourStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(95, "Parse Timing Date Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(95, "Parse Timing Date Error.", __FILE__, __LINE__);
}
if (0 > hour || hour > 23) {
- logger_logrotate_utility::loglotation_utility_logic_error(96, "Parse Timing Date Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(96, "Parse Timing Date Error.", __FILE__, __LINE__);
}
// minute
std::string minuteStr = ret.substr(rpos + 1);
try {
minute = boost::lexical_cast<int>(minuteStr);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(97, "Parse Timing Date Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(97, "Parse Timing Date Error.", __FILE__, __LINE__);
}
if (0 > minute || minute > 59) {
- logger_logrotate_utility::loglotation_utility_logic_error(98, "Parse Timing Date Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(98, "Parse Timing Date Error.", __FILE__, __LINE__);
}
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(99, "Parse Timing Date Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(99, "Parse Timing Date Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(2) << hour
<< std::setfill('0') << std::setw(2) << minute;
rotation_timing_value_value = oss.str();
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(100, "Not Exist Log RotaionTiming Date Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(100, "Not Exist Log RotationTiming Date Setting.", __FILE__, __LINE__);
}
}
try {
minute = boost::lexical_cast<int>(ret);
} catch (const boost::bad_lexical_cast &bc) {
- logger_logrotate_utility::loglotation_utility_logic_error(101, "Parse Timing Hour Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(101, "Parse Timing Hour Error.", __FILE__, __LINE__);
}
if (0 > minute || minute > 59) {
- logger_logrotate_utility::loglotation_utility_logic_error(102, "Parse Timing Hour Error.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(102, "Parse Timing Hour Error.", __FILE__, __LINE__);
}
- // format to internal rotation timing value expresson
+ // format to internal rotation timing value expression
std::ostringstream oss;
oss << std::setfill('0') << std::setw(2) << minute;
rotation_timing_value_value = oss.str();
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(103, "Not Exist Log RotaionTiming Hour Setting.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(103, "Not Exist Log RotationTiming Hour Setting.", __FILE__, __LINE__);
}
}
switch (log_property.rotation_value) {
case LOG_ROT_SIZE: {
- // create FixedWindcd owRollingPolicy
+ // create FixedWindowRollingPolicy
log4cxx::rolling::FixedWindowRollingPolicyPtr fixedRollingPolicy =
new log4cxx::rolling::FixedWindowRollingPolicy();
} catch (const std::exception &e) {
std::stringstream buf;
buf << "File Create Failed:" << log_property.log_filename_value;
- logger_logrotate_utility::loglotation_utility_logic_error(104, buf.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(104, buf.str(), __FILE__, __LINE__);
}
// activate appender options
} catch (const std::exception &e) {
std::stringstream buf;
buf << "File Create Failed:" << log_property.log_filename_value;
- logger_logrotate_utility::loglotation_utility_logic_error(105, buf.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(105, buf.str(), __FILE__, __LINE__);
}
// activate appender options
} catch (const std::exception &e) {
std::stringstream buf;
buf << "File Create Failed:" << log_property.log_filename_value;
- logger_logrotate_utility::loglotation_utility_logic_error(106, buf.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(106, buf.str(), __FILE__, __LINE__);
}
// activate appender options
log4cxx::LoggerPtr cat_logger = log4cxx::Logger::getLogger(log_category);
if (0 == cat_logger) {
- logger_logrotate_utility::loglotation_utility_logic_error(107, "getLogger Failed.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(107, "getLogger Failed.", __FILE__, __LINE__);
}
AppenderPtr appender_pointer = cat_logger->getAppender(log_category);
} catch (const std::exception &e) {
std::ostringstream oss;
oss << "Logger Reload Config Failed : " << e.what();
- logger_logrotate_utility::loglotation_utility_logic_error(108, oss.str(), __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(108, oss.str(), __FILE__, __LINE__);
}
*
* @param check object.
* @param appender property
- * @return false faild
+ * @return false failed
*/
-bool logger_logrotate_utility::acccess_log_LogrotateParamCheck(
+bool logger_logrotate_utility::access_log_LogrotateParamCheck(
accesslog_rotate_map_type &rotatedata,
appender_property &access_log_property)
{
} else if (itr->first == ACCESS_LOG_ROTATION_TIMING_VALUE) {
rotation_timing_value_key = itr->second;
} else {
- logger_logrotate_utility::loglotation_utility_logic_error(109, "access log rotation invalid argument.", __FILE__, __LINE__);
+ logger_logrotate_utility::logrotation_utility_logic_error(109, "access log rotation invalid argument.", __FILE__, __LINE__);
}
}
* @param line no
* @return void
*/
-void logger_logrotate_utility::loglotation_utility_logic_error(const unsigned int logno, const std::string &str, const char *file , const unsigned int line)
+void logger_logrotate_utility::logrotation_utility_logic_error(const unsigned int logno, const std::string &str, const char *file , const unsigned int line)
{
#if defined(LOGGER_PROCESS_VSD)
Logger::putLogError(l7vs::LOG_CAT_L7VSD_LOGGER, logno, str, file, line);
namespace l7vs
{
/*!
- * update virtual service table infomation.
+ * update virtual service table information.
*
* @param l7vsd * l7vsd pointer
* @param error_code & error code
virtualservice_element &srv = (*it)->get_element();
- //get virtual service IP address infomation
+ //get virtual service IP address information
if (srv.udpmode) {
protocol = SNMP_IPPROTO_UDP;
if (srv.udp_recv_endpoint.address().is_v4()) {
vs_port = srv.tcp_accept_endpoint.port();
}
- //get sorry server IP address infomation
+ //get sorry server IP address information
if (srv.sorry_endpoint.address().is_v4()) {
strncpy(sorry_ipaddress, srv.sorry_endpoint.address().to_v4().to_string().c_str(), L7VS_IPADDR_LEN);
} else {
sorry_flag = (srv.sorry_flag == 1) ? 1 : 2;
- //get protocol mudule option string
+ //get protocol module option string
std::stringstream protocol_module_arg;
BOOST_FOREACH(std::string str, srv.protocol_args) {
protocol_module_arg << str << " ";
//set realserver size
int rs_size = srv.realserver_vector.size();
- //get http statstics
+ //get http statistics
protocol_module_base *protocol_module_ptr = (*it)->get_protocol_module();
stats_base& base_stats = protocol_module_ptr->get_stats();
if ( base_stats.get_mode() == stats_base::MODE_HTTP ) {
//set sorry max connection
sorry_maxconnection.low = srv.sorry_maxconnection;
- //set throughput infomation
+ //set throughput information
throughput_upstream.low = srv.throughput_upstream;
throughput_downstream.low = srv.throughput_downstream;
qos_upstream.low = srv.qos_upstream * 8;
qos_downstream.low = srv.qos_downstream * 8;
- //set session infomation
+ //set session information
pool_session_count = (*it)->get_pool_sessions_count();
active_session_count = (*it)->get_active_sessions_count();
waiting_session_count = (*it)->get_waiting_sessions_count();
- //set vs table row infomation
+ //set vs table row information
netsnmp_set_row_column(row, COLUMN_L7VSVSINDEX, ASN_INTEGER, (char *)&vs_index, sizeof(int));
netsnmp_set_row_column(row, COLUMN_L7VSVSPROTOCOL, ASN_INTEGER, (char *)&protocol, sizeof(int));
netsnmp_set_row_column(row, COLUMN_L7VSVSADDRTYPE, ASN_INTEGER, (char *)&vs_ipaddress_type, sizeof(int));
rsdata data;
- //set realserver infomation
+ //set realserver information
if (srv.udpmode) {
if ((*rs_it).udp_endpoint.address().is_v4()) {
strncpy(data.address, (*rs_it).udp_endpoint.address().to_v4().to_string().c_str(), L7VS_IPADDR_LEN);
}
/*------ DEBUG LOG END ------*/
- //update realserver infomation with temporary realserver data list
+ //update realserver information with temporary realserver data list
update_rs_table(rs_vector, err);
}
/*!
- * update real server table infomation.
+ * update real server table information.
*
* @param const std::vector<rsdata> & temporary real server list
* @param error_code & error code
/*!
* @file parameter.cpp
- * @brief ultramonke-l7 parameter class.
+ * @brief ultramonkey-l7 parameter class.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
switch (param_cat) {
case LOG_CAT_L7VSADM_PARAMETER:
Logger::putLogFatal(param_cat, 2,
- "param_cat=LOG_CAT_L7VSDADM_PARAMETER continue!",
+ "param_cat=LOG_CAT_L7VSADM_PARAMETER continue!",
__FILE__, __LINE__);
break;
default:
Logger::putLogFatal(param_cat, 3,
- "param_cat= not LOG_CAT_L7VSDADM_PARAMETER exit!",
+ "param_cat= not LOG_CAT_L7VSADM_PARAMETER exit!",
__FILE__, __LINE__);
exit(1);
}
//! @param[in] COMPONENT TAG
//! @param[in] file name
//! @return true success
-//! @return false failer
+//! @return false fail
bool l7vs::Parameter::init(const PARAMETER_COMPONENT_TAG comp,
const std::string &filename)
{
/*!
- * @file paramter_impl.cpp
- * @brief paramater impliment file.
+ * @file parameter_impl.cpp
+ * @brief parameter implement file.
*
* L7VSD: Linux Virtual Server for Layer7 Load Balancing
* Copyright (C) 2009 NTT COMWARE Corporation.
//
//! Initialize ParameterImpl class
//! @return true success
-//! @return false failer
+//! @return false fail
bool l7vs::ParameterImpl::init()
{
//! @param[in] COMPONENT TAG
//! @param[in] file name
//! @return true success
-//! @return false failer
+//! @return false fail
bool l7vs::ParameterImpl::init(const l7vs::PARAMETER_COMPONENT_TAG comp,
const std::string &file_name)
{
std::string section_string;
while (std::getline(ifs, line)) {
- // triming
+ // trimming
boost::algorithm::trim(line);
// zero line skip
if (line.size() == 0) continue;
// check same key
if (multistring_map.end() != multistring_map.find(key)) {
// Only SSL component can designate more than one value.
- // Other component overwrite tmp multimap
+ // Other component overwrite tmp multi map
- // get compornent tag from section_string
+ // get component tag from section_string
for (std::map<PARAMETER_COMPONENT_TAG, std::string>::iterator section_itr = tag_section_table_map.begin();
section_itr != tag_section_table_map.end();
++section_itr) {
}
}
}
- // tmp multimap insert
+ // tmp multi map insert
multistring_map.insert(string_pair_type(key, strvalue));
}
// insert int value
}
}
- //convert temporaly map to global map.
+ //convert temporally map to global map.
if (comp == PARAM_COMP_ALL) {
intMap.clear();
// all tmp int map copy
// comp error
else if (comp == PARAM_COMP_NOCAT) {
Logger::putLogError(logcat, 2,
- "parameter_component_none is not suport",
+ "parameter_component_none is not support",
__FILE__, __LINE__);
}
// TAG designation
/*!
* initialize class.
*
- * @param filepath
+ * @param file path
* @return void
*/
void
/*!
* load shared object.
*
- * @param modulename
- * @param loggingfunction
+ * @param module name
+ * @param logging function
* @return pointer for protocol_module_base class instance
*/
protocol_module_base*
/*!
* unload shared object.
*
- * @param modulename
+ * @param module name
* @param pointer for protocol_module_base class instance
* @return void
*/
namespace l7vs
{
-//! emun States Type string
+//! enum States Type string
static const char *replication_mode[] = {
"REPLICATION_OUT",
"REPLICATION_SINGLE",
mutex_ptr component_mutex;
replication_mutex.clear();
- // Conponent exists
- // Get Component infomation
+ // Component exists
+ // Get Component information
for (int i = 0; i < CMP_MAX; i++) {
key_id = boost::io::str(boost::format("cmponent_id_%02d") % i);
key_size = boost::io::str(boost::format("cmponent_size_%02d") % i);
// free memory
releaserpl();
releasecmp();
- Logger::putLogError(LOG_CAT_L7VSD_SYSTEM_MEMORY, 3, "Surface infomation memory is NULL.", __FILE__, __LINE__);
+ Logger::putLogError(LOG_CAT_L7VSD_SYSTEM_MEMORY, 3, "Surface information memory is NULL.", __FILE__, __LINE__);
// Status Set
replication_state.service_status = REPLICATION_SINGLE;
return -1;
replication_thread_ptr->join();
}
- // Socket finalaize
+ // Socket finalize
if (replication_send_socket.is_open()) {
replication_send_socket.close();
}
switch (replication_state.service_status) {
case REPLICATION_SLAVE:
case REPLICATION_SLAVE_STOP:
- // Set Mastre Mode
+ // Set Master Mode
ret = set_master();
if (0 != ret) {
replication_state.service_status = REPLICATION_SINGLE;
buf = boost::io::str(boost::format("Switch to master NG. mode : %s") % replication_mode[(int)replication_state.service_status]);
Logger::putLogError(LOG_CAT_L7VSD_REPLICATION, 11, buf, __FILE__, __LINE__);
} else {
- // Copy from compornent area to replication area.
+ // Copy from component area to replication area.
memcpy(replication_state.replication_memory, replication_state.component_memory, replication_state.total_block * DATA_SIZE);
if (REPLICATION_SLAVE == replication_state.service_status) {
}
}
- // Set Mastre Mode
+ // Set Master Mode
ret = set_slave();
if (0 != ret) {
replication_state.service_status = REPLICATION_SINGLE;
//! @param[in] component_id is the one to identify the component.
//! @param[out] size of component use blocks
//! @return Replication memory address
-//! @retval nonnull Replication memory address
+//! @retval non-null Replication memory address
//! @retval NULL Error
void *replication::pay_memory(const std::string &inid, unsigned int &outsize)
{
}
// Pay memory address
ret = (char *)replication_state.component_memory + replication_info.component_info[i].block_head * DATA_SIZE;
- // Nnumber of blocks of ID was returned.
+ // Number of blocks of ID was returned.
outsize = replication_info.component_info[i].block_size;
// LOG INFO
Logger::putLogInfo(LOG_CAT_L7VSD_REPLICATION, 16, "Replication Dump End ------------------------------", __FILE__, __LINE__);
}
-//! Chenge Status isActive
+//! Change Status isActive
void replication::start()
{
Logger logger(LOG_CAT_L7VSD_REPLICATION, 7, "replication::start", __FILE__, __LINE__);
}
}
-//! Chenge Status isStop
+//! Change Status isStop
void replication::stop()
{
Logger logger(LOG_CAT_L7VSD_REPLICATION, 8, "replication::stop", __FILE__, __LINE__);
Logger::putLogInfo(LOG_CAT_L7VSD_REPLICATION, 23, "Replication compulsorily is success.", __FILE__, __LINE__);
END:
- // Thread rusume
+ // Thread resume
{
boost::mutex::scoped_lock lock(replication_thread_mutex);
if (replication_flag != EXIT) {
}
//! Get Status
-//! @return REPLICATION_MODE_TAG enumration
+//! @return REPLICATION_MODE_TAG enumeration
replication::REPLICATION_MODE_TAG replication::get_status()
{
Logger logger(LOG_CAT_L7VSD_REPLICATION, 11, "replication::get_status", __FILE__, __LINE__);
// get time by clock_gettime
if (clock_gettime(CLOCK_REALTIME, ¤t_time) == -1) {
- // failre.
+ // failure.
Logger::putLogError(LOG_CAT_L7VSD_SYSTEM, 7, "You failed to get of time.", __FILE__, __LINE__);
serial_num = 0;
} else {
break;
}
if (i == replication_state.total_block - 2) {
- // Lock all compornent area
+ // Lock all component area
for (itr = replication_mutex.begin(); itr != replication_mutex.end(); itr++) {
itr->second->lock();
}
// Synchronization is executed.
memcpy(replication_state.component_memory, replication_state.replication_memory, replication_state.total_block * DATA_SIZE);
- // Unlock all compornent area
+ // Unlock all component area
for (itr = replication_mutex.begin(); itr != replication_mutex.end(); itr++) {
itr->second->unlock();
}
/*!
* initialize class.
*
- * @param filepath
+ * @param file path
* @return void
*/
void
/*!
* load shared object.
*
- * @param modulename
- * @param loggingfunction
+ * @param module name
+ * @param logging function
* @return pointer for schedule_module_base class instance
*/
schedule_module_base*
/*!
* unload shared object.
*
- * @param modulename
+ * @param module name
* @param pointer for schedule_module_base class instance
* @return void
*/
upthread_running_mutex.unlock();
upthread_condition.timed_wait(lock, wait); // thread is condition wait( start at notify_all() )
upthread_running_mutex.lock();
- } else if (state == EXIT) { // this state is vitrualservice end. thread is finishing.
+ } else if (state == EXIT) { // this state is virtualservice end. thread is finishing.
break;
} else { //state RUNNING
session->up_thread_run(); //session upstream thread looping.
downthread_running_mutex.unlock();
downthread_condition.timed_wait(lock, wait); // thread is condition wait( start at notify_all() )
downthread_running_mutex.lock();
- } else if (state == EXIT) { // this state is vitrualservice end. thread is finishing.
+ } else if (state == EXIT) { // this state is virtualservice end. thread is finishing.
break;
} else { //state RUNNING
session->down_thread_run();//session downstream thread looping.
}
/*!
- * get snmp infomation.
+ * get snmp information.
*
- * @return snmp infomation
+ * @return snmp information
*/
snmp_info snmpagent::get_snmp_info()
{
trapfunc_map[trapmessage::INFO_LOG] = &trap_info;
trapfunc_map[trapmessage::DEBUG_LOG] = &trap_debug;
- //init member varable
+ //init member variables
mib_collect_last_time = boost::posix_time::ptime(boost::posix_time::min_date_time);
start_date = 0;
request_last_date = 0;
init_snmp("l7vsAgent");
- //regist snmp get item' handle
+ //register snmp get item' handle
init_snmp_handles(err);
if (err) {
return;
}
- //set initializ flag true
+ //set initialize flag true
initialized = true;
/*-------- DEBUG LOG --------*/
{
boost::mutex::scoped_lock lock(trap_msg_queue_condition_mutex);
- //drap the message when the trap message queue is too large
+ //drop the message when the trap message queue is too large
if( trap_msg_queue.size() < trap_queue_max_size.get())
{
//push the message into trap message queue
enabled = FALSE;
if (!start_flag) {
- std::string str = "snmp function has already stoped.";
+ std::string str = "snmp function has already stopped.";
Logger::putLogInfo(LOG_CAT_L7VSD_SNMPAGENT, 2, str, __FILE__, __LINE__);
return;
}
stop();
}
else {
- std::string str = "snmp function has already stoped.";
+ std::string str = "snmp function has already stopped.";
Logger::putLogInfo(LOG_CAT_L7VSD_SNMPAGENT, 5, str, __FILE__, __LINE__);
}
}
/*------ DEBUG LOG END ------*/
http_stats &httpstats = static_cast<http_stats&>(base_stats);
- //clear http statstics
+ //clear http statistics
httpstats.http_requests = 0ULL;
httpstats.http_get_requests = 0ULL;
httpstats.http_post_requests = 0ULL;
}
/*!
- * set vsd infomation.
+ * set vsd information.
*
* @param[in] vsd is vsd pointer.
* @retrun void
}
/*!
- * get snmp infomation.
+ * get snmp information.
*
- * @retrun snmp_info is snmp infomation.
+ * @retrun snmp_info is snmp information.
*/
snmp_info snmpagent_impl::get_snmp_info()
{
/*!
- * initialize snmp scaler and table data set handles.
+ * initialize snmp scalar and table data set handles.
*
* @param[in] error_code& is trap error code
* @retrun void
return SNMP_ERR_GENERR;
}
- //get virtual serveice size
+ //get virtual service size
int rep_state = l7vs::mibdata::get_instance().get_vs_table_size();
//set value
/*!
* default constructor.
- * initialize member valiables
+ * initialize member variables
* @param void
* @return void
*/
}
/*!
- * increase reffernce count
+ * increase reference count
* @param void
* @return void
*/
}
/*!
- * decrease reffernce count
+ * decrease reference count
* @param void
* @return void
*/
/*!
* rolling policy initialize
* @param filename of current use
- * @param append or overWrite
+ * @param append or overwrite
* @param memory pool
* @return Rollover information
*/
}
/*!
- * log file rollover opration
+ * log file rollover operation
* @param name of current log file
* @param memory pool
- * @return Rollover infomation
+ * @return Rollover information
*/
RolloverDescriptionPtr StrictTimeBasedRollingPolicy::rollover(
const LogString ¤tActiveFile,
namespace l7vs
{
-//! construcor
+//! constructor
tcp_realserver_connect_socket_list::tcp_realserver_connect_socket_list()
{
}
add_down_thread_vs_message_func.second = boost::bind(&tcp_session::down_thread_exit, this, _1);
virtual_service_message_down_thread_function_map.insert(add_down_thread_vs_message_func);
- // epoll impliment
+ // epoll implement
up_client_epollfd = epoll_create(EVENT_NUM);
up_realserver_epollfd = epoll_create(EVENT_NUM);
up_sorryserver_epollfd = epoll_create(EVENT_NUM);
}
}
if (likely(!exit_flag)) {
- // set client socket options(recieve buffer size)
+ // set client socket options(receive buffer size)
if (upstream_buffer_size > 0) {
boost::asio::socket_base::receive_buffer_size opt(upstream_buffer_size);
// cannot set socket option
std::stringstream buf;
buf << "Thread ID[" << boost::this_thread::get_id() << "] ";
- buf << "cannot set client socket recieve buffer size: ";
+ buf << "cannot set client socket receive buffer size: ";
buf << ec.message();
Logger::putLogError(LOG_CAT_L7VSD_SESSION, 12, buf.str(), __FILE__, __LINE__);
{
}
-//! endpoint data to string infomation
+//! endpoint data to string information
//! @param[in] endpoint is target endpoint object
std::string tcp_session::endpoint_to_string(
const endpoint &target_endpoint)
}
//! up thread accept client side
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_accept(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
} else {
if (ssl_handshake_timer_flag == false) {
// set handshake timer
- //regist handshake timer event handler
+ //register handshake timer event handler
ssl_handshake_timer.reset(new boost::asio::deadline_timer(io));
ssl_handshake_timer->expires_from_now(boost::posix_time::seconds(ssl_handshake_time_out));
ssl_handshake_timer->async_wait(boost::bind(&tcp_session::handle_ssl_handshake_timer,
}
//! up thread raise module event of handle_accept and do handshake
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_accept_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! up thread receive client side and raise module event of handle_client_recv
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_receive(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
event.data.fd = !ssl_flag ? client_socket.get_socket().native()
: client_ssl_socket.get_socket().lowest_layer().native();
- // epoll wailt codes
+ // epoll wait codes
if (is_epoll_edge_trigger) {
event.events = EPOLLIN | EPOLLHUP | EPOLLET;
} else {
if (recv_size > 0) {
//----Debug log----------------------------------------------------------------------
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
- endpoint client_endpoint; // XXX redifined???
+ endpoint client_endpoint; // XXX redefined???
client_endpoint = !ssl_flag ? client_socket.get_socket().lowest_layer().remote_endpoint(ec)
: client_ssl_socket.get_socket().lowest_layer().remote_endpoint(ec);
boost::format formatter("Thread ID[%d] up_thread_client_receive receive data size[%d] from [%d]");
std::map<protocol_module_base::EVENT_TAG, UP_THREAD_FUNC_TYPE_TAG>::iterator func_type = up_thread_module_event_map.find(module_event);
if (unlikely(func_type == up_thread_module_event_map.end())) {
//Error unknown protocol_module_base::EVENT_TAG return
- boost::format formatter("Thread ID[%d] protocol_module returnd illegal EVENT_TAG: %d");
+ boost::format formatter("Thread ID[%d] protocol_module returned illegal EVENT_TAG: %d");
formatter % boost::this_thread::get_id() % module_event;
Logger::putLogError(LOG_CAT_L7VSD_SESSION, 20, formatter.str(), __FILE__, __LINE__);
up_thread_exit(process_type);
}
}
//! up thread raise client respond send event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_respond(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread raise module event of handle_response_send_inform
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_respond_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread close client socket and raise client disconnect event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
while (!down_thread_message_que.push(down_msg)) {}
}
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
- boost::format formatter("Thread ID[%d] FUNC_OUT up_thread_client_disconnect up_func[%s] donw_func[%s]");
+ boost::format formatter("Thread ID[%d] FUNC_OUT up_thread_client_disconnect up_func[%s] down_func[%s]");
formatter % boost::this_thread::get_id()
% func_tag_to_string(UP_FUNC_CLIENT_DISCONNECT_EVENT)
% func_tag_to_string(DOWN_FUNC_CLIENT_DISCONNECT_EVENT);
}
}
//! up thread raise module event of handle_client_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_client_disconnect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread send realserver and raise module event of handle_client_recv
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_send(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! up thread raise module event of handle_realserver_select
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_get_destination_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread connect realserver
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_connect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
parent_service.connection_active(server_endpoint);
if (unlikely(!new_socket->set_non_blocking_mode(ec))) {
- // socket set nonblocking mode error
+ // socket set non-blocking mode error
std::stringstream buf;
buf << "Thread ID[" << boost::this_thread::get_id() << "] ";
buf << "set non blocking socket error: " << ec.message();
return;
}
- //set realserver_socket options(recieve buffer size)
+ //set realserver_socket options(receive buffer size)
if (downstream_buffer_size > 0) {
boost::asio::socket_base::receive_buffer_size opt1(downstream_buffer_size);
new_socket->get_socket().set_option(opt1, ec);
if (unlikely(ec)) {
- // socket set nonblocking mode error
+ // socket set non-blocking mode error
std::stringstream buf;
buf << "Thread ID[" << boost::this_thread::get_id() << "] ";
- buf << "realserver socket recieve buffer size error: " << ec.message();
+ buf << "realserver socket receive buffer size error: " << ec.message();
Logger::putLogError(LOG_CAT_L7VSD_SESSION, 35, buf.str(), __FILE__, __LINE__);
up_thread_exit(process_type);
return;
boost::asio::socket_base::send_buffer_size opt2(upstream_buffer_size);
new_socket->get_socket().set_option(opt2, ec);
if (unlikely(ec)) {
- // socket set nonblocking mode error
+ // socket set non-blocking mode error
std::stringstream buf;
buf << "Thread ID[" << boost::this_thread::get_id() << "] ";
buf << "realserver socket send buffer size error: " << ec.message();
}
}
//! up thread raise module event of handle_realserver_connect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_connect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread raise module event of handle_realserver_connection_fail
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_connection_fail_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread close realserver socket and raise realserver disconnect event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread raise module event of handle_client_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_realserver_disconnect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! up thread close all realserver socket and raise module event of handle_realserver_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_all_realserver_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread send sorryserver and raise module event of handle_sorryserver_send
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_send(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
//Error unknown protocol_module_base::EVENT_TAG return
std::stringstream buf;
buf << "Thread ID[" << boost::this_thread::get_id() << "] ";
- buf << "protocol_module returnd illegal EVENT_TAG: " << module_event;
+ buf << "protocol_module returned illegal EVENT_TAG: " << module_event;
Logger::putLogError(LOG_CAT_L7VSD_SESSION, 49, buf.str(), __FILE__, __LINE__);
up_thread_exit(process_type);
return;
}
}
//! up thread raise module event of handle_sorryserver_select
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_get_destination_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread connect sorryserver
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_connect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
bool bres = sorryserver_socket.second->connect(sorry_endpoint, ec);
if (likely(bres)) {
if (unlikely(!sorryserver_socket.second->set_non_blocking_mode(ec))) {
- // socket set nonblocking mode error
+ // socket set non-blocking mode error
std::stringstream buf;
buf << "Thread ID[" << boost::this_thread::get_id() << "] ";
buf << "set non blocking socket error: " << ec.message();
}
}
//! up thread raise module event of handle_sorryserver_connect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_connect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread raise module event of handle_sorryserver_connection_fail
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_connection_fail_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread close sorryserver socket and raise sorryserver disconnect event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread close sorryserver socket and raise module sorryserver disconnect event
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_mod_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! up thread raise module event of handle_sorryserver_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorryserver_disconnect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread raise module event of handle_sorry_enable
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorry_enable_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! up thread raise module event of handle_sorry_disable
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_sorry_disable_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! up thread exit main loop
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::up_thread_exit(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! down thread receive from realserver and raise module event of handle_realserver_recv
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_realserver_receive(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread close realserver socket and raise realserver disconnect event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_realserver_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! down thread raise module event of handle_realserver_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_realserver_disconnect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread close realserver socket and raise realserver disconnect event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_all_realserver_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread raise module event of handle_client_connection_check
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_client_connection_chk_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! down thread raise module event of handle_response_send_inform
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_client_respond_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread send for client and raise module event of handle_client_send
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_client_send(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
parent_service.update_down_send_size(send_size);
//----Debug log----------------------------------------------------------------------
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
- endpoint client_endpoint // XXX redifined???
+ endpoint client_endpoint // XXX redefined???
= !ssl_flag ? client_socket.get_socket().lowest_layer().remote_endpoint(ec)
: client_ssl_socket.get_socket().lowest_layer().remote_endpoint(ec);
boost::format formatter("Thread ID[%d] down_thread_client_send send data size[%d] for [%d]");
}
}
//! down thread close client socket and raise client disconnect event message for up and down thread
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_client_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! down thread raise module event of handle_client_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_client_disconnect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread receive from sorryserver and raise module event of handle_sorryserver_recv
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_sorryserver_receive(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread raise module event of handle_sorryserver_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_sorryserver_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread close sorryserver socket and raise module sorryserver disconnect event
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_sorryserver_mod_disconnect(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread raise module event of handle_sorryserver_disconnect
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_sorryserver_disconnect_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread raise module event of handle_sorry_enable
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_sorry_enable_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread raise module event of handle_sorry_disable
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_sorry_disable_event(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
}
//! down thread exit main loop
-//! @param[in] process_type is prosecess type
+//! @param[in] process_type is process type
void tcp_session::down_thread_exit(const TCP_PROCESS_TYPE_TAG process_type)
{
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) {
}
//! write socket
-//! @param[in] buffers is wite data buffer
+//! @param[in] buffers is write data buffer
//! @param[out] ec is reference error code object
//! @return write data size
std::size_t tcp_socket::write_some(
//! handshake socket
//! @param[in] handshake_type is handshaking as a server or client
-//! @return true is handshaked
+//! @return true is handshake success
//! @return false is handshake failure
bool tcp_ssl_socket::handshake(boost::system::error_code &ec)
{
}
//! write socket
-//! @param[in] buffers is wite data buffer
+//! @param[in] buffers is write data buffer
//! @param[out] ec is reference error code object
//! @return write data size
std::size_t tcp_ssl_socket::write_some(
/*!
* default constructor.
- * initialize member valiables
+ * initialize member variables
* @param void
* @return void
*/
#define BPS_DEFAULT_INTERVAL_USEC 500000ULL
-// imprementation for virtualservice_base
+// implementation for virtualservice_base
/*!
* virtualservice_base class constructor.
*/
Parameter param;
int int_val;
std::string str_val;
- //get realserver_side networkI/F card name
+ //get realserver_side network I/F card name
str_val = param.get_string(l7vs::PARAM_COMP_VIRTUALSERVICE, PARAM_RS_SIDE_NIC_NAME, vs_err);
if (!vs_err) {
param_data.nic_realserver_side = str_val;
#include "utility.h"
#include "logger_access_manager.h"
-// imprementation for virtualservice_tcp
+// implementation for virtualservice_tcp
/*!
* virtualservice_tcp class constructor.
*/
return;
}
- //check maxdatasize
+ //check max data size
if ((rep_size * DATA_SIZE) <
((sizeof(replication_data) * MAX_REPLICATION_DATA_NUM) + sizeof(replication_header))) {
Logger::putLogWarn(LOG_CAT_L7VSD_VIRTUALSERVICE, 2, REP_AREA_SIZE_ERR_MSG,
return;
}
- //check maxdatasize
+ //check max data size
if ((rep_size * DATA_SIZE) <
((sizeof(replication_data) * MAX_REPLICATION_DATA_NUM) + sizeof(replication_header))) {
Logger::putLogWarn(LOG_CAT_L7VSD_VIRTUALSERVICE, 4, REP_AREA_SIZE_ERR_MSG,
//find vs(loop)
for (unsigned int i = 0; i < loop_cnt; ++i) {
- //get tcp endpointdata
+ //get tcp endpoint data
std::string tmpstr = rep_data_ptr->tcp_endpoint;
std::string ipaddr;
unsigned short portno;
Logger::putLogDebug(LOG_CAT_L7VSD_VIRTUALSERVICE, 38, fmt4.str(), __FILE__, __LINE__);
}
- //regist accept event handler
+ //register accept event handler
if (!ssl_virtualservice_mode_flag) {
acceptor_.async_accept(stc_ptr_register_accept->get_session()->get_client_socket(),
boost::bind(&virtualservice_tcp::handle_accept, this, stc_ptr_register_accept,
/*!
* initialize virtualservice(TCP)
*
- * @param erro_code
+ * @param error_code
* @return void
*/
void l7vs::virtualservice_tcp::initialize(l7vs::error_code &err)
access_log_flag = true;
}
- // access log rotation infomation set.
+ // access log rotation information set.
if (element.access_log_rotate_key_info == "") {
element.access_log_rotate_key_info = "none";
element.access_log_rotate_verbose_info = logger_access_manager::getInstance().get_rotate_default_verbose_displayed_contents();
/*!
* finalize virtualservice(TCP)
*
- * @param erro_code
+ * @param error_code
* @return void
*/
void l7vs::virtualservice_tcp::finalize(l7vs::error_code &err)
delete stc;
stc = NULL;
if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_VIRTUALSERVICE))) {
- boost::format fmt("join pool sessin: pool_sessions.size = %d");
+ boost::format fmt("join pool session: pool_sessions.size = %d");
fmt % pool_sessions.size();
Logger::putLogDebug(LOG_CAT_L7VSD_VIRTUALSERVICE, 55, fmt.str(),
__FILE__, __LINE__);
replication_status = false;
}
- //check maxdatasize
+ //check max data size
if ((rep_size * DATA_SIZE) <
((sizeof(replication_data) * MAX_REPLICATION_DATA_NUM) + sizeof(replication_header))) {
err.setter(true, REP_AREA_SIZE_ERR_MSG);
}
/*!
- * add VirtualService( not-imprement )
+ * add VirtualService( not-implement )
*
* @param virtualservice_element
* @param err
return;
}
- //if change ScueduleModule Name, unload old ScheduleModule and load new ScheduleModule
+ //if change ScheduleModule Name, unload old ScheduleModule and load new ScheduleModule
if ((element.schedule_module_name != elem.schedule_module_name) && ("" != elem.schedule_module_name)) {
schedule_module_control::getInstance().unload_module(schedmod);
schedmod = schedule_module_control::getInstance().load_module(elem.schedule_module_name);
if (!stc_ptr) {
return;
}
- //regist accept event handler
+ //register accept event handler
waiting_sessions.insert(stc_ptr->get_session().get(), stc_ptr);
}
if (!ssl_virtualservice_mode_flag) {
boost::bind(&virtualservice_tcp::handle_accept, this, stc_ptr,
boost::asio::placeholders::error));
}
- //regist timer event handler
+ //register timer event handler
calc_bps_timer->expires_from_now(boost::posix_time::milliseconds(param_data.bps_interval));
calc_bps_timer->async_wait(boost::bind(&virtualservice_tcp::handle_throughput_update,
this, boost::asio::placeholders::error));
}
//!
-//! Convert verify option string to intger(#define).
+//! Convert verify option string to integer(#define).
//!
//! @param[in] opt_string option string
//! @retval ret option value
}
//!
-// Convert SSL option string to intger(#define).
+// Convert SSL option string to integer(#define).
//
// @param[in] opt_string option string
// @retval ret option value
#include "virtualservice.h"
-// imprementation for virtualservice_udp
+// implementation for virtualservice_udp
/*!
* virtualservice_udp class constructor.
*/
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
then
LOG_ERR "Cannot move ${L7DIRECTORD_CONF_DIR}/* files."
else
- LOG "${L7DIRECTORD_CONF_DIR}/* files were moved to ${TMP_DIR}/l7direcotr directory."
+ LOG "${L7DIRECTORD_CONF_DIR}/* files were moved to ${TMP_DIR}/l7director directory."
fi
if [ -n ${L7VS_LOG_DIR} -a ${L7VS_LOG_DIR} != "/" ]
fi
}
-# check Lighty installed
+# check lighttpd installed
check_http_server (){
LIGHTTPD=`which lighttpd`
if [ $? -ne 0 ]
#!/bin/bash
-#Collect configfiles and logfiles.
+#Collect config files and log files.
LOG "collect_file start."
if [ -n ${L7VSD_CONF_DIR} -a ${L7VSD_CONF_DIR} != "/" ]
fi
}
-#make lighhtpd_configfile
+#make lighttpd_configfile
start_lighttpd (){
#Set default value
template_file=${DEFAULT_CONF_DIR}/default.conf
#!/bin/bash
. ${SET_DEFAULT_CONF}
-# Set l7directorc config file
+# Set l7directord config file
echo "virtual=127.0.0.1:50000
virtual=127.0.0.1:50001
module=ip
fi
sleep 5
-# Edit l7directorc config file
+# Edit l7director config file
echo "virtual=127.0.0.1:50000
virtual=127.0.0.1:50001
module=ip
#!/bin/bash
. ${SET_DEFAULT_CONF}
-# Set l7directorc config file
+# Set l7director config file
echo "virtual=127.0.0.1:50000" > ${L7DIRECTORD_CONF_DIR}/l7directord.cf
# Start l7vsd
callback = XXX
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
callback = XXX
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
callback = XXX
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:50000
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checktimeout = 0
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checktimeout = 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checktimeout = -1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# checktimeout = 5
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checkport=0
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checkport=1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checkport=-1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checkport=65535
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
checkport=65536
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
protocol=tcp
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
protocol=udp
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
protocol=icmp
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
protocol=0
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
protocol=1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
protocol=aaa
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
fallback = 127.0.0.1:50001
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
fallback = localhost:http
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
fallback = aaa
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
quiescent = yes
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
quiescent = no
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
quiescent = 0
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
quiescent = 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
quiescent = aaa
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
sorryserver = 127.0.0.1:50001
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
sorryserver = localhost:http
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
sorryserver = aaa
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
autoreload = no
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
real = 127.0.0.1:50001
autoreload = no
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
real = 127.0.0.1:50001
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = 127.0.0.1:40001
# real = 192.168.0.51:80 masq 1
callback = XXX
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
execute = XXX
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual = XXX
# real = 192.168.0.51:80 masq 1
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:40001
real=127.0.0.1:50001
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
virtual=127.0.0.1:10000
real=127.0.0.1:10001
#callback = /opt/config_change.sh
# = VIRTUAL DIRECTIVES
-# - A sample virual section with a sorry server.
+# - A sample virtual section with a sorry server.
# - checkcount and quiescent settings are override the global settings.
#virtual = 192.168.0.50:80
# real = 192.168.0.51:80 masq 1
Options:
--tcp-service -t service-address service-address is host:port
- --proto-module -m proto-module protocol module name and module argment
+ --proto-module -m proto-module protocol module name and module argument
[module-args]
--scheduler -s scheduler one of rr,lc,wrr
--upper -u connection-count maximum number of connections
--bypass -b sorry-server sorry server address is host:port
--tproxy -T set sorry server connection to IP transparent mode.
- --masq -M set sorry server connection to IP masquarade mode.
+ --masq -M set sorry server connection to IP masquerade mode.
--flag -f sorry-flag sorry status set to virtual service
--qos-up -Q QoSval-up QoS Threshold(bps) set to real server direction
--qos-down -q QoSval-down QoS Threshold(bps) set to client direction
--real-server -r server-address server-address is host:port
--weight -w weight scheduling weight set to real server
--tproxy -T set real server connection to IP transparent mode.
- --masq -M set real server connection to IP masquarade mode.
+ --masq -M set real server connection to IP masquerade mode.
--switch -s replication-switch start or stop replication
--force -f force replication start
--dump -d dump replication memory
Options:
--tcp-service -t service-address service-address is host:port
- --proto-module -m proto-module protocol module name and module argment
+ --proto-module -m proto-module protocol module name and module argument
[module-args]
--scheduler -s scheduler one of rr,lc,wrr
--upper -u connection-count maximum number of connections
--bypass -b sorry-server sorry server address is host:port
--tproxy -T set sorry server connection to IP transparent mode.
- --masq -M set sorry server connection to IP masquarade mode.
+ --masq -M set sorry server connection to IP masquerade mode.
--flag -f sorry-flag sorry status set to virtual service
--qos-up -Q QoSval-up QoS Threshold(bps) set to real server direction
--qos-down -q QoSval-down QoS Threshold(bps) set to client direction
--real-server -r server-address server-address is host:port
--weight -w weight scheduling weight set to real server
--tproxy -T set real server connection to IP transparent mode.
- --masq -M set real server connection to IP masquarade mode.
+ --masq -M set real server connection to IP masquerade mode.
--switch -s replication-switch start or stop replication
--force -f force replication start
--dump -d dump replication memory
kill -SIGUSR1 `pgrep l7vsd`
if [ $? -ne 0 ]
then
- echo "Test failed: kill -SIGUSER1"
+ echo "Test failed: kill -SIGUSR1"
exit 1
fi
usleep 100000
kill -SIGUSR2 `pgrep l7vsd`
if [ $? -ne 0 ]
then
- echo "Test failed: kill -SIGUSER2"
+ echo "Test failed: kill -SIGUSR2"
exit 1
fi
usleep 100000
# set config file
cp materials/logger-121-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log.1 bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log.2 bs=1024 count=63
# set config file
cp materials/logger-142-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log.1 bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log.2 bs=1024 count=63
# set config file
cp materials/logger-159-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log.1 bs=1024 count=63
# set config file
cp materials/logger-42-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=63
#Add Service
# set config file
cp materials/logger-43-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=63
#Add Service
# set config file
cp materials/logger-44-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=1023
#Add Service
# set config file
cp materials/logger-45-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=1048575
#Add Service
# set config file
cp materials/logger-46-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log bs=1024 count=63
#Add Service
# set config file
cp materials/logger-47-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log bs=1024 count=63
#Add Service
# set config file
cp materials/logger-48-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log bs=1024 count=1023
#Add Service
# set config file
cp materials/logger-49-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log bs=1024 count=1048575
#Add Service
# set config file
cp materials/logger-50-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log bs=1024 count=63
#Run http server
# set config file
cp materials/logger-51-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log bs=1024 count=63
#Run http server
# set config file
cp materials/logger-52-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log bs=1024 count=1023
#Run http server
# set config file
cp materials/logger-53-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log bs=1024 count=1048575
#Run http server
sed "s|l7vsd_rotation_timing_value = \"XXX\"|l7vsd_rotation_timing_value = \"$PARM\"|" materials/logger-54-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsd.log
#Add Service
sed "s|l7vsd_rotation_timing_value = \"XXX\"|l7vsd_rotation_timing_value = \"$PARM\"|" materials/logger-55-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsd.log
#Add Service
sed "s|l7vsd_rotation_timing_value = \"XXX\"|l7vsd_rotation_timing_value = \"$PARM\"|" materials/logger-56-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsd.log
#Add Service
sed "s|l7vsd_rotation_timing_value = \"XXX\"|l7vsd_rotation_timing_value = \"$PARM\"|" materials/logger-57-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsd.log
#Add Service
sed "s|l7vsd_rotation_timing_value = \"XXX\"|l7vsd_rotation_timing_value = \"$PARM\"|" materials/logger-58-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsd.log
#Add Service
sed "s|l7vsadm_rotation_timing_value = \"XXX\"|l7vsadm_rotation_timing_value = \"$PARM\"|" materials/logger-59-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsadm.log
#Add Service
sed "s|l7vsadm_rotation_timing_value = \"XXX\"|l7vsadm_rotation_timing_value = \"$PARM\"|" materials/logger-60-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsadm.log
#Add Service
sed "s|l7vsadm_rotation_timing_value = \"XXX\"|l7vsadm_rotation_timing_value = \"$PARM\"|" materials/logger-61-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsadm.log
#Add Service
sed "s|l7vsadm_rotation_timing_value = \"XXX\"|l7vsadm_rotation_timing_value = \"$PARM\"|" materials/logger-62-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsadm.log
#Add Service
sed "s|l7vsadm_rotation_timing_value = \"XXX\"|l7vsadm_rotation_timing_value = \"$PARM\"|" materials/logger-63-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vsadm.log
#Add Service
# set config file
. ${SET_DEFAULT_CONF}
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vs-access.log
#Run http server
# set config file
. ${SET_DEFAULT_CONF}
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vs-access.log
#Run http server
# set config file
. ${SET_DEFAULT_CONF}
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vs-access.log
#Run http server
# set config file
. ${SET_DEFAULT_CONF}
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vs-access.log
#Run http server
# set config file
. ${SET_DEFAULT_CONF}
-# set dumy log file
+# set dummy log file
touch ${L7VS_LOG_DIR}/l7vs-access.log
#Run http server
sed "s|l7vsd_rotation_timing_value = \"XXX\"|l7vsd_rotation_timing_value = \"$PARM\"|" materials/logger-69-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=63
#Add Service
sed "s|l7vsadm_rotation_timing_value = \"XXX\"|l7vsadm_rotation_timing_value = \"$PARM\"|" materials/logger-70-l7vs.cf > ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsadm.log bs=1024 count=63
#Add Service
# set config file
. ${SET_DEFAULT_CONF}
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vs-access.log bs=1024 count=63
#Run http server
# set config file
cp materials/logger-99-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
-# set dumy log file
+# set dummy log file
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log.1 bs=1024 count=63
dd if=/dev/zero of=${L7VS_LOG_DIR}/l7vsd.log.2 bs=1024 count=63
EXPECT="1 50"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede,rtprio"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched,rtprio"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="TS 0"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched"
exit 1
fi
EXPECT="1 50"
if [ "${RET}" != "${EXPECT}" ]
then
- echo "Test failed: ps -p ${PID} -o pid,user,args,class,schede,rtprio"
+ echo "Test failed: ps -p ${PID} -o pid,user,args,class,sched,rtprio"
exit 1
fi
$L7VSADM -A -t 127.0.0.1:40001 -m ip --timeout 10
if [ $? -ne 0 ]
then
- echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip --timout 10"
+ echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip --timeout 10"
exit 1
fi
$L7VSADM -A -t 127.0.0.1:40001 -m ip --timeout 10
if [ $? -ne 0 ]
then
- echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip --timout 10"
+ echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip --timeout 10"
exit 1
fi
exit 1
fi
-#Add IPaliasing
+#Add IP aliasing
ifconfig lo:0 add ::2
ifconfig lo:1 add ::3
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
ifconfig lo:0 del ::2
ifconfig lo:1 del ::3
fi
-#Coneect
+#Connect
RET=`LANG=C $WGET -t 1 -O- http://127.0.0.1:40001/ 2>&1`
if [ $? -eq 0 ]
then
exit 1
fi
-#Coneect
+#Connect
RET=`LANG=C $WGET -t 1 -O- http://127.0.0.1:40001/ 2>&1`
if [ $? -eq 0 ]
then
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
exit 0
exit 1
fi
-#Del IPaliasing
+#Del IP aliasing
stop_lighttpd $RealServer1
stop_lighttpd $RealServer2
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
RET=`wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --no-check-certificate`
if [ $? -eq 0 ]
then
- echo "Test failed: wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --no-check-certificat"
+ echo "Test failed: wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --no-check-certificate"
exit 1
fi
if [ -n "${RET}" ]
then
- echo "Test failed: wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --certificate=newcert.pem --private-key=newkey.pem --no-check-certificat"
+ echo "Test failed: wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --certificate=newcert.pem --private-key=newkey.pem --no-check-certificate"
exit 1
fi
-#!/bin/bashgg
+#!/bin/bash
# set config file
. ${SET_DEFAULT_CONF}
if [ -n "${RET}" ]
then
- echo "Test failed: wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --certificate=newcert.pem --private-key=newkey.pem --secure-protocol=SSLv2 --no-check-certificat"
+ echo "Test failed: wget -qO- -t 1 -T 1 https://127.0.0.1:40001/ --certificate=newcert.pem --private-key=newkey.pem --secure-protocol=SSLv2 --no-check-certificate"
exit 1
fi
# Functions
usage (){
- echo "usage : umtest [DIR|TESTSCRIPT]"
+ echo "usage : $0 [DIR|TEST-SCRIPT]"
}
check_option (){
%define hb2_tempdir /usr/share/doc/%{name}-%{version}-%{release}/heartbeat-ra
%description
-Layer-7 load balancer daemon
+Layer-7 load balancing daemon
%prep
%setup -q