📄 sniff.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_H#define _SNIFF_H/* structer which holds info about the orig read on the socket */struct sniff_pkt { int readlen; /* stores the amount of data that was returned from read */ int dataleft; /* as it goes though the layers - the amount of data */ int if_index; /* the if index */ char *if_name; /* the if_name */ char *func; /* the highest function we reached for logging errors */};/* Defien error numbers */#define ERR_OOM 1 /* out of mem */#define ERR_DATA 2 /* out of data */#define ERR_SUPP 3 /* error no supported */#define ERR_CSUM 4 /* checksum errors */#define ERR_MISC 5 /* Misc error */extern pthread_attr_t thread_attr;extern pthread_t sock_thread[];extern pthread_t gui_thread; /* gui thread info */extern int sockfd;extern void *sock_read (void *arg ); /* this is where each reader thread starts */#endif /* _SNIFF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -