新版本采用libipset库操作ipset集合,采用libpcap、libcap抓包获取源IP
This commit is contained in:
31
cap.h
Normal file
31
cap.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef CAP_H
|
||||
#define CAP_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <pcap.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/ip.h> // IP header
|
||||
#include <netinet/tcp.h> // TCP header
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ip2region/ip2region.h"
|
||||
#include "qqwry/qqwry.h"
|
||||
|
||||
#define RED "\033[31m"
|
||||
#define REDEND "\033[0m"
|
||||
|
||||
#define MAXIPSET 65535
|
||||
#define MAXIPSET_RULT_NAME_NUM 26
|
||||
|
||||
#define _VERSION "0.2"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user