📄 stonithd_msg.h
字号:
/* File: stonithd_msg.h * Description: Head file which define message related used in stonithd and * its client library. * * Author: Sun Jiang Dong <sunjd@cn.ibm.com> * Copyright (c) 2004 International Business Machines * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef _STONITHD_MSG_H_#define _STONITHD_MSG_H_#define STONITHD_SOCK VAR_LIB_D "/stonithd"/* define the field name for messages stonithd used */#define F_STONITHD_TYPE "stonithd"#define F_STONITHD_APIREQ "apireq" /* api request */#define F_STONITHD_APIRPL "apirpl" /* api reply */#define F_STONITHD_APIRET "apiret" /* api reply */#define F_STONITHD_CNAME "cname" /* client name */#define F_STONITHD_CPID "cpid" /* client pid */#define F_STONITHD_CEUID "ceuid" /* client executing uid */#define F_STONITHD_CEGID "cegid" /* client executing gid */#define F_STONITHD_OPTYPE "optype" /* stonith op type */#define F_STONITHD_NODE "node" /* the name of node which is rquired to stonith */#define F_STONITHD_TIMEOUT "timeout" /* the timeout of a stonith operation */#define F_STONITHD_RSCID "rscid" /* stonith resource id */#define F_STONITHD_RANAME "raname" /* stonith RA name */#define F_STONITHD_RAOPTYPE "raoptype" /* stonith RA op type */#define F_STONITHD_PARAMS "params" /* parameters for stonith RA */#define F_STONITHD_CALLID "callid" /* RA executing call_id==pid */#define F_STONITHD_STTYPES "sttypes" /* stonith device types */#define F_STONITHD_FRC "frc" /* final return code */#define F_STONITHD_APPEND "append" /* append data for final return *//* Maximum length for stonithd message type */#define MAXLEN_SMTYPE 18/* define the message type (F_STONITHD_TYPE) value used by stonithd */#define ST_APIREQ "apireq"#define ST_APIRPL "apirpl"/* define the message type (F_STONITHD_APIREQ) value used by stonithd */#define ST_SIGNON "signon"#define ST_SIGNOFF "signoff"#define ST_STONITH "stonith"#define ST_RAOP "raop" /* stonith resource agent operation */#define ST_LTYPES "ltypes" /* List the stonith device types *//* define the message type (F_STONITHD_APIRPL) value used by stonithd */#define ST_RSIGNON "rsignon"#define ST_RSIGNOFF "rsignoff"#define ST_RSTONITH "rstonith" /* stonith ops sync result */#define ST_STRET "stret" /* stonith ops final result */#define ST_RRAOP "rraop" /* stonithRA ops sync result */#define ST_RAOPRET "raopret" /* stonithRA ops final result */#define ST_RLTYPES "rltypes" /* return the stonith device types *//* define the message type (F_STONITHD_APIRET) value used by stonithd */#define ST_APIOK "apiok"#define ST_APIFAIL "apifail" /* Generic error */#define ST_BADREQ "badreq"#define ZAPMSG(m) { ha_msg_del(m); (m) = NULL; }#define ZAPCHAN(ch) { \ if ( (ch) != NULL ) { \ (ch)->ops->destroy(ch); \ } \ (ch) = NULL; \ } /* free the object allocated by g_new, g_strdup and etc. */#define ZAPGDOBJ(m) \ if ( (m) != NULL ) { \ g_free(m); \ (m) = NULL; \ }/* Some message handle funtions used internally */int ha_msg_addhash(struct ha_msg * msg, const char * name, GHashTable * htable);struct ha_msg * hashtable_to_hamsg(GHashTable * htable);void insert_data_pairs(gpointer key, gpointer value, gpointer user_data);GHashTable * cl_get_hashtable(const struct ha_msg *request, const char * name);void print_str_hashtable(GHashTable * htable);void print_str_item(gpointer key, gpointer value, gpointer user_data);#endif /* _STONITHD_MSG_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -