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

📄 mstate.h

📁 100 病毒源碼,原始碼,無毒 ......
💻 H
字号:
/*** Modular Logfile Analyzer** Copyright 2000 Jan Kneschke <jan@kneschke.de>**** Homepage: http://www.kneschke.de/projekte/modlogan**    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 of the License, or    (at your option) any later version, and provided that the above    copyright and permission notice is included with all distributed    copies of this or derived software.    This program 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 program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA**** $Id: mstate.h,v 1.18 2000/08/02 21:43:18 jk Exp $*/#ifndef _M_STATE_H_#define _M_STATE_H_#include <time.h>#include "mconfig.h"#include "mhash.h"#include "mlist.h"#define M_STATE_SUMMARY		"summary"#define M_STATE_WEB_SUMMARY		"summary"#define M_STATE_WEB_REQ_URL		"req_url"#define M_STATE_WEB_REQ_METHOD		"req_meth"#define M_STATE_WEB_REQ_PROTOCOL	"req_prot"#define M_STATE_WEB_REF_URL		"ref_url"#define M_STATE_WEB_OS			"os"#define M_STATE_WEB_USERAGENT		"useragent"#define M_STATE_WEB_HOST		"host"#define M_STATE_WEB_STATUS		"status"#define M_STATE_WEB_EXITPAGES		"exitpages"#define M_STATE_WEB_ENTRYPAGES		"entrypages"#define M_STATE_WEB_VISIT		"visit"#define M_STATE_WEB_HOURS		"hours"#define M_STATE_WEB_DAYS		"days"#define M_STATE_WEB_COUNTRIES		"countries"#define M_STATE_WEB_ROBOTS		"robots"#define M_STATE_WEB_SEARCHSITE		"searchsite"#define M_STATE_WEB_SEARCHSTRING	"searchstring"#define M_STATE_WEB_INT_ERROR		"int_error"#define M_STATE_WEB_MISSING_FILE	"missing_file"#define M_STATE_WEB_BOOKMARKS		"bookmarks"#define M_STATE_WEB_INDEXED_PAGES	"indexed_pages"#define M_STATE_WEB_ALLVISITTIME	"allvisittime"#define M_STATE_WEB_ALLVISITLEN		"allvisitlen"#define M_STATE_WRITE_DEFAULT	0#define M_STATE_WRITE_BY_MONTH	1#define M_STATE_TYPE_UNSET	0#define M_STATE_TYPE_WEB	1#define M_STATE_TYPE_TELECOM	2#define M_STATE_TYPE_GLOBAL	3#define M_STATE_SECTION_WEB	"web"#define M_STATE_SECTION_TELECOM "telecom"#define M_STATE_SECTION_GLOBAL	"global"typedef struct {	long hits;	long files;	long pages;	long visits;	long hosts;	double xfersize;} marray_web;typedef struct {	int	year;						/* summary */	int	month;						/* summary */	time_t	timestamp;					/* summary */		int	ext_type;	void 	*ext;} mstate;typedef struct {					/* datatype */		/* saved as */	mlist *visit_list;		/* data_StrInt */	/* visit */		mhash **indexed_pages;		/* data_StrInt */	/* */	mhash **exit_pages;		/* data_StrInt */	/* exitpages */	mhash **entry_pages;		/* data_StrInt */	/* entrypages */		mhash **os_hash;		/* data_Str3Int */	/* os */	mhash **req_url_hash;		/* data_StrInt */	/* req_url */	mhash **ua_hash;		/* data_Str3Int */	/* useragent */	mhash **req_prot_hash;		/* data_StrInt */	/* req_prot */	mhash **req_meth_hash;		/* data_StrInt */	/* req_meth */	mhash **host_hash;		/* data_Str3Int */	/* host */	mhash **status_hash;		/* data_StrInt */	/* status */	mhash **ref_url_hash;		/* data_StrInt */	/* ref_url */	mhash **robots;			/* data_StrInt */	/* robots */	mhash **bookmarks;		/* data_StrInt */	/* bookmarks */	mhash **status_missing_file;	/* data_BrokenLink */	/* missing_file */	mhash **status_internal_error;	/* data_BrokenLink */	/* int_error */	mhash **searchstring;		/* data_StrInt */	/* searchstring */	mhash **searchsite;		/* data_StrInt */	/* searchsite */	mhash **country_hash;		/* data_Str3Int */	/* countries */		marray_web hours[24];					/* hours */	marray_web days[31];					/* days */	long allvisittime;					/* summary */	long allvisitlength;					/* summary */} mstate_web;typedef struct {	long incomming_calls;	long outgoing_calls;} marray_telecom;typedef struct {	mhash **called_numbers;	mhash **calling_numbers;		marray_telecom hours[24];				/* hours */	marray_telecom days[31];				/* days */} mstate_telecom;mstate *mstate_init();mstate_web *mstate_init_web();mstate_telecom *mstate_init_telecom();void mstate_free(mstate *state);void mstate_free_web(mstate_web *state);void mstate_free_telecom(mstate_telecom *state);int mstate_read (mconfig *conf, mstate *state, int year, int month, char *subpath);int mstate_write (mconfig *conf, mstate *state, int _add_month, char *subpath);int mstate_write_web (mconfig *conf, mstate_web *state, gzFile *f);int mstate_write_telecom (mconfig *conf, mstate_telecom *state, gzFile *f);int mstate_is_section_end(const char *s);#endif

⌨️ 快捷键说明

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