[netfilter-cvslog] r6927 - trunk/iptables/extensions
yasuyuki at netfilter.org
yasuyuki at netfilter.org
Tue Jul 24 08:06:59 CEST 2007
Author: yasuyuki at netfilter.org
Date: 2007-07-24 08:06:59 +0200 (Tue, 24 Jul 2007)
New Revision: 6927
Modified:
trunk/iptables/extensions/libip6t_multiport.c
trunk/iptables/extensions/libipt_DNAT.c
trunk/iptables/extensions/libipt_MASQUERADE.c
trunk/iptables/extensions/libipt_REDIRECT.c
trunk/iptables/extensions/libipt_SNAT.c
trunk/iptables/extensions/libipt_multiport.c
Log:
Fixes warning on compilation, part 2
This changes the type of arguments as follows in multiport, DNAT, SNAT,
MASQUERADE, and REDIRECT
- ip[6]t_ip[6] * -> void *
- ip[6]t_entry * -> void *
and adds lines to cast these pointer with intended type.
Modified: trunk/iptables/extensions/libip6t_multiport.c
===================================================================
--- trunk/iptables/extensions/libip6t_multiport.c 2007-07-24 06:03:45 UTC (rev 6926)
+++ trunk/iptables/extensions/libip6t_multiport.c 2007-07-24 06:06:59 UTC (rev 6927)
@@ -135,8 +135,9 @@
}
static const char *
-check_proto(const struct ip6t_entry *entry)
+check_proto(const void *e)
{
+ const struct ip6t_entry *entry = e;
char *proto;
if ((proto = proto_to_name(entry->ipv6.proto)) != NULL)
@@ -153,10 +154,11 @@
ate an option */
static int
parse(int c, char **argv, int invert, unsigned int *flags,
- const struct ip6t_entry *entry,
+ const void *e,
unsigned int *nfcache,
struct xt_entry_match **match)
{
+ const struct ip6t_entry *entry = e;
const char *proto;
struct ip6t_multiport *multiinfo
= (struct ip6t_multiport *)(*match)->data;
@@ -203,10 +205,11 @@
static int
parse_v1(int c, char **argv, int invert, unsigned int *flags,
- const struct ip6t_entry *entry,
+ const void *e,
unsigned int *nfcache,
- struct ip6t_entry_match **match)
+ struct xt_entry_match **match)
{
+ const struct ip6t_entry *entry = e;
const char *proto;
struct ip6t_multiport_v1 *multiinfo
= (struct ip6t_multiport_v1 *)(*match)->data;
@@ -279,10 +282,11 @@
/* Prints out the matchinfo. */
static void
-print(const struct ip6t_ip6 *ip,
+print(const void *ip_void,
const struct xt_entry_match *match,
int numeric)
{
+ const struct ip6t_ip6 *ip = ip_void;
const struct ip6t_multiport *multiinfo
= (const struct ip6t_multiport *)match->data;
unsigned int i;
@@ -315,10 +319,11 @@
}
static void
-print_v1(const struct ip6t_ip6 *ip,
- const struct ip6t_entry_match *match,
+print_v1(const void *ip_void,
+ const struct xt_entry_match *match,
int numeric)
{
+ const struct ip6t_ip6 *ip = ip_void;
const struct ip6t_multiport_v1 *multiinfo
= (const struct ip6t_multiport_v1 *)match->data;
unsigned int i;
@@ -358,8 +363,9 @@
}
/* Saves the union ip6t_matchinfo in parsable form to stdout. */
-static void save(const struct ip6t_ip6 *ip, const struct xt_entry_match *match)
+static void save(const void *ip_void, const struct xt_entry_match *match)
{
+ const struct ip6t_ip6 *ip = ip_void;
const struct ip6t_multiport *multiinfo
= (const struct ip6t_multiport *)match->data;
unsigned int i;
@@ -385,9 +391,9 @@
printf(" ");
}
-static void save_v1(const struct ip6t_ip6 *ip,
- const struct ip6t_entry_match *match)
+static void save_v1(const void *ip_void, const struct xt_entry_match *match)
{
+ const struct ip6t_ip6 *ip = ip_void;
const struct ip6t_multiport_v1 *multiinfo
= (const struct ip6t_multiport_v1 *)match->data;
unsigned int i;
Modified: trunk/iptables/extensions/libipt_DNAT.c
===================================================================
--- trunk/iptables/extensions/libipt_DNAT.c 2007-07-24 06:03:45 UTC (rev 6926)
+++ trunk/iptables/extensions/libipt_DNAT.c 2007-07-24 06:06:59 UTC (rev 6927)
@@ -141,9 +141,10 @@
ate an option */
static int
parse(int c, char **argv, int invert, unsigned int *flags,
- const struct ipt_entry *entry,
+ const void *e,
struct xt_entry_target **target)
{
+ const struct ipt_entry *entry = e;
struct ipt_natinfo *info = (void *)*target;
int portok;
@@ -215,7 +216,7 @@
/* Prints out the targinfo. */
static void
-print(const struct ipt_ip *ip,
+print(const void *ip,
const struct xt_entry_target *target,
int numeric)
{
@@ -233,7 +234,7 @@
/* Saves the union ipt_targinfo in parsable form to stdout. */
static void
-save(const struct ipt_ip *ip, const struct xt_entry_target *target)
+save(const void *ip, const struct xt_entry_target *target)
{
struct ipt_natinfo *info = (void *)target;
unsigned int i = 0;
Modified: trunk/iptables/extensions/libipt_MASQUERADE.c
===================================================================
--- trunk/iptables/extensions/libipt_MASQUERADE.c 2007-07-24 06:03:45 UTC (rev 6926)
+++ trunk/iptables/extensions/libipt_MASQUERADE.c 2007-07-24 06:06:59 UTC (rev 6927)
@@ -78,9 +78,10 @@
ate an option */
static int
parse(int c, char **argv, int invert, unsigned int *flags,
- const struct ipt_entry *entry,
+ const void *e,
struct xt_entry_target **target)
{
+ const struct ipt_entry *entry = e;
int portok;
struct ip_nat_multi_range *mr
= (struct ip_nat_multi_range *)(*target)->data;
@@ -121,7 +122,7 @@
/* Prints out the targinfo. */
static void
-print(const struct ipt_ip *ip,
+print(const void *ip,
const struct xt_entry_target *target,
int numeric)
{
@@ -143,7 +144,7 @@
/* Saves the union ipt_targinfo in parsable form to stdout. */
static void
-save(const struct ipt_ip *ip, const struct xt_entry_target *target)
+save(const void *ip, const struct xt_entry_target *target)
{
struct ip_nat_multi_range *mr
= (struct ip_nat_multi_range *)target->data;
Modified: trunk/iptables/extensions/libipt_REDIRECT.c
===================================================================
--- trunk/iptables/extensions/libipt_REDIRECT.c 2007-07-24 06:03:45 UTC (rev 6926)
+++ trunk/iptables/extensions/libipt_REDIRECT.c 2007-07-24 06:06:59 UTC (rev 6927)
@@ -80,9 +80,10 @@
ate an option */
static int
parse(int c, char **argv, int invert, unsigned int *flags,
- const struct ipt_entry *entry,
+ const void *e,
struct xt_entry_target **target)
{
+ const struct ipt_entry *entry = e;
struct ip_nat_multi_range *mr
= (struct ip_nat_multi_range *)(*target)->data;
int portok;
@@ -130,7 +131,7 @@
/* Prints out the targinfo. */
static void
-print(const struct ipt_ip *ip,
+print(const void *ip,
const struct xt_entry_target *target,
int numeric)
{
@@ -151,7 +152,7 @@
/* Saves the union ipt_targinfo in parsable form to stdout. */
static void
-save(const struct ipt_ip *ip, const struct xt_entry_target *target)
+save(const void *ip, const struct xt_entry_target *target)
{
struct ip_nat_multi_range *mr
= (struct ip_nat_multi_range *)target->data;
Modified: trunk/iptables/extensions/libipt_SNAT.c
===================================================================
--- trunk/iptables/extensions/libipt_SNAT.c 2007-07-24 06:03:45 UTC (rev 6926)
+++ trunk/iptables/extensions/libipt_SNAT.c 2007-07-24 06:06:59 UTC (rev 6927)
@@ -141,9 +141,10 @@
ate an option */
static int
parse(int c, char **argv, int invert, unsigned int *flags,
- const struct ipt_entry *entry,
+ const void *e,
struct xt_entry_target **target)
{
+ const struct ipt_entry *entry = e;
struct ipt_natinfo *info = (void *)*target;
int portok;
@@ -217,7 +218,7 @@
/* Prints out the targinfo. */
static void
-print(const struct ipt_ip *ip,
+print(const void *ip,
const struct xt_entry_target *target,
int numeric)
{
@@ -235,7 +236,7 @@
/* Saves the union ipt_targinfo in parsable form to stdout. */
static void
-save(const struct ipt_ip *ip, const struct xt_entry_target *target)
+save(const void *ip, const struct xt_entry_target *target)
{
struct ipt_natinfo *info = (void *)target;
unsigned int i = 0;
Modified: trunk/iptables/extensions/libipt_multiport.c
===================================================================
--- trunk/iptables/extensions/libipt_multiport.c 2007-07-24 06:03:45 UTC (rev 6926)
+++ trunk/iptables/extensions/libipt_multiport.c 2007-07-24 06:06:59 UTC (rev 6927)
@@ -137,8 +137,9 @@
}
static const char *
-check_proto(const struct ipt_entry *entry)
+check_proto(const void *e)
{
+ const struct ipt_entry *entry = e;
char *proto;
if (entry->ip.invflags & IPT_INV_PROTO)
@@ -160,10 +161,11 @@
ate an option */
static int
parse(int c, char **argv, int invert, unsigned int *flags,
- const struct ipt_entry *entry,
+ const void *e,
unsigned int *nfcache,
struct xt_entry_match **match)
{
+ const struct ipt_entry *entry = e;
const char *proto;
struct ipt_multiport *multiinfo
= (struct ipt_multiport *)(*match)->data;
@@ -210,10 +212,11 @@
static int
parse_v1(int c, char **argv, int invert, unsigned int *flags,
- const struct ipt_entry *entry,
+ const void *e,
unsigned int *nfcache,
struct xt_entry_match **match)
{
+ const struct ipt_entry *entry = e;
const char *proto;
struct ipt_multiport_v1 *multiinfo
= (struct ipt_multiport_v1 *)(*match)->data;
@@ -286,10 +289,11 @@
/* Prints out the matchinfo. */
static void
-print(const struct ipt_ip *ip,
+print(const void *ip_void,
const struct xt_entry_match *match,
int numeric)
{
+ const struct ipt_ip *ip = ip_void;
const struct ipt_multiport *multiinfo
= (const struct ipt_multiport *)match->data;
unsigned int i;
@@ -322,10 +326,11 @@
}
static void
-print_v1(const struct ipt_ip *ip,
+print_v1(const void *ip_void,
const struct xt_entry_match *match,
int numeric)
{
+ const struct ipt_ip *ip = ip_void;
const struct ipt_multiport_v1 *multiinfo
= (const struct ipt_multiport_v1 *)match->data;
unsigned int i;
@@ -365,8 +370,9 @@
}
/* Saves the union ipt_matchinfo in parsable form to stdout. */
-static void save(const struct ipt_ip *ip, const struct xt_entry_match *match)
+static void save(const void *ip_void, const struct xt_entry_match *match)
{
+ const struct ipt_ip *ip = ip_void;
const struct ipt_multiport *multiinfo
= (const struct ipt_multiport *)match->data;
unsigned int i;
@@ -392,9 +398,10 @@
printf(" ");
}
-static void save_v1(const struct ipt_ip *ip,
+static void save_v1(const void *ip_void,
const struct xt_entry_match *match)
{
+ const struct ipt_ip *ip = ip_void;
const struct ipt_multiport_v1 *multiinfo
= (const struct ipt_multiport_v1 *)match->data;
unsigned int i;
More information about the netfilter-cvslog
mailing list