From 75f80fa8f8001930386d66defacc3df9e87daedb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 29 Sep 2009 19:32:18 +0200 Subject: [PATCH] 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. --- extensions/xt_pknock.c | 7 ++++++- extensions/xt_pknock.h | 9 --------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/extensions/xt_pknock.c b/extensions/xt_pknock.c index a833878..6bb13ca 100644 --- a/extensions/xt_pknock.c +++ b/extensions/xt_pknock.c @@ -70,7 +70,12 @@ static struct proc_dir_entry *pde = NULL; 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)", .tfm = NULL, .size = 0 diff --git a/extensions/xt_pknock.h b/extensions/xt_pknock.h index a798edb..4b542a4 100644 --- a/extensions/xt_pknock.h +++ b/extensions/xt_pknock.h @@ -74,15 +74,6 @@ struct ipt_pknock_rule { unsigned long max_time; /* max matching time between ports */ }; -#include - -struct ipt_pknock_crypto { - char *algo; - struct crypto_hash *tfm; - int size; - struct hash_desc desc; -}; - struct transport_data { uint8_t proto; uint16_t port; /* destination port */