From 2b74a188332f152e8952725812e086968a41e925 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sat, 20 Sep 2014 18:10:29 +0200
Subject: Implement more of the services
- SSH: ready for action
- IRC: ready for action
- HTTP: needs some work
---
plugin-api.h | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'plugin-api.h')
diff --git a/plugin-api.h b/plugin-api.h
index 96056ee..3406308 100644
--- a/plugin-api.h
+++ b/plugin-api.h
@@ -44,9 +44,14 @@ struct service
/// Destroy the handle created for the scan
void (*scan_free) (void *handle);
+ // XXX: maybe force the service to store a reference to the unit?
+
/// We have received some data from the peer
+ // FIXME: the dependency on `struct str' is not very good
void (*on_data) (void *handle, struct unit *u, struct str *data);
+ // XXX: do we need these at all? Is there any use for them?
+
/// Server has closed the connection
void (*on_eof) (void *handle, struct unit *u);
@@ -62,6 +67,9 @@ struct plugin_api
/// Register the plugin for a service
void (*register_service) (void *ctx, struct service *info);
+ /// Get the IP address of the target as a string
+ const char *(*unit_get_address) (struct unit *u);
+
/// Send some data to the peer
ssize_t (*unit_write) (struct unit *u, const void *buf, size_t len);
--
cgit v1.2.3