[netfilter-cvslog] r7057 - trunk/iptables/extensions
kaber at trash.net
kaber at trash.net
Thu Oct 4 18:25:58 CEST 2007
Author: kaber at trash.net
Date: 2007-10-04 18:25:58 +0200 (Thu, 04 Oct 2007)
New Revision: 7057
Modified:
trunk/iptables/extensions/libip6t_LOG.c
trunk/iptables/extensions/libip6t_REJECT.c
trunk/iptables/extensions/libip6t_policy.c
trunk/iptables/extensions/libipt_LOG.c
trunk/iptables/extensions/libipt_policy.c
trunk/iptables/extensions/libipt_realm.c
trunk/iptables/extensions/libxt_CLASSIFY.c
trunk/iptables/extensions/libxt_dccp.c
trunk/iptables/extensions/libxt_hashlimit.c
trunk/iptables/extensions/libxt_limit.c
trunk/iptables/extensions/libxt_sctp.c
trunk/iptables/extensions/libxt_tcp.c
Log:
[PATCH 05/13] Constify data structures
Constify more data structures. Make functions static.
Signed-off-by: Jan Engelhardt <jengelh at gmx.de>
Modified: trunk/iptables/extensions/libip6t_LOG.c
===================================================================
--- trunk/iptables/extensions/libip6t_LOG.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libip6t_LOG.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -57,7 +57,7 @@
unsigned int level;
};
-static struct ip6t_log_names ip6t_log_names[]
+static const struct ip6t_log_names ip6t_log_names[]
= { { .name = "alert", .level = LOG_ALERT },
{ .name = "crit", .level = LOG_CRIT },
{ .name = "debug", .level = LOG_DEBUG },
Modified: trunk/iptables/extensions/libip6t_REJECT.c
===================================================================
--- trunk/iptables/extensions/libip6t_REJECT.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libip6t_REJECT.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -145,7 +145,7 @@
printf("--reject-with %s ", reject_table[i].name);
}
-struct ip6tables_target reject = {
+static struct ip6tables_target reject = {
.name = "REJECT",
.version = IPTABLES_VERSION,
.size = IP6T_ALIGN(sizeof(struct ip6t_reject_info)),
Modified: trunk/iptables/extensions/libip6t_policy.c
===================================================================
--- trunk/iptables/extensions/libip6t_policy.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libip6t_policy.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -452,7 +452,7 @@
}
}
-struct ip6tables_match policy = {
+static struct ip6tables_match policy = {
.name = "policy",
.version = IPTABLES_VERSION,
.size = IP6T_ALIGN(sizeof(struct ip6t_policy_info)),
Modified: trunk/iptables/extensions/libipt_LOG.c
===================================================================
--- trunk/iptables/extensions/libipt_LOG.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libipt_LOG.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -57,7 +57,7 @@
unsigned int level;
};
-static struct ipt_log_names ipt_log_names[]
+static const struct ipt_log_names ipt_log_names[]
= { { .name = "alert", .level = LOG_ALERT },
{ .name = "crit", .level = LOG_CRIT },
{ .name = "debug", .level = LOG_DEBUG },
Modified: trunk/iptables/extensions/libipt_policy.c
===================================================================
--- trunk/iptables/extensions/libipt_policy.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libipt_policy.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -410,7 +410,7 @@
}
}
-struct iptables_match policy = {
+static struct iptables_match policy = {
.name = "policy",
.version = IPTABLES_VERSION,
.size = IPT_ALIGN(sizeof(struct ipt_policy_info)),
Modified: trunk/iptables/extensions/libipt_realm.c
===================================================================
--- trunk/iptables/extensions/libipt_realm.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libipt_realm.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -116,7 +116,7 @@
}
/* get realm id for name, -1 if error/not found */
-int realm_name2id(const char* name)
+static int realm_name2id(const char* name)
{
struct realmname* cur;
@@ -134,7 +134,7 @@
}
/* get realm name for id, NULL if error/not found */
-const char* realm_id2name(int id)
+static const char *realm_id2name(int id)
{
struct realmname* cur;
Modified: trunk/iptables/extensions/libxt_CLASSIFY.c
===================================================================
--- trunk/iptables/extensions/libxt_CLASSIFY.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libxt_CLASSIFY.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -26,7 +26,7 @@
{ }
};
-int string_to_priority(const char *s, unsigned int *p)
+static int string_to_priority(const char *s, unsigned int *p)
{
unsigned int i, j;
Modified: trunk/iptables/extensions/libxt_dccp.c
===================================================================
--- trunk/iptables/extensions/libxt_dccp.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libxt_dccp.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -81,7 +81,7 @@
free(buffer);
}
-static char *dccp_pkt_types[] = {
+static const char *const dccp_pkt_types[] = {
[DCCP_PKT_REQUEST] = "REQUEST",
[DCCP_PKT_RESPONSE] = "RESPONSE",
[DCCP_PKT_DATA] = "DATA",
Modified: trunk/iptables/extensions/libxt_hashlimit.c
===================================================================
--- trunk/iptables/extensions/libxt_hashlimit.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libxt_hashlimit.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -249,7 +249,7 @@
"You have to specify --hashlimit-name");
}
-static struct rates
+static const struct rates
{
const char *name;
u_int32_t mult;
Modified: trunk/iptables/extensions/libxt_limit.c
===================================================================
--- trunk/iptables/extensions/libxt_limit.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libxt_limit.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -126,7 +126,7 @@
return 1;
}
-static struct rates
+static const struct rates
{
const char *name;
u_int32_t mult;
Modified: trunk/iptables/extensions/libxt_sctp.c
===================================================================
--- trunk/iptables/extensions/libxt_sctp.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libxt_sctp.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -110,7 +110,7 @@
};
/*'ALL' and 'NONE' will be treated specially. */
-static struct sctp_chunk_names sctp_chunk_names[]
+static const struct sctp_chunk_names sctp_chunk_names[]
= { { .name = "DATA", .chunk_type = 0, .valid_flags = "-----UBE"},
{ .name = "INIT", .chunk_type = 1, .valid_flags = "--------"},
{ .name = "INIT_ACK", .chunk_type = 2, .valid_flags = "--------"},
Modified: trunk/iptables/extensions/libxt_tcp.c
===================================================================
--- trunk/iptables/extensions/libxt_tcp.c 2007-10-04 16:25:23 UTC (rev 7056)
+++ trunk/iptables/extensions/libxt_tcp.c 2007-10-04 16:25:58 UTC (rev 7057)
@@ -66,7 +66,7 @@
unsigned int flag;
};
-static struct tcp_flag_names tcp_flag_names[]
+static const struct tcp_flag_names tcp_flag_names[]
= { { "FIN", 0x01 },
{ "SYN", 0x02 },
{ "RST", 0x04 },
More information about the netfilter-cvslog
mailing list