summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/isakmpd/ui.c')
-rw-r--r--sbin/isakmpd/ui.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/sbin/isakmpd/ui.c b/sbin/isakmpd/ui.c
index 8209c476c54..a7b4db51959 100644
--- a/sbin/isakmpd/ui.c
+++ b/sbin/isakmpd/ui.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ui.c,v 1.26 2001/12/11 01:43:54 ho Exp $ */
+/* $OpenBSD: ui.c,v 1.27 2002/03/17 21:48:06 angelos Exp $ */
/* $EOM: ui.c,v 1.43 2000/10/05 09:25:12 niklas Exp $ */
/*
@@ -63,6 +63,11 @@
/* from isakmpd.c */
void daemon_shutdown_now (int);
+/* Report all SA configuration information. */
+void ui_report_sa (char *cmd);
+/* Issue SIGHUP. */
+void ui_sighup (char *cmd);
+
char *ui_fifo = FIFO;
int ui_socket;
@@ -133,6 +138,14 @@ ui_teardown (char *cmd)
sa_delete (sa, 1);
}
+/* Tear down all phase 2 connections. */
+static void
+ui_teardown_all (char *cmd)
+{
+ /* Skip 'cmd' as arg. */
+ sa_teardown_all();
+}
+
/*
* Call the configuration API.
* XXX Error handling! How to do multi-line transactions? Too short arbitrary
@@ -307,6 +320,14 @@ ui_report (char *cmd)
conf_report ();
}
+/* Report all SA configuration information. */
+void
+ui_report_sa (char *cmd)
+{
+ /* Skip 'cmd' as arg? */
+ sa_report_all ();
+}
+
/*
* Call the relevant command handler based on the first character of the
* line (the command).
@@ -347,6 +368,10 @@ ui_handle_command (char *line)
reinit ();
break;
+ case 'S':
+ ui_report_sa (line);
+ break;
+
case 'r':
ui_report (line);
break;
@@ -355,6 +380,10 @@ ui_handle_command (char *line)
ui_teardown (line);
break;
+ case 'T':
+ ui_teardown_all (line);
+ break;
+
default:
log_print ("ui_handle_messages: unrecognized command: '%c'", line[0]);
}