summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/pf/pfctl/pfctl_parser.c
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-07-06 09:50:51 +0200
committerChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-08-02 10:21:51 +0200
commitc70221cb64185125b4fc97f9c2f15b6b4cf3cf3d (patch)
treef5f474b17bc57a04d29a45bd2d5dd4189612f407 /freebsd/contrib/pf/pfctl/pfctl_parser.c
parentpfctl: Match prototype. (diff)
downloadrtems-libbsd-c70221cb64185125b4fc97f9c2f15b6b4cf3cf3d.tar.bz2
pfctl: Add const and move static variables.
Note: This should be upstreamed into BSD. Make everything constant that can be constant and move static variables out of their functions.
Diffstat (limited to 'freebsd/contrib/pf/pfctl/pfctl_parser.c')
-rw-r--r--freebsd/contrib/pf/pfctl/pfctl_parser.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/freebsd/contrib/pf/pfctl/pfctl_parser.c b/freebsd/contrib/pf/pfctl/pfctl_parser.c
index 0e6a5a11..49035de6 100644
--- a/freebsd/contrib/pf/pfctl/pfctl_parser.c
+++ b/freebsd/contrib/pf/pfctl/pfctl_parser.c
@@ -78,7 +78,11 @@ struct node_host *host_v4(const char *, int);
struct node_host *host_v6(const char *, int);
struct node_host *host_dns(const char *, int, int);
+#ifndef __rtems__
const char *tcpflags = "FSRPAUEW";
+#else /* __rtems__ */
+const char * const tcpflags = "FSRPAUEW";
+#endif /* __rtems__ */
static const struct icmptypeent icmp_type[] = {
{ "echoreq", ICMP_ECHO },
@@ -483,10 +487,17 @@ print_pool(struct pf_pool *pool, u_int16_t p1, u_int16_t p2,
printf(" static-port");
}
+#ifndef __rtems__
const char *pf_reasons[PFRES_MAX+1] = PFRES_NAMES;
const char *pf_lcounters[LCNT_MAX+1] = LCNT_NAMES;
const char *pf_fcounters[FCNT_MAX+1] = FCNT_NAMES;
const char *pf_scounters[FCNT_MAX+1] = FCNT_NAMES;
+#else /* __rtems__ */
+const char * const pf_reasons[PFRES_MAX+1] = PFRES_NAMES;
+const char * const pf_lcounters[LCNT_MAX+1] = LCNT_NAMES;
+const char * const pf_fcounters[FCNT_MAX+1] = FCNT_NAMES;
+const char * const pf_scounters[FCNT_MAX+1] = FCNT_NAMES;
+#endif /* __rtems__ */
void
print_status(struct pf_status *s, int opts)