aboutsummaryrefslogtreecommitdiff
path: root/src/telnet.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-01-13 18:08:52 -0500
committerFranklin Wei <git@fwei.tk>2016-01-13 18:08:52 -0500
commitcc9c177672edcc65933b15ba91831bf09bbec023 (patch)
tree1f717027c56e92acaecf2ccf581c83d979b9a461 /src/telnet.h
parent06880048df2202b1828e5367b1697aee305a2358 (diff)
downloadnetcosm-0.2.zip
netcosm-0.2.tar.gz
netcosm-0.2.tar.bz2
netcosm-0.2.tar.xz
rewrite everything to use libev0.2
Diffstat (limited to 'src/telnet.h')
-rw-r--r--src/telnet.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/telnet.h b/src/telnet.h
index c0725c4..673ad1c 100644
--- a/src/telnet.h
+++ b/src/telnet.h
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
/* commands */
#define IAC 255
#define DONT 254
@@ -39,6 +41,12 @@
#define LINEMODE 34
void telnet_init(void);
-void telnet_handle_command(const unsigned char*);
+
+#define TELNET_OK 0
+#define TELNET_EXIT 1
+
+/* returns either 0 or TELNET_EXIT */
+int telnet_handle_command(const unsigned char*);
+
void telnet_echo_on(void);
void telnet_echo_off(void);