+/* rfb.c
+ * Remote framebuffer server
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <stdint.h>
#include <minilib.h>
#include <output.h>
#include <fb.h>
#include <keyboard.h>
+#include <tables.h>
#include "lwip/tcp.h"
#include "lwip/stats.h"
-#include "rfb.h"
+#define RFB_PORT 5900
#define SET_PIXEL_FORMAT 0
#define SET_ENCODINGS 2
tcp_arg(pcb, NULL);
tcp_sent(pcb, NULL);
tcp_recv(pcb, NULL);
- mem_free(state);
mem_free(state->blockbuf);
+ mem_free(state);
tcp_close(pcb);
outputf("close_conn: done");
}
return ERR_OK;
}
-void rfb_init() {
+static void rfb_init() {
struct tcp_pcb *pcb;
init_server_info();
pcb = tcp_listen(pcb);
tcp_accept(pcb, rfb_accept);
}
+
+PROTOCOL(rfb_init);