|
XenevaOS
|
#include <stdint.h>#include <_xeneva.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/_keproc.h>#include <sys/_kefile.h>#include <sys/_kesignal.h>#include <sys/socket.h>#include <sys/netdb.h>#include <arpa/inet.h>
Macros | |
| #define | TEL_IAC 255 |
| #define | TEL_DONT 254 |
| #define | TEL_DO 253 |
| #define | TEL_WONT 252 |
| #define | TEL_WILL 251 |
| #define | TEL_SB 250 |
| #define | TEL_SE 240 |
| #define | TEL_TTYPE 24 |
| #define | TEL_SGA 3 |
| #define | TEL_SEND 1 |
| #define | TEL_IS 0 |
Functions | |
| int | main (int argc, char *argv[]) |
| #define TEL_DO 253 |
| #define TEL_DONT 254 |
| #define TEL_IAC 255 |
Telnet client for XenevaOS (terminal app).
Usage: telnet <host> [port] (default port 23, host:port accepted)
Minimal NVT: replies WONT to every DO and DONT to every WILL, except SGA (we WILL it, we already send char-at-a-time) and TTYPE (we WILL it and answer "VT100", matching the Xeneva Terminal's ANSI/VT100 support). Ctrl+] quits. Close detection relies on AuTCPReceive returning 0 on FIN/close and -1 when the RX queue is empty.
| #define TEL_IS 0 |
| #define TEL_SB 250 |
| #define TEL_SE 240 |
| #define TEL_SEND 1 |
| #define TEL_SGA 3 |
| #define TEL_TTYPE 24 |
| #define TEL_WILL 251 |
| #define TEL_WONT 252 |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |