diff options
author | Cedric Berger <cedric@cvs.openbsd.org> | 2003-07-03 09:13:07 +0000 |
---|---|---|
committer | Cedric Berger <cedric@cvs.openbsd.org> | 2003-07-03 09:13:07 +0000 |
commit | 7e91f812e08632f0bb7ac90fdc35423bee97e1fb (patch) | |
tree | 09d5093be7465755788d22ef06b2d5ca44718425 /sbin/pfctl/pfctl.h | |
parent | b3181fe2641a38a929abe88ab2535cad85ff9f02 (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.h')
-rw-r--r-- | sbin/pfctl/pfctl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index 64116781700..3e4cbc1f202 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.h,v 1.21 2003/06/30 20:02:46 cedric Exp $ */ +/* $OpenBSD: pfctl.h,v 1.22 2003/07/03 09:13:06 cedric Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -38,7 +38,7 @@ struct pfr_buffer { int pfrb_type; /* type of content, see enum above */ int pfrb_size; /* number of objects in buffer */ int pfrb_msize; /* maximum number of objects in buffer */ - caddr_t pfrb_caddr; /* malloc'ated memory area */ + void *pfrb_caddr; /* malloc'ated memory area */ }; #define PFRB_FOREACH(var, buf) \ for((var) = pfr_buf_next((buf), NULL); \ @@ -71,7 +71,8 @@ void pfr_buf_clear(struct pfr_buffer *); int pfr_buf_add(struct pfr_buffer *, const void *); void *pfr_buf_next(struct pfr_buffer *, const void *); int pfr_buf_grow(struct pfr_buffer *, int); -void pfr_buf_load(char *, int, void (*)(char *, int)); +int pfr_buf_load(struct pfr_buffer *, char *, int, + int (*)(struct pfr_buffer *, char *, int)); char *pfr_strerror(int); int pfctl_clear_tables(const char *, const char *, int); |