优化
This commit is contained in:
11
cap.c
11
cap.c
@@ -2,8 +2,13 @@
|
||||
#include "common.h"
|
||||
#include "libipset.h"
|
||||
|
||||
|
||||
pcap_if_t *alldevs, *device;
|
||||
pcap_t *handle; // 会话句柄
|
||||
struct bpf_program fp; // 编译后的过滤器
|
||||
|
||||
pid_t pid = -1; // 子进程全局PID
|
||||
|
||||
pid_t pid = -1; // 子进程全局PID
|
||||
#define SHM_SIZE 1024 // 共享内存大小
|
||||
#define SHM_KEY 1234 // 共享内存键值
|
||||
int shmid = -1;
|
||||
@@ -209,10 +214,6 @@ void usage()
|
||||
exit(0);
|
||||
}
|
||||
|
||||
pcap_if_t *alldevs, *device;
|
||||
pcap_t *handle; // 会话句柄
|
||||
struct bpf_program fp; // 编译后的过滤器
|
||||
|
||||
void cleanup_(int signum)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user