[netfilter-cvslog] r6941 - in trunk/iptables: extensions
include/linux/netfilter include/linux/netfilter_ipv4
yasuyuki at netfilter.org
yasuyuki at netfilter.org
Tue Jul 24 08:53:14 CEST 2007
Author: yasuyuki at netfilter.org
Date: 2007-07-24 08:53:14 +0200 (Tue, 24 Jul 2007)
New Revision: 6941
Added:
trunk/iptables/include/linux/netfilter/xt_mark.h
Removed:
trunk/iptables/include/linux/netfilter_ipv4/ipt_mark.h
Modified:
trunk/iptables/extensions/libipt_mark.c
Log:
Use unified API in libipt_mark.c
Modified: trunk/iptables/extensions/libipt_mark.c
===================================================================
--- trunk/iptables/extensions/libipt_mark.c 2007-07-24 06:52:16 UTC (rev 6940)
+++ trunk/iptables/extensions/libipt_mark.c 2007-07-24 06:53:14 UTC (rev 6941)
@@ -5,9 +5,9 @@
#include <stdlib.h>
#include <getopt.h>
-#include <iptables.h>
+#include <xtables.h>
/* For 64bit kernel / 32bit userspace */
-#include "../include/linux/netfilter_ipv4/ipt_mark.h"
+#include "../include/linux/netfilter/xt_mark.h"
/* Function which prints out usage message. */
static void
@@ -33,7 +33,7 @@
unsigned int *nfcache,
struct xt_entry_match **match)
{
- struct ipt_mark_info *markinfo = (struct ipt_mark_info *)(*match)->data;
+ struct xt_mark_info *markinfo = (struct xt_mark_info *)(*match)->data;
switch (c) {
char *end;
@@ -81,7 +81,7 @@
const struct xt_entry_match *match,
int numeric)
{
- struct ipt_mark_info *info = (struct ipt_mark_info *)match->data;
+ struct xt_mark_info *info = (struct xt_mark_info *)match->data;
printf("MARK match ");
@@ -95,7 +95,7 @@
static void
save(const void *ip, const struct xt_entry_match *match)
{
- struct ipt_mark_info *info = (struct ipt_mark_info *)match->data;
+ struct xt_mark_info *info = (struct xt_mark_info *)match->data;
if (info->invert)
printf("! ");
@@ -104,12 +104,13 @@
print_mark(info->mark, info->mask, 0);
}
-static struct iptables_match mark = {
+static struct xtables_match mark = {
.next = NULL,
+ .family = AF_INET,
.name = "mark",
.version = IPTABLES_VERSION,
- .size = IPT_ALIGN(sizeof(struct ipt_mark_info)),
- .userspacesize = IPT_ALIGN(sizeof(struct ipt_mark_info)),
+ .size = XT_ALIGN(sizeof(struct xt_mark_info)),
+ .userspacesize = XT_ALIGN(sizeof(struct xt_mark_info)),
.help = &help,
.parse = &parse,
.final_check = &final_check,
@@ -120,5 +121,5 @@
void _init(void)
{
- register_match(&mark);
+ xtables_register_match(&mark);
}
Added: trunk/iptables/include/linux/netfilter/xt_mark.h
===================================================================
--- trunk/iptables/include/linux/netfilter/xt_mark.h (rev 0)
+++ trunk/iptables/include/linux/netfilter/xt_mark.h 2007-07-24 06:53:14 UTC (rev 6941)
@@ -0,0 +1,9 @@
+#ifndef _XT_MARK_H
+#define _XT_MARK_H
+
+struct xt_mark_info {
+ unsigned long mark, mask;
+ u_int8_t invert;
+};
+
+#endif /*_XT_MARK_H*/
Deleted: trunk/iptables/include/linux/netfilter_ipv4/ipt_mark.h
===================================================================
--- trunk/iptables/include/linux/netfilter_ipv4/ipt_mark.h 2007-07-24 06:52:16 UTC (rev 6940)
+++ trunk/iptables/include/linux/netfilter_ipv4/ipt_mark.h 2007-07-24 06:53:14 UTC (rev 6941)
@@ -1,9 +0,0 @@
-#ifndef _IPT_MARK_H
-#define _IPT_MARK_H
-
-struct ipt_mark_info {
- unsigned long mark, mask;
- u_int8_t invert;
-};
-
-#endif /*_IPT_MARK_H*/
More information about the netfilter-cvslog
mailing list