📄 lparser.h
字号:
#ifdef HAVE_CONFIG_H#include <config.h>#endif#include<errno.h>#include <sys/time.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#ifdef HAVE_SYSLOG_H#include <syslog.h> //openlog,closelog#else# error no syslog.h#endif#ifdef HAVE_STRING_H#include <string.h> //strlen, strncpy, strncut#else# error no string.h#endif#ifdef HAVE_UNISTD_H#include<unistd.h> // getopt#else# error no unistd.h#endif#ifdef HAVE_STDLIB_H#include <stdlib.h> //atof,getloadavg,free...#else# error no stdlib.h#endif#ifdef HAVE_CTYPE_H#include <ctype.h>#else# error no ctype.h#endif#ifdef HAVE_SIGNAL_H#include <signal.h> //signal#else# error no signal.h#endif#ifdef HAVE_REGEX#ifdef HAVE_REGEX_H#include <regex.h> //regcomp, regexec#else# error no regex.h#endif#endiftypedef enum{ CFG_PARAMETER, CFG_VALUE, CFG_SECTION,} cfgKeywordValue;int slog(int k, char *fmt, ...);void show_menu(int n);char *rm_first_spaces(char *k);int is_comment(char *c);int make_deamon();int client(char *addr, char *port,char *machine, char *status, char *error, char *Amachine, char *actionid, char *Sstate, char *service);int read_confd(char *filename);void *parse_entry(char *buf);int encrypt_stuff(char *key, unsigned char **outbuf, char *fmt, ...);int decrypt_stuff(char *key, unsigned char **outbuf, unsigned char *inbuf, int inlen);int send_tcp(unsigned char *buf, int buf_len, int sockfd);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -