From 0ab6975a972d894a80d766e2f5bbf4bc0350c227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20M=C3=BCnchow?= Date: Fri, 14 Oct 2016 13:19:03 +0200 Subject: [PATCH] Renamed TS3INIT_MORPH_TO_GET_COOKIE to TS3INIT_GET_COOKIE --- src/Makefile.xtables | 2 +- ...ET_COOKIE.c => libxt_TS3INIT_GET_COOKIE.c} | 22 +++++++++---------- src/ts3init_target.c | 16 +++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) rename src/{libxt_TS3INIT_MORPH_TO_GET_COOKIE.c => libxt_TS3INIT_GET_COOKIE.c} (55%) diff --git a/src/Makefile.xtables b/src/Makefile.xtables index a5800e1..20a4584 100644 --- a/src/Makefile.xtables +++ b/src/Makefile.xtables @@ -1,5 +1,5 @@ CFLAGS = -O2 -Wall -LIBS = libxt_ts3init_get_cookie.so libxt_ts3init_get_puzzle.so libxt_TS3INIT_RESET.so libxt_TS3INIT_SET_COOKIE.so libxt_TS3INIT_MORPH_TO_GET_COOKIE.so +LIBS = libxt_ts3init_get_cookie.so libxt_ts3init_get_puzzle.so libxt_TS3INIT_RESET.so libxt_TS3INIT_SET_COOKIE.so libxt_TS3INIT_GET_COOKIE.so all: $(LIBS) clean: diff --git a/src/libxt_TS3INIT_MORPH_TO_GET_COOKIE.c b/src/libxt_TS3INIT_GET_COOKIE.c similarity index 55% rename from src/libxt_TS3INIT_MORPH_TO_GET_COOKIE.c rename to src/libxt_TS3INIT_GET_COOKIE.c index dde709e..6e4f154 100644 --- a/src/libxt_TS3INIT_MORPH_TO_GET_COOKIE.c +++ b/src/libxt_TS3INIT_GET_COOKIE.c @@ -20,34 +20,34 @@ #include "ts3init_random_seed.h" #include "ts3init_target.h" -static void ts3init_morph_to_get_cookie_help(void) +static void ts3init_get_cookie_help(void) { - printf("TS3INIT_MORPH_TO_GET_COOKIE takes no options\n\n"); + printf("TS3INIT_GET_COOKIE takes no options\n\n"); } -static int ts3init_morph_to_get_cookie_parse(int c, char **argv, int invert, unsigned int *flags, +static int ts3init_get_cookie_parse(int c, char **argv, int invert, unsigned int *flags, const void *entry, struct xt_entry_target **target) { return false; } -static void ts3init_morph_to_get_cookie_check(unsigned int flags) +static void ts3init_get_cookie_check(unsigned int flags) { } /* register and init */ -static struct xtables_target ts3init_morph_to_get_cookie_tg_reg = +static struct xtables_target ts3init_get_cookie_tg_reg = { - .name = "TS3INIT_MORPH_TO_GET_COOKIE", + .name = "TS3INIT_GET_COOKIE", .revision = 0, .family = NFPROTO_UNSPEC, .version = XTABLES_VERSION, - .help = ts3init_morph_to_get_cookie_help, - .parse = ts3init_morph_to_get_cookie_parse, - .final_check = ts3init_morph_to_get_cookie_check, + .help = ts3init_get_cookie_help, + .parse = ts3init_get_cookie_parse, + .final_check = ts3init_get_cookie_check, }; -static __attribute__((constructor)) void ts3init_morph_to_get_cookie_tg_ldr(void) +static __attribute__((constructor)) void ts3init_get_cookie_tg_ldr(void) { - xtables_register_target(&ts3init_morph_to_get_cookie_tg_reg); + xtables_register_target(&ts3init_get_cookie_tg_reg); } \ No newline at end of file diff --git a/src/ts3init_target.c b/src/ts3init_target.c index ad68f59..c8bdd74 100644 --- a/src/ts3init_target.c +++ b/src/ts3init_target.c @@ -393,11 +393,11 @@ ts3init_fill_get_cookie_payload(u8 *payload) } /* - * The 'TS3INIT_MORPH_TO_GET_COOKIE' target handler. + * The 'TS3INIT_GET_COOKIE' target handler. * Morphes the incomming packet into a TS3INIT_GET_COOKIE */ static unsigned int -ts3init_morph_to_get_cookie_ipv4_tg(struct sk_buff *skb, const struct xt_action_param *par) +ts3init_get_cookie_ipv4_tg(struct sk_buff *skb, const struct xt_action_param *par) { struct iphdr *ip; struct udphdr *udp, udp_buf; @@ -433,11 +433,11 @@ ts3init_morph_to_get_cookie_ipv4_tg(struct sk_buff *skb, const struct xt_action_ } /* - * The 'TS3INIT_MORPH_TO_GET_COOKIE' target handler. + * The 'TS3INIT_GET_COOKIE' target handler. * Morphes the incomming packet into a TS3INIT_GET_COOKIE */ static unsigned int -ts3init_morph_to_get_cookie_ipv6_tg(struct sk_buff *skb, const struct xt_action_param *par) +ts3init_get_cookie_ipv6_tg(struct sk_buff *skb, const struct xt_action_param *par) { struct ipv6hdr *ip; struct udphdr *udp, udp_buf; @@ -508,19 +508,19 @@ static struct xt_target ts3init_tg_reg[] __read_mostly = { .me = THIS_MODULE, }, { - .name = "TS3INIT_MORPH_TO_GET_COOKIE", + .name = "TS3INIT_GET_COOKIE", .revision = 0, .family = NFPROTO_IPV4, .proto = IPPROTO_UDP, - .target = ts3init_morph_to_get_cookie_ipv4_tg, + .target = ts3init_get_cookie_ipv4_tg, .me = THIS_MODULE, }, { - .name = "TS3INIT_MORPH_TO_GET_COOKIE", + .name = "TS3INIT_GET_COOKIE", .revision = 0, .family = NFPROTO_IPV6, .proto = IPPROTO_UDP, - .target = ts3init_morph_to_get_cookie_ipv6_tg, + .target = ts3init_get_cookie_ipv6_tg, .me = THIS_MODULE, }, };