|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] This is the first patch to move the console code out of
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 94a4626c2c4415e88d207be908aeb1e680e7dbbf
# Parent 1640c137c84763a25b9e1ede039566eb90781162
This is the first patch to move the console code out of Xend and into a
separate daemon. In this patch I've included the daemon and a
front-end. I've also have the console code removed from Xend locally
but I wanted to clarify a few things first before submitting that.
Here's how it works:
1) Daemon sits on control channel (via xcs) waiting for console messages
2) Buffers all console data received
3) Publishes the location of a tty that can be used for reading in
/console/<domid>/tty
4) Reads a value from the store to determine what the limit of console
data should be (/console/<domid>/limit) to prevent DoS attacks
Using it is quite simple, just run consoled and use the xc_console
program to connect to the console. It uses syslog for logging.
Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
diff -r 1640c137c847 -r 94a4626c2c44 tools/consoled/Makefile
--- /dev/null Tue Aug 2 12:18:15 2005
+++ b/tools/consoled/Makefile Tue Aug 2 12:18:47 2005
@@ -0,0 +1,48 @@
+# Makefile for consoled
+# based on xcs Makefile
+# Anthony Liguori 2005
+
+XEN_ROOT=../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+CONSOLED_INSTALL_DIR = /usr/sbin
+XC_CONSOLE_INSTALL_DIR = /usr/libexec/xen
+
+INSTALL = install
+INSTALL_PROG = $(INSTALL) -m0755
+INSTALL_DIR = $(INSTALL) -d -m0755
+
+CC = gcc
+CFLAGS = -Wall -Werror -g3
+
+CFLAGS += -I $(XEN_XCS)
+CFLAGS += -I $(XEN_LIBXC)
+CFLAGS += -I $(XEN_XENSTORE)
+
+SRCS :=
+SRCS += main.c utils.c io.c
+
+HDRS = $(wildcard *.h)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
+BIN = consoled
+
+all: $(BIN) xc_console
+
+clean:
+ $(RM) *.a *.so *.o *.rpm $(BIN) xc_console
+
+$(BIN): $(OBJS)
+ $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
+ -lxc -lxenstore
+
+xc_console: xc_console.o
+ $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
+ -lxc -lxenstore
+
+$(OBJS): $(HDRS)
+
+install: $(BIN)
+ $(INSTALL_DIR) -p $(DESTDIR)/$(CONSOLED_INSTALL_DIR)
+ $(INSTALL_PROG) $(BIN) $(DESTDIR)/$(CONSOLED_INSTALL_DIR)
+ $(INSTALL_DIR) -p $(DESTDIR)/$(XC_CONSOLE_INSTALL_DIR)
+ $(INSTALL_PROG) xc_console $(DESTDIR)/$(XC_CONSOLE_INSTALL_DIR)
diff -r 1640c137c847 -r 94a4626c2c44 tools/consoled/consoled
--- /dev/null Tue Aug 2 12:18:15 2005
+++ b/tools/consoled/consoled Tue Aug 2 12:18:47 2005
@@ -0,0 +1,371 @@
+ELF L?4 è] 4
( $ ! 4 4?4?à |
|