1
#ifndef _LINUX_NETFILTER_XT_PSD_H
2
#define _LINUX_NETFILTER_XT_PSD_H 1
4
#include <linux/param.h>
5
#include <linux/types.h>
8
* High port numbers have a lower weight to reduce the frequency of false
9
* positives, such as from passive mode FTP transfers.
11
#define PORT_WEIGHT_PRIV 3
12
#define PORT_WEIGHT_HIGH 1
13
#define PSD_MAX_RATE 10000
16
* Port scan detection thresholds: at least COUNT ports need to be scanned
17
* from the same source, with no longer than DELAY ticks between ports.
19
#define SCAN_MIN_COUNT 7
20
#define SCAN_MAX_COUNT (SCAN_MIN_COUNT * PORT_WEIGHT_PRIV)
21
#define SCAN_WEIGHT_THRESHOLD SCAN_MAX_COUNT
22
#define SCAN_DELAY_THRESHOLD (300) /* old usage of HZ here was erroneously and broke under uml */
25
* Keep track of up to LIST_SIZE source addresses, using a hash table of
26
* HASH_SIZE entries for faster lookups, but limiting hash collisions to
27
* HASH_MAX source addresses per the same hash value.
29
#define LIST_SIZE 0x100
31
#define HASH_SIZE (1 << HASH_LOG)
35
__u32 weight_threshold;
36
__u32 delay_threshold;
37
__u16 lo_ports_weight;
38
__u16 hi_ports_weight;
41
#endif /*_LINUX_NETFILTER_XT_PSD_H*/