diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-09-20 18:10:29 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-09-20 22:03:55 +0200 |
commit | 2b74a188332f152e8952725812e086968a41e925 (patch) | |
tree | e895a69b6e04d70bbb98f6b6ad6446837bdc1891 /plugin-api.h | |
parent | b9571ec01ff2a23475ca1a8a6b9910f49206b4ff (diff) | |
download | ponymap-2b74a188332f152e8952725812e086968a41e925.tar.gz ponymap-2b74a188332f152e8952725812e086968a41e925.tar.xz ponymap-2b74a188332f152e8952725812e086968a41e925.zip |
Implement more of the services
- SSH: ready for action
- IRC: ready for action
- HTTP: needs some work
Diffstat (limited to 'plugin-api.h')
-rw-r--r-- | plugin-api.h | 8 |
1 files changed, 8 insertions, 0 deletions
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); |