Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/ipf/netinet Constify a bunch of global vari...
details: https://anonhg.NetBSD.org/src/rev/ad367f2720f0
branches: trunk
changeset: 319571:ad367f2720f0
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Jun 03 10:37:23 2018 +0000
description:
Constify a bunch of global varialbes under ipf/ so that they land in
.rodata (3472 bytes).
Also, remove ipf_tuneables[], unused.
diffstat:
sys/external/bsd/ipf/netinet/fil.c | 8 ++++----
sys/external/bsd/ipf/netinet/ip_fil.h | 4 ++--
sys/external/bsd/ipf/netinet/ip_frag.c | 19 ++-----------------
sys/external/bsd/ipf/netinet/ip_ftp_pxy.c | 6 +++---
sys/external/bsd/ipf/netinet/ip_log.c | 6 +++---
sys/external/bsd/ipf/netinet/ip_nat.c | 6 +++---
sys/external/bsd/ipf/netinet/ip_proxy.c | 6 +++---
sys/external/bsd/ipf/netinet/ip_state.c | 6 +++---
sys/external/bsd/ipf/netinet/ip_tftp_pxy.c | 4 ++--
9 files changed, 25 insertions(+), 40 deletions(-)
diffs (247 lines):
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/fil.c
--- a/sys/external/bsd/ipf/netinet/fil.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/fil.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fil.c,v 1.22 2018/02/04 08:19:42 mrg Exp $ */
+/* $NetBSD: fil.c,v 1.23 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.22 2018/02/04 08:19:42 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.23 2018/06/03 10:37:23 maxv Exp $");
#else
static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -304,7 +304,7 @@
{ "", NULL, NULL, NULL }
};
-static ipftuneable_t ipf_main_tuneables[] = {
+static const ipftuneable_t ipf_main_tuneables[] = {
{ { (void *)offsetof(struct ipf_main_softc_s, ipf_flags) },
"ipf_flags", 0, 0xffffffff,
stsizeof(ipf_main_softc_t, ipf_flags),
@@ -6923,7 +6923,7 @@
/* ipftp_void that points to the stored value. */
/* ------------------------------------------------------------------------ */
ipftuneable_t *
-ipf_tune_array_copy(void *base, size_t size, ipftuneable_t *template)
+ipf_tune_array_copy(void *base, size_t size, const ipftuneable_t *template)
{
ipftuneable_t *copy;
int i;
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_fil.h
--- a/sys/external/bsd/ipf/netinet/ip_fil.h Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_fil.h Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_fil.h,v 1.5 2013/06/29 21:06:57 rmind Exp $ */
+/* $NetBSD: ip_fil.h,v 1.6 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -1881,7 +1881,7 @@
extern int ipf_tune_array_unlink(ipf_main_softc_t *,
ipftuneable_t *);
extern ipftuneable_t *ipf_tune_array_copy(void *, size_t,
- ipftuneable_t *);
+ const ipftuneable_t *);
extern int ipf_pr_pullup(fr_info_t *, int);
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_frag.c
--- a/sys/external/bsd/ipf/netinet/ip_frag.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_frag.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_frag.c,v 1.6 2018/05/03 07:13:48 maxv Exp $ */
+/* $NetBSD: ip_frag.c,v 1.7 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -86,7 +86,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_frag.c,v 1.6 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_frag.c,v 1.7 2018/06/03 10:37:23 maxv Exp $");
#else
static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_frag.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -136,21 +136,6 @@
static frentry_t ipfr_block;
-ipftuneable_t ipf_tuneables[] = {
- { { (void *)offsetof(ipf_frag_softc_t, ipfr_size) },
- "frag_size", 1, 0x7fffffff,
- stsizeof(ipf_frag_softc_t, ipfr_size),
- IPFT_WRDISABLED, NULL, NULL },
- { { (void *)offsetof(ipf_frag_softc_t, ipfr_ttl) },
- "frag_ttl", 1, 0x7fffffff,
- stsizeof(ipf_frag_softc_t, ipfr_ttl),
- 0, NULL, NULL },
- { { NULL },
- NULL, 0, 0,
- 0,
- 0, NULL, NULL }
-};
-
#define FBUMP(x) softf->ipfr_stats.x++
#define FBUMPD(x) do { softf->ipfr_stats.x++; DT(x); } while (0)
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_ftp_pxy.c
--- a/sys/external/bsd/ipf/netinet/ip_ftp_pxy.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_ftp_pxy.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_ftp_pxy.c,v 1.6 2016/10/16 05:11:34 mrg Exp $ */
+/* $NetBSD: ip_ftp_pxy.c,v 1.7 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -12,7 +12,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: ip_ftp_pxy.c,v 1.6 2016/10/16 05:11:34 mrg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: ip_ftp_pxy.c,v 1.7 2018/06/03 10:37:23 maxv Exp $");
#define IPF_FTP_PROXY
@@ -120,7 +120,7 @@
static int ipf_p_ftp_proxy_init = 0;
static frentry_t ftppxyfr;
-static ipftuneable_t ipf_ftp_tuneables[] = {
+static const ipftuneable_t ipf_ftp_tuneables[] = {
{ { (void *)offsetof(ipf_ftp_softc_t, ipf_p_ftp_debug) },
"ftp_debug", 0, 0x7f,
stsizeof(ipf_ftp_softc_t, ipf_p_ftp_debug),
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_log.c
--- a/sys/external/bsd/ipf/netinet/ip_log.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_log.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_log.c,v 1.7 2018/05/03 07:13:48 maxv Exp $ */
+/* $NetBSD: ip_log.c,v 1.8 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -9,7 +9,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_log.c,v 1.7 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_log.c,v 1.8 2018/06/03 10:37:23 maxv Exp $");
#include <sys/param.h>
#if defined(KERNEL) || defined(_KERNEL)
@@ -174,7 +174,7 @@
IPL_MAGIC, IPL_MAGIC, IPL_MAGIC,
IPL_MAGIC, IPL_MAGIC };
-static ipftuneable_t ipf_log_tuneables[] = {
+static const ipftuneable_t ipf_log_tuneables[] = {
/* log */
{ { (void *)offsetof(ipf_log_softc_t, ipl_suppress) },
"log_suppress", 0, 1,
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_nat.c
--- a/sys/external/bsd/ipf/netinet/ip_nat.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_nat.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_nat.c,v 1.19 2018/05/03 07:13:48 maxv Exp $ */
+/* $NetBSD: ip_nat.c,v 1.20 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -112,7 +112,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.19 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.20 2018/06/03 10:37:23 maxv Exp $");
#else
static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp";
@@ -138,7 +138,7 @@
frentry_t ipfnatblock;
-static ipftuneable_t ipf_nat_tuneables[] = {
+static const ipftuneable_t ipf_nat_tuneables[] = {
/* nat */
{ { (void *)offsetof(ipf_nat_softc_t, ipf_nat_lock) },
"nat_lock", 0, 1,
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_proxy.c
--- a/sys/external/bsd/ipf/netinet/ip_proxy.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_proxy.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_proxy.c,v 1.6 2018/05/03 07:13:48 maxv Exp $ */
+/* $NetBSD: ip_proxy.c,v 1.7 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -103,7 +103,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_proxy.c,v 1.6 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_proxy.c,v 1.7 2018/06/03 10:37:23 maxv Exp $");
#else
static const char rcsid[] = "@(#)Id: ip_proxy.c,v 1.1.1.2 2012/07/22 13:45:33 darrenr Exp";
#endif
@@ -124,7 +124,7 @@
ipftuneable_t *ipf_proxy_tune;
} ipf_proxy_softc_t;
-static ipftuneable_t ipf_proxy_tuneables[] = {
+static const ipftuneable_t ipf_proxy_tuneables[] = {
{ { (void *)offsetof(ipf_proxy_softc_t, ips_proxy_debug) },
"proxy_debug", 0, 0x1f,
stsizeof(ipf_proxy_softc_t, ips_proxy_debug),
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_state.c
--- a/sys/external/bsd/ipf/netinet/ip_state.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_state.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_state.c,v 1.10 2017/10/12 20:54:36 christos Exp $ */
+/* $NetBSD: ip_state.c,v 1.11 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -100,7 +100,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_state.c,v 1.10 2017/10/12 20:54:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_state.c,v 1.11 2018/06/03 10:37:23 maxv Exp $");
#else
static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_state.c,v 1.1.1.2 2012/07/22 13:45:37 darrenr Exp";
@@ -108,7 +108,7 @@
#endif
-static ipftuneable_t ipf_state_tuneables[] = {
+static const ipftuneable_t ipf_state_tuneables[] = {
{ { (void *)offsetof(ipf_state_softc_t, ipf_state_max) },
"state_max", 1, 0x7fffffff,
stsizeof(ipf_state_softc_t, ipf_state_max),
diff -r d819895c34cb -r ad367f2720f0 sys/external/bsd/ipf/netinet/ip_tftp_pxy.c
--- a/sys/external/bsd/ipf/netinet/ip_tftp_pxy.c Sun Jun 03 10:35:57 2018 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_tftp_pxy.c Sun Jun 03 10:37:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_tftp_pxy.c,v 1.5 2012/07/30 19:27:47 pgoyette Exp $ */
+/* $NetBSD: ip_tftp_pxy.c,v 1.6 2018/06/03 10:37:23 maxv Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -49,7 +49,7 @@
ipnat_t *ti_rule;
} tftpinfo_t;
-static ipftuneable_t ipf_tftp_tuneables[] = {
+static const ipftuneable_t ipf_tftp_tuneables[] = {
{ { (void *)offsetof(ipf_tftp_softc_t, ipf_p_tftp_readonly) },
"tftp_read_only", 0, 1,
stsizeof(ipf_tftp_softc_t, ipf_p_tftp_readonly),
Home |
Main Index |
Thread Index |
Old Index