pknock: move struct ipt_pknock_crypto to xt_pknock.c

It is only used in xt_pknock.c, and only once, so also make it an
anonymous struct.
This commit is contained in:
Jan Engelhardt
2009-09-29 19:32:18 +02:00
parent d8dc72d151
commit 75f80fa8f8
2 changed files with 6 additions and 10 deletions

View File

@@ -70,7 +70,12 @@ static struct proc_dir_entry *pde = NULL;
static DEFINE_SPINLOCK(list_lock); static DEFINE_SPINLOCK(list_lock);
static struct ipt_pknock_crypto crypto = { static struct {
char *algo;
struct crypto_hash *tfm;
int size;
struct hash_desc desc;
} crypto = {
.algo = "hmac(sha256)", .algo = "hmac(sha256)",
.tfm = NULL, .tfm = NULL,
.size = 0 .size = 0

View File

@@ -74,15 +74,6 @@ struct ipt_pknock_rule {
unsigned long max_time; /* max matching time between ports */ unsigned long max_time; /* max matching time between ports */
}; };
#include <linux/crypto.h>
struct ipt_pknock_crypto {
char *algo;
struct crypto_hash *tfm;
int size;
struct hash_desc desc;
};
struct transport_data { struct transport_data {
uint8_t proto; uint8_t proto;
uint16_t port; /* destination port */ uint16_t port; /* destination port */