summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-24 23:16:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-24 23:16:37 +0000
commitec68e4aa1299a433fd653a79c177745aab700772 (patch)
tree368fd761716581ee3549e7ae15a465f31320c99d /sbin
parent90d415258d57d514c014004a5050d39f149868b5 (diff)
match changes in header files
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/pfctl.c11
-rw-r--r--sbin/pfctl/pfctl_parser.c20
-rw-r--r--sbin/pfctl/pfctl_parser.h4
3 files changed, 22 insertions, 13 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index e48df4ac32b..bfcda77139e 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.2 2001/06/24 21:40:51 dhartmei Exp $ */
+/* $OpenBSD: pfctl.c,v 1.3 2001/06/24 23:16:35 deraadt Exp $ */
/*
* Copyright (c) 2001, Daniel Hartmeier
@@ -30,14 +30,19 @@
*
*/
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <net/pfvar.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-#include <netinet/in.h>
#include "pfctl_parser.h"
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 1339fe22966..1f4df47457d 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.2 2001/06/24 21:40:51 dhartmei Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.3 2001/06/24 23:16:36 deraadt Exp $ */
/*
* Copyright (c) 2001, Daniel Hartmeier
@@ -30,18 +30,23 @@
*
*/
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <net/pfvar.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <netdb.h>
-#include <netinet/in.h>
#include "pfctl_parser.h"
static void print_addr (u_int32_t);
-static void print_host (struct host *);
-static void print_seq (struct peer *);
+static void print_host (struct state_host *);
+static void print_seq (struct state_peer *);
static void print_port (u_int8_t, u_int16_t, u_int16_t, char *);
static void print_flags (u_int8_t);
static char *next_word (char **);
@@ -61,7 +66,7 @@ print_addr(u_int32_t a)
}
static void
-print_host(struct host *h)
+print_host(struct state_host *h)
{
u_int32_t a = ntohl(h->addr);
u_int16_t p = ntohs(h->port);
@@ -69,7 +74,7 @@ print_host(struct host *h)
}
static void
-print_seq(struct peer *p)
+print_seq(struct state_peer *p)
{
printf("[%u + %u]", p->seqlo, p->seqhi - p->seqlo);
}
@@ -184,8 +189,9 @@ print_status(struct status *s)
void
print_state(struct state *s)
{
- struct peer *src, *dst;
+ struct state_peer *src, *dst;
u_int8_t hrs, min, sec;
+
if (s->direction == PF_OUT) {
src = &s->src;
dst = &s->dst;
diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h
index 4b727e17ab1..34f2ebd802a 100644
--- a/sbin/pfctl/pfctl_parser.h
+++ b/sbin/pfctl/pfctl_parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.h,v 1.2 2001/06/24 21:40:51 dhartmei Exp $ */
+/* $OpenBSD: pfctl_parser.h,v 1.3 2001/06/24 23:16:36 deraadt Exp $ */
/*
* Copyright (c) 2001, Daniel Hartmeier
@@ -33,8 +33,6 @@
#ifndef _PFM_PARSER_H_
#define _PFM_PARSER_H_
-#include <net/pfvar.h>
-
char *next_line (char **);
int parse_rule (int, char *, struct rule *);
int parse_nat (int, char *, struct nat *);