-typedef struct security_stream {
- const security_driver_t *driver;
- char *error;
-} security_stream_t;
-
-
-const security_driver_t *security_getdriver P((const char *));
-void security_handleinit P((security_handle_t *, const security_driver_t *));
-void security_streaminit P((security_stream_t *, const security_driver_t *));
-
-/* const char *security_geterror P((security_handle_t *)); */
-#define security_geterror(handle) ((handle)->error)
-void security_seterror P((security_handle_t *, const char *, ...))
- __attribute__ ((format (printf, 2, 3)));
+#define security_connect(driver, hostname, conf_fn, fn, arg, datap) \
+ (*(driver)->connect)(hostname, conf_fn, fn, arg, datap)
+
+/* void security_accept(
+ * const security_driver_t *driver,
+ * char *(*conf_fn)(char *, void *),
+ * int in,
+ * int out,
+ * void (*fn)(security_handle_t *, pkt_t *),
+ * void *datap);
+ *
+ * Given a security driver, an input file descriptor, and an output file
+ * descriptor, and a callback, when new connections are detected on the given
+ * file descriptors, the function is called with a newly created security
+ * handle and the initial packet received. This is amandad's interface for
+ * accepting incoming connections from the Amanda server. The file descriptors
+ * are typically 0 and 1 (stdin/stdout). This function uses the event
+ * interface, and only works properly when event_loop() is called later in the
+ * program.
+ */
+#define security_accept(driver, conf_fn, in, out, fn, datap) \
+ (*(driver)->accept)(driver, conf_fn, in, out, fn, datap)