summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-02-02 18:32:36 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-02-02 18:32:36 +0000
commite497bd986f1f28389eb3af5db8eb2ebc6d871b94 (patch)
tree0a1a6fd3888617bfb80cb7846ea071054ab73dcd
parenta4a732cae0c63d6725b324c26be3143990a98ace (diff)
const'ify params for the host stuff
ok theo
-rw-r--r--sbin/pfctl/pfctl_parser.c24
-rw-r--r--sbin/pfctl/pfctl_parser.h8
2 files changed, 16 insertions, 16 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 69c8dca21b9..d4d4ccfc736 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.137 2003/02/02 18:11:43 henning Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.138 2003/02/02 18:32:35 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -62,10 +62,10 @@ void print_flags (u_int8_t);
void print_fromto(struct pf_rule_addr *, struct pf_rule_addr *,
u_int8_t, u_int8_t, int);
-struct node_host *host_if(char *, int);
-struct node_host *host_v4(char *);
-struct node_host *host_v6(char *, int);
-struct node_host *host_dns(char *, int, int);
+struct node_host *host_if(const char *, const int);
+struct node_host *host_v4(const char *);
+struct node_host *host_v6(const char *, const int);
+struct node_host *host_dns(const char *, const int, const int);
char *tcpflags = "FSRPAUEW";
@@ -1061,7 +1061,7 @@ ifa_load(void)
}
struct node_host *
-ifa_exists(char *ifa_name)
+ifa_exists(const char *ifa_name)
{
struct node_host *n;
@@ -1076,7 +1076,7 @@ ifa_exists(char *ifa_name)
}
struct node_host *
-ifa_lookup(char *ifa_name, enum pfctl_iflookup_mode mode)
+ifa_lookup(const char *ifa_name, enum pfctl_iflookup_mode mode)
{
struct node_host *p = NULL, *h = NULL, *n = NULL;
int return_all = 0;
@@ -1137,7 +1137,7 @@ ifa_lookup(char *ifa_name, enum pfctl_iflookup_mode mode)
}
struct node_host *
-host(char *s, int mask)
+host(const char *s, int mask)
{
struct node_host *h = NULL;
int v4mask, v6mask, cont = 1;
@@ -1204,7 +1204,7 @@ host(char *s, int mask)
}
struct node_host *
-host_if(char *s, int mask)
+host_if(const char *s, const int mask)
{
struct node_host *n, *h = NULL;
char *p, *ps;
@@ -1240,7 +1240,7 @@ host_if(char *s, int mask)
}
struct node_host *
-host_v4(char *s)
+host_v4(const char *s)
{
struct node_host *h = NULL;
struct in_addr ina;
@@ -1263,7 +1263,7 @@ host_v4(char *s)
}
struct node_host *
-host_v6(char *s, int mask)
+host_v6(const char *s, const int mask)
{
struct addrinfo hints, *res;
struct node_host *h = NULL;
@@ -1293,7 +1293,7 @@ host_v6(char *s, int mask)
}
struct node_host *
-host_dns(char *s, int v4mask, int v6mask)
+host_dns(const char *s, const int v4mask, const int v6mask)
{
struct addrinfo hints, *res0, *res;
struct node_host *n, *h = NULL;
diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h
index 39f855a778b..56be2023239 100644
--- a/sbin/pfctl/pfctl_parser.h
+++ b/sbin/pfctl/pfctl_parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.h,v 1.43 2003/01/25 18:16:05 cedric Exp $ */
+/* $OpenBSD: pfctl_parser.h,v 1.44 2003/02/02 18:32:35 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -154,8 +154,8 @@ extern int loadopt;
void set_ipmask(struct node_host *, u_int8_t);
void ifa_load(void);
-struct node_host *ifa_exists(char *);
-struct node_host *ifa_lookup(char *, enum pfctl_iflookup_mode);
-struct node_host *host(char *, int);
+struct node_host *ifa_exists(const char *);
+struct node_host *ifa_lookup(const char *, enum pfctl_iflookup_mode);
+struct node_host *host(const char *, int);
#endif /* _PFCTL_PARSER_H_ */