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

📄 lookup.h

📁 * A ncurses user interface. * Network statistics to view the amount of packets and data in many
💻 H
字号:
/*  This file is part of sniffer, a packet capture utility and  network moniter  The author can be contacted at <mistral@stev.org>  the lastest version is avilable from   http://stev.org  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.  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., 675 Mass Ave, Cambridge, MA 02139, USA.*/#ifndef _SNIFF_LOOKUP_H#define _SNIFF_LOOKUP_H#include "config.h"#include "list.h"#include "stat.h"struct lookup {	unsigned long ip; /* a binary ip addrss */	char *ip_str;   /* a text ip address */	char *name;     /* a host name */	time_t time; /* the time the lookup was done */	unsigned long failed;	struct gen_stat in;	struct gen_stat out;	int score;		/* when the core reaches 0 remove it from the active host list */	int working:1; /* are we looking this host up ? */};extern pthread_t lookup_thread;extern pthread_mutex_t lookup_mutex;extern pthread_mutex_t lookup_failed_mutex;extern pthread_mutex_t lookup_todo_mutex;extern pthread_mutex_t lookup_active_mutex;extern struct list_t *lookup_list;		/* this is the main lookup list */extern struct list_t *lookup_failed;	/* place to dump fail lookups */extern struct list_t *lookup_todo;		/* hosts that still need looked up */extern struct list_t *lookup_active;	/* active hosts */extern void * lookup_init		(void *arg );extern void lookup_tidy			( void );extern int lookup_dns			(struct lookup *p);extern int lookup_cmp			(struct lookup *c1, struct lookup *c2);struct lookup *lookup_get		(unsigned long ip);extern char * lookup			(unsigned long ip, int fail);extern inline void lookup_stats	(unsigned long daddr, unsigned long dbytes,			 unsigned long saddr, unsigned long sbytes);extern inline struct lookup *lookup_create(unsigned long ip);#endif /* _SNIFF_LOOKUP_H */

⌨️ 快捷键说明

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