summaryrefslogtreecommitdiff
path: root/usr.sbin/popa3d/startup.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-06-20 20:46:28 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-06-20 20:46:28 +0000
commit08654bfab44aaf6923b0054d764ae829837ae77b (patch)
tree01b1886a367b84e9a76539fa124b1471a545b591 /usr.sbin/popa3d/startup.c
parent0ab9c5f278e14a9c130f18ce6b6aae88a097f7ee (diff)
IPv4/v6 support for standalone mode. brad tested and ok'ed
Diffstat (limited to 'usr.sbin/popa3d/startup.c')
-rw-r--r--usr.sbin/popa3d/startup.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/popa3d/startup.c b/usr.sbin/popa3d/startup.c
index 5d66fee8160..6b93e36a909 100644
--- a/usr.sbin/popa3d/startup.c
+++ b/usr.sbin/popa3d/startup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: startup.c,v 1.2 2003/05/12 19:28:22 camield Exp $ */
+/* $OpenBSD: startup.c,v 1.3 2004/06/20 20:46:27 itojun Exp $ */
/*
* Command line option parsing.
@@ -8,6 +8,8 @@
#if POP_OPTIONS
+#include <sys/types.h>
+#include <sys/socket.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -30,6 +32,8 @@ extern char *__progname;
static char *progname;
#endif
+int af = PF_UNSPEC;
+
static void usage(void)
{
fprintf(stderr, "Usage: %s [-D] [-V]\n", progname);
@@ -52,12 +56,20 @@ int main(int argc, char **argv)
progname = POP_SERVER;
#endif
- while ((c = getopt(argc, argv, "DV")) != -1) {
+ while ((c = getopt(argc, argv, "DV46")) != -1) {
switch (c) {
case 'D':
standalone++;
break;
+ case '4':
+ af = AF_INET;
+ break;
+
+ case '6':
+ af = AF_INET6;
+ break;
+
case 'V':
version();