summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_parser.h
diff options
context:
space:
mode:
authorCedric Berger <cedric@cvs.openbsd.org>2003-07-03 09:13:07 +0000
committerCedric Berger <cedric@cvs.openbsd.org>2003-07-03 09:13:07 +0000
commit7e91f812e08632f0bb7ac90fdc35423bee97e1fb (patch)
tree09d5093be7465755788d22ef06b2d5ca44718425 /sbin/pfctl/pfctl_parser.h
parentb3181fe2641a38a929abe88ab2535cad85ff9f02 (diff)
This patch finally cleanup pfctl_table.c. No more global buffer,
and a couple of parsing functions moved to parse.y or pfctl_parser where they belong. I also took the opportunity to replace "void" functions with exit(1) or err() inside by "int" functions, with the caller checking the return value for errors (much cleaner and an old request from Theo) ok dhartmei@ henning@
Diffstat (limited to 'sbin/pfctl/pfctl_parser.h')
-rw-r--r--sbin/pfctl/pfctl_parser.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h
index 6754df4e023..faea7e1ccbc 100644
--- a/sbin/pfctl/pfctl_parser.h
+++ b/sbin/pfctl/pfctl_parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.h,v 1.61 2003/05/19 20:21:53 henning Exp $ */
+/* $OpenBSD: pfctl_parser.h,v 1.62 2003/07/03 09:13:06 cedric Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -65,6 +65,7 @@ struct pfctl {
struct pfioc_rule *prule[PF_RULESET_MAX];
struct pfioc_altq *paltq;
struct pfioc_queue *pqueue;
+ struct pfr_buffer *ab; /* address buffer */
const char *anchor;
const char *ruleset;
};
@@ -154,9 +155,8 @@ void print_queue(const struct pf_altq *, unsigned, struct node_queue_bw *,
int, struct node_queue_opt *);
void pfctl_begin_table(void);
-void pfctl_append_addr(char *, int, int);
-void pfctl_append_file(char *);
-void pfctl_define_table(char *, int, int, int, const char *, const char *);
+int pfctl_define_table(char *, int, int, int, const char *, const char *,
+ struct pfr_buffer *);
void pfctl_commit_table(void);
struct icmptypeent {
@@ -196,4 +196,7 @@ 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 append_addr(struct pfr_buffer *, char *, int);
+int append_addr_not(struct pfr_buffer *, char *, int, int);
+
#endif /* _PFCTL_PARSER_H_ */