@@ -137,19 +137,19 @@ static void psd_mt_save(const void *ip, const struct xt_entry_match *match)
}
static struct xtables_match psd_mt_reg = {
- .name = "psd",
- .version = XTABLES_VERSION,
- .revision = 1,
- .family = NFPROTO_IPV4,
- .size = XT_ALIGN(sizeof(struct xt_psd_info)),
+ .name = "psd",
+ .version = XTABLES_VERSION,
+ .revision = 1,
+ .family = NFPROTO_IPV4,
+ .size = XT_ALIGN(sizeof(struct xt_psd_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_psd_info)),
- .help = psd_mt_help,
- .init = psd_mt_init,
- .parse = psd_mt_parse,
- .final_check = psd_mt_final_check,
- .print = psd_mt_print,
- .save = psd_mt_save,
- .extra_opts = psd_mt_opts,
+ .help = psd_mt_help,
+ .init = psd_mt_init,
+ .parse = psd_mt_parse,
+ .final_check = psd_mt_final_check,
+ .print = psd_mt_print,
+ .save = psd_mt_save,
+ .extra_opts = psd_mt_opts,
};
static __attribute__((constructor)) void psd_mt_ldr(void)
@@ -53,13 +53,13 @@ struct port {
* Information we keep per each source address.
*/
struct host {
- struct host *next; /* Next entry with the same hash */
- unsigned long timestamp; /* Last update time */
- struct in_addr src_addr; /* Source address */
- struct in_addr dest_addr; /* Destination address */
- unsigned short src_port; /* Source port */
- int count; /* Number of ports in the list */
- int weight; /* Total weight of ports in the list */
+ struct host *next; /* Next entry with the same hash */
+ unsigned long timestamp; /* Last update time */
+ struct in_addr src_addr; /* Source address */
+ struct in_addr dest_addr; /* Destination address */
+ __be16 src_port; /* Source port */
+ u16 weight; /* Total weight of ports in the list */
+ u8 count; /* Number of ports in the list */
struct port ports[SCAN_MAX_COUNT - 1]; /* List of ports */
};
@@ -70,7 +70,7 @@ static struct {
spinlock_t lock;
struct host list[LIST_SIZE]; /* List of source addresses */
struct host *hash[HASH_SIZE]; /* Hash: pointers into the list */
- int index; /* Oldest entry to be replaced */
+ int index; /* Oldest entry to be replaced */
} state;
/*