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

📄 if.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_IF_H#define _SNIFF_IF_H#include "sniff.h"#include "stat.h"#include "list.h"#include <linux/if.h>#include <linux/if_packet.h>/* these are the packet families *//* so we can tell what interface they came off */#define LINK_ETHERNET           1#define LINK_PPP                2#define LINK_SLIP               3#define LINK_PLIP               4#define LINK_LOOPBACK           5#define LINK_ISDN_RAWIP         6#define LINK_ISDN_CISCOHDLC     7#define LINK_FDDI               8#define LINK_INVALID            0struct if_stat {        int if_index;        char if_name[16];        struct gen_stat all_stat;        struct gen_stat in_stat;        struct gen_stat out_stat;        struct gen_stat other_stat;		pthread_mutex_t mutex;};extern int inline if_handle		(struct sniff_pkt *pkt, struct sockaddr_ll *fromaddr, void *data);extern struct if_stat *if_add	(struct sockaddr_ll *fromaddr);extern int if_cmp_index			(struct if_stat *c1, struct if_stat *c2);extern int if_init( void );extern int inline if_eth		(struct sniff_pkt *pkt, struct if_stat *interface, struct sockaddr_ll *fromaddr, char *data);extern int inline if_lo			(struct sniff_pkt *pkt, struct if_stat *interface ,struct sockaddr_ll *fromaddr, char *data);extern int inline if_raw		(struct sniff_pkt *pkt, struct if_stat *interface, struct sockaddr_ll *fromaddr, char *data);extern struct list_t *if_list;extern pthread_mutex_t if_mutex;#endif /* _SNIFF_IF_H */

⌨️ 快捷键说明

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