mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 12:45:13 +02:00
psd: re-format comments
This commit is contained in:
@@ -49,28 +49,34 @@ struct port {
|
|||||||
u_int8_t proto; /* protocol number */
|
u_int8_t proto; /* protocol number */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Information we keep per each source address.
|
* Information we keep per each source address.
|
||||||
|
* @next: next entry with the same hash
|
||||||
|
* @timestamp: last update time
|
||||||
|
* @count: number of ports in the list
|
||||||
|
* @weight: total weight of ports in the list
|
||||||
*/
|
*/
|
||||||
struct host {
|
struct host {
|
||||||
struct host *next; /* Next entry with the same hash */
|
struct host *next;
|
||||||
unsigned long timestamp; /* Last update time */
|
unsigned long timestamp;
|
||||||
struct in_addr src_addr; /* Source address */
|
struct in_addr src_addr;
|
||||||
struct in_addr dest_addr; /* Destination address */
|
struct in_addr dest_addr;
|
||||||
unsigned short src_port; /* Source port */
|
unsigned short src_port;
|
||||||
int count; /* Number of ports in the list */
|
int count;
|
||||||
int weight; /* Total weight of ports in the list */
|
int weight;
|
||||||
struct port ports[SCAN_MAX_COUNT - 1]; /* List of ports */
|
struct port ports[SCAN_MAX_COUNT-1];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* State information.
|
* State information.
|
||||||
|
* @list: list of source addresses
|
||||||
|
* @hash: pointers into the list
|
||||||
|
* @index: oldest entry to be replaced
|
||||||
*/
|
*/
|
||||||
static struct {
|
static struct {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
struct host list[LIST_SIZE]; /* List of source addresses */
|
struct host list[LIST_SIZE];
|
||||||
struct host *hash[HASH_SIZE]; /* Hash: pointers into the list */
|
struct host *hash[HASH_SIZE];
|
||||||
int index; /* Oldest entry to be replaced */
|
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user