* [PATCH] Added OBSF_print()
@ 2012-09-21 11:23 aft
0 siblings, 0 replies; only message in thread
From: aft @ 2012-09-21 11:23 UTC (permalink / raw)
To: netfilter-devel
Also added the __init()
Signed-off-by: Arif Hossain <aftnix@gmail.com>
---
extensions/libxt_OBSF.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/extensions/libxt_OBSF.c b/extensions/libxt_OBSF.c
index e94c91d..3eadfe8 100644
--- a/extensions/libxt_OBSF.c
+++ b/extensions/libxt_OBSF.c
@@ -129,11 +129,19 @@ static void OBSF_parse(struct xt_option_call *cb)
static void OBSF_print(const void *ip,
const struct xt_entry_target *target, int numeric)
{
+ const struct xt_OBSF_tginfo *info = (void *)target->data;
+
+ printf("Cipher Algorithm : %s\n", (info->flags & XT_OBSF_ENC_ARC4) ? "ARC4": "AES");
+ printf("Cipher Mode : %s\n", (info->flags & XT_OBSF_ENC_ENC) ? "ENC" : "DEC");
+ printf("Pading %s\n",(info->flags & XT_OBSF_PAD_ENABLED) ? "Enabled": "Disabled");
+ printf("Padding Mode: %s\n", (info->flags & XT_OBSF_PAD_STATIC) ? "Static" : "Random");
}
static void OBSF_save(const void *ip, const struct xt_entry_target *target)
{
+ const struct xt_OBSF_tginfo *info = (void *)target->data;
+
}
@@ -148,3 +156,8 @@ static struct xtables_target obsf_target = {
.save = OBSF_save,
.x6_options = OBSF_opts,
};
+
+static void __init(void)
+{
+ xtables_register_target(&obsf_target);
+}
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-21 11:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 11:23 [PATCH] Added OBSF_print() aft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).