⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 devicelog.h

📁 接收端的程序
💻 H
字号:
#ifndef _DEVICELOG_H
#define _DEVICELOG_H
	
typedef struct eventinfo
{
	char time_stamp[20];/*the time stamp in the log*/
	char ip[16];/*the host name */
	char source[2];  /*0--syslog, 1--trap, 3--agent*/
	char facility[80]; /*the object about the event*/
	char serverity[2]; /*the lever of serverity */
	char content[5000]; /*the content of the log*/

}eventinfo;

	
int getmon();
int getmin();
int getsec();
int gethour();
	
	
/*get the current day*/	
int getday();

/*get the current year*/
int getyear();

/*get the priority from the msg*/
int getofpri(char * msg);

/*get the facility from msg*/
void getoffacility_std(char *msg,char *fac);

/*get the serverity from msg*/
void getofserverity_std(char *msg,char *serv);

/*get time style from msg*/
void getoftime_std(char *msg,char *time);

/*get the hostname from the msg*/
void getofhostname_std(char *msg,char *hostname);

/*get the content from the msg*/
void getofcontent_std(char *msg,char *content);

/*get the standard timestamp according to the database*/
void processtimestamp_std(char *msg,char *timestamp,char **month);

void processtimestamp_cisco(char *msg,char *timestamp);

void getfacility_cisco(char *msg, char *facility);

void getserverity_cisco(char *msg, char *serverity);

void getcontent_cisco(char *msg,char *content);

/*get the standard log format from string msg*/
void getmsg(char *msg,struct eventinfo *log);


#endif  /*devicelog.h*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -