You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
53 lines
1.4 KiB
8 years ago
|
/*
|
||
|
* "libxt_ts3init_reset" target extension for iptables
|
||
|
* Niels Werensteijn <niels werensteijn [at] teamspeak com>, 2016-10-03
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify it
|
||
|
* under the terms of the GNU General Public License; either version 2
|
||
|
* or 3 of the License, as published by the Free Software Foundation.
|
||
|
*/
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
#include <stddef.h>
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <getopt.h>
|
||
|
#include <xtables.h>
|
||
|
#include <fcntl.h>
|
||
|
#include <errno.h>
|
||
|
#include <unistd.h>
|
||
8 years ago
|
#include "ts3init_random_seed.h"
|
||
8 years ago
|
#include "ts3init_target.h"
|
||
|
|
||
8 years ago
|
static void ts3init_get_cookie_help(void)
|
||
8 years ago
|
{
|
||
8 years ago
|
printf("TS3INIT_GET_COOKIE takes no options\n\n");
|
||
8 years ago
|
}
|
||
|
|
||
8 years ago
|
static int ts3init_get_cookie_parse(int c, char **argv, int invert, unsigned int *flags,
|
||
8 years ago
|
const void *entry, struct xt_entry_target **target)
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
|
||
8 years ago
|
static void ts3init_get_cookie_check(unsigned int flags)
|
||
8 years ago
|
{
|
||
|
}
|
||
|
|
||
|
/* register and init */
|
||
8 years ago
|
static struct xtables_target ts3init_get_cookie_tg_reg =
|
||
8 years ago
|
{
|
||
8 years ago
|
.name = "TS3INIT_GET_COOKIE",
|
||
8 years ago
|
.revision = 0,
|
||
|
.family = NFPROTO_UNSPEC,
|
||
|
.version = XTABLES_VERSION,
|
||
8 years ago
|
.help = ts3init_get_cookie_help,
|
||
|
.parse = ts3init_get_cookie_parse,
|
||
|
.final_check = ts3init_get_cookie_check,
|
||
8 years ago
|
};
|
||
|
|
||
8 years ago
|
static __attribute__((constructor)) void ts3init_get_cookie_tg_ldr(void)
|
||
8 years ago
|
{
|
||
8 years ago
|
xtables_register_target(&ts3init_get_cookie_tg_reg);
|
||
8 years ago
|
}
|