Commit d071fefb authored by Leigh Stoller's avatar Leigh Stoller

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents 5d6c7af9 a25d63e1
Emulab network testbed source release
Version 5.0
September 1, 2008
University of Utah, Flux Research Group
Welcome to Emulab!
This is the first "official" release of the full current source code for the
software that runs the Emulab network testbed at the University of Utah,
as well as over 20 testbeds at other sites:
This is the "official" source code for the software that runs the Emulab
network testbed at the University of Utah, as well as dozens of testbeds at
other sites around the world.
http://www.emulab.net/
http://www.emulab.net/
This is a snapshot of a rapidly-evolving system. It contains all Emulab
This is a snapshot of a rapidly evolving system. It contains all Emulab
source required to build a running testbed, but interaction with Emulab
admins at Utah and elsewhere will likely be required to get things up
and running.
Emulab is being actively developed, so there may be features in deployed
Emulabs (in particular, Utah's) that are not included in this release.
In the future it is our intention to make new snapshots frequently.
Emulab is also a research project, and is rapidly evolving to satisfy the
needs of both our research needs and external researchers. For that reason,
you might find bugs! We hope you will tell us about them (nicely) and maybe
even help us to fix them. More on this below.
HOW TO SETUP AN EMULAB
The Emulab installation documentation is located on the Utah Emulab Wiki:
http://users.emulab.net/trac/emulab/wiki/InstallRoot
under "Installation Documentation".
https://users.emulab.net/trac/emulab/wiki/InstallRoot
HOW TO UPDATE AN EMULAB
Updating your existing Emulab is a bit harder than a fresh install,
as different sites are running different combinations of FreeBSD,
FreeBSD ports, and Emulab software. A process that we hope will work
for most sites is located on the Utah Emulab Wiki:
http://users.emulab.net/trac/emulab/wiki/InstallRoot
under "Upgrade Documentation".
Updating your existing Emulab is a bit harder than a fresh install, but is
mostly automated. A process that we hope will work for most sites is
located on the Utah Emulab Wiki:
http://users.emulab.net/trac/emulab/wiki/InstallRoot
under "Upgrade Documentation."
TRACKING THE EMULAB SOURCE CODE
We encourage you to track the Emulab source code in real time and stay
current with our stable versions. More info on how to access the
Emulab source code repository is here:
http://users.emulab.net/trac/emulab/wiki/GitRepository
MAILING LISTS
If you are bringing up an Emulab, be sure to join the mailing list:
testbed-admins@flux.utah.edu
http://www.flux.utah.edu/mailman/listinfo/testbed-admins
emulab-admins@googlegroups.com
http://groups.google.com/group/emulab-admins
which has open archives.
Users of your Emulab should join the Emulab users group, which is intended
for all users of Emulabs anywhere, to help each other:
emulab-users@googlegroups.com
http://groups.google.com/group/emulab-users
HELP/CONTACT INFORMATION
For help and to report bugs and problems, mail
testbed-admins@flux.utah.edu (preferable)
or
testbed-ops@flux.utah.edu (if you insist on privacy)
For help and to report bugs and problems, mail to
emulab-admins@googlegroups.com
Don't be shy! In most cases, you will have the same questions other people
have. Search the archives, too! There is lots of good information there.
Don't be shy! We may be able to get on the phone with you, too,
for "big picture" issues and problems.
COPYRIGHT, LICENSE, AND DISTRIBUTION
Emulab is copyrighted by the Flux Research Group and the University of Utah.
LICENSE
See the file AGPL-COPYING for licensing conditions. In summary, the
Emulab software is distributed under a free and open source license, the
GNU Affero General Public License version 3 (AGPLv3). The AGPLv3
consists of the GNU General Public License version 3 (GPLv3) with a
single short added Section 13, which requires that the source be freely
This release of the Emulab software is distributed under the terms of the GNU
Affero General Public License, version 3 (AGPLv3). The AGPLv3 is a popular
open source license; see the file AGPL-COPYING for licensing conditions. The
AGPLv3 consists of the GNU General Public License version 3 (GPLv3) with a
single short addition (Section 13), which requires that the source be freely
available to all users who interact with the software through a network.
The Emulab source tree contains various third-party, open-source packages that
are used by Emulab. These third-party packages are copyrighted and licensed as
described in their source files.
The development of Emulab has been supported by numerous organizations
including NSF, DARPA, Intel, HP, Microsoft, Novell, Nortel, and the University
of Utah. We thank all of these organizations for making Emulab possible.
The following statement is required by DARPA and pertains to DARPA's support
for portions of the Emulab software:
DoD Distribution Statement A: Approved for public release; distribution is
unlimited.
DOCUMENTATION
We are in the process of moving all our documentation to the Utah Emulab
wiki at
http://users.emulab.net/trac/emulab/wiki/ .
Soon, but not yet, that should be considered the primary source of
information.
All of the Emulab documentation is available from the Utah Emulab site:
http://users.emulab.net/trac/emulab/wiki
Within this source tree,
- doc/* contains documentation for developers.
- www/*.html and www/{doc,tutorial}/*.html contain end-user documentation,
all linked from www/doc.php3.
We encourage people to help us improve our documentation. If you want to
make changes, please apply for an account at Utah; anyone with an account
at the Utah Emulab is allowed to edit the Wiki pages.
Other good places to start would include:
- The search box at www.emulab.net for the absolutely latest FAQs and info
- The user tutorial (www/tutorial/tutorial.html)
- The user FAQ (www/faq.html)
- The user authorization document (www/auth.html)
- Software architecture preliminary diagram (doc/arch-diagram.ps)
- Notes on the source tree and architecture (doc/arch.txt)
- Overview of some major systems (doc/overview.txt)
- The doc/papers directory, which contains a few of the papers we've
published about Emulab
- Diagrams and brief explanations of the state machines used in the
system (www/doc/states.html and www/doc/*.gif)
- Mail we have exchanged with others about hardware recommendations
(doc/hardware-mail.mbox)
- The search box at www.emulab.net
- The Emulab Wiki (http://users.emulab.net/trac/emulab/wiki)
- Getting Started document (http://users.emulab.net/trac/emulab/wiki/Auth)
- The user tutorial (http://users.emulab.net/trac/emulab/wiki/Tutorial)
- The user FAQ (http://users.emulab.net/trac/emulab/wiki/FAQ)
- Papers and talks about Emulab (http://www.emulab.net/pubs.php3)
- Papers using Emulab (http://www.emulab.net/expubs.php)
QUICK TOUR
- The Database maintains most testbed state.
* LibDB (db/libdb.pm.in) and the assorted modules (db/*.pm.in) are the
main DB interface for testbed software.
- The database maintains most testbed state.
* Assorted modules (db/*.pm.in) are the main DB interface for testbed
software.
* sql/database-create.sql contains the DB schema.
- The Web Interface (www/*) is the primary means of managing and
interfacing with the system. There is also an experimental
- The Web interface (www/*) is the primary means of managing and
interfacing with the system. There is also an experimental
standalone GUI that uses this interface.
- The tbsetup and backend directories contain the bulk of the server-side
experiment setup and management code.
* startexp (tbsetup/startexp.in) is the backend for experiment creation;
Important scripts it calls include tbprerun (tbsetup/tbprerun.in)
* startexp (tbsetup/startexp.in) is the back end for experiment creation.
Important scripts it calls include tbprerun (tbsetup/tbprerun.in)
and tbswap (tbsetup/tbswap.in).
* ns2ir (tbsetup/ns2ir/*) converts NS files to DB state (via TCL and XML).
* snmpit (tbsetup/snmpit.in) configures VLANs on switch hardware.
- assign (assign/*) maps experiments to available hardware.
- The frisbee subsystem (os/frisbee.redux, os/imagezip) is used for creation
and rapid deployment of disk images.
- The frisbee subsystem (os/frisbee.redux, os/imagezip) is used for the
creation and rapid deployment of disk images.
- The client-driven node configuration is handled by scripts on the client
which communicate with the server via a custom configuration protocol.
......@@ -123,12 +139,12 @@ SOURCE TREE ORGANIZATION
account - Account creation and management
apache - Apache HTTPD configuration
assign - Resource allocation software
backend - Server-side of the Emulab XML RPC interface
backend - Server-side of the Emulab XML-RPC interface
bugdb - Optional per-project bug database
capture - Node serial line server software
cdrom - Software related to CD-booting local and remote machines
collab - Optional per-project "collaboration" tools: CVS, jabber, mailman
db - Variety of interfaces to testbed state
db - Variety of interfaces to testbed state
delay - RHL9 patches for supporting "end-node" traffic shaping
dhcpd - DHCPD configuration
doc - Documentation (mainly internal)
......@@ -144,7 +160,7 @@ mote - Initial testbed support for Berkeley/Crossbow motes
named - BIND configuration files
os - Client-side software (disk loading, route calculation, etc.)
patches - Patches needed to compile standard software packages
pelab - Preliminary support for "Flexlab", an Emulab/PlanetLab hybrid
pelab - Preliminary support for "Flexlab," an Emulab/PlanetLab hybrid
(see http://www.cs.utah.edu/flux/flexlab/)
protogeni - Evolving software for a prototype GENI system based on Emulab
(see http://www.protogeni.net/)
......@@ -163,31 +179,9 @@ tmcd - Testbed master control daemon and client (for node configuration)
tools - Miscellaneous infrastructure tools
utils - Testbed configuration and maintenance tools
vis - Experiment visualization
wiki - Support for per-project WIKIs
wiki - Support for per-project Wikis
www - Web Interface / User Documentation
xmlrpc - Programatic XML-RPC interface to testbed
UPGRADING FROM the 4.9.0 RELEASE
There are a surprising number of differences given that we have only
advanced 0.1 in version! In a nutshell:
* Updated FreeBSD packages from FreeBSD 6.1-era to 6.3-era
* Much more of the documentation has moved into the Wiki
* Changes to the (unused) "protogeni" code
* Improvements to the installation scripts
* Integration of code/fixes from Keith Sklower and DETER (Thanks!)
* Assorted fixes
If you did install the 4.9 release on FreeBSD 6.3, and want to upgrade
to 5.0 (you should), it should be straightforward. You will need to apply
the sql/database-migrate.txt changes 4.157 to 4.160 (which are all trivial)
and rebuild and reinstall your Emulab software.
It would be good to also update your ports. In theory, this is all handled
by a magic script we provide. Refer to the "Update ports" section of
http://users.emulab.net/trac/emulab/wiki/appendix/upgrade-410-63.html
Good luck!
Jay Lepreau, lepreau@cs.utah.edu, and the Utah testbed crew.
September 1, 2008
The Emulab Team
......@@ -2143,6 +2143,7 @@ else
event/etc/elvind-boss.conf event/etc/elvind-ops.conf \
event/etc/elvind-inetd.conf event/etc/GNUmakefile\
event/sched/GNUmakefile \
event/new_sched/GNUmakefile \
event/tbgen/GNUmakefile \
event/example/GNUmakefile event/example/tbsend.pl \
event/example/tbrecv.pl event/example/tbsend-short.pl \
......@@ -2639,7 +2640,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
lib/GNUmakefile lib/libtb/GNUmakefile \
os/GNUmakefile os/split-image.sh os/imagezip/GNUmakefile \
os/imagezip/ffs/GNUmakefile os/imagezip/extfs/GNUmakefile os/imagezip/ext4fs/GNUmakefile \
os/imagezip/shd/GNUmakefile os/imagezip/hashmap/GNUmakefile \
os/imagezip/hashmap/GNUmakefile \
os/frisbee.redux/GNUmakefile os/growdisk/GNUmakefile \
os/syncd/GNUmakefile os/dijkstra/GNUmakefile \
os/genhostsfile/GNUmakefile os/zapdisk/GNUmakefile \
......
......@@ -691,6 +691,7 @@ else
event/etc/elvind-boss.conf event/etc/elvind-ops.conf \
event/etc/elvind-inetd.conf event/etc/GNUmakefile\
event/sched/GNUmakefile \
event/new_sched/GNUmakefile \
event/tbgen/GNUmakefile \
event/example/GNUmakefile event/example/tbsend.pl \
event/example/tbrecv.pl event/example/tbsend-short.pl \
......@@ -875,7 +876,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
lib/GNUmakefile lib/libtb/GNUmakefile \
os/GNUmakefile os/split-image.sh os/imagezip/GNUmakefile \
os/imagezip/ffs/GNUmakefile os/imagezip/extfs/GNUmakefile os/imagezip/ext4fs/GNUmakefile \
os/imagezip/shd/GNUmakefile os/imagezip/hashmap/GNUmakefile \
os/imagezip/hashmap/GNUmakefile \
os/frisbee.redux/GNUmakefile os/growdisk/GNUmakefile \
os/syncd/GNUmakefile os/dijkstra/GNUmakefile \
os/genhostsfile/GNUmakefile os/zapdisk/GNUmakefile \
......
......@@ -20,7 +20,7 @@ endif
ifeq ($(SYSTEM),FreeBSD)
FBSDREL := $(shell uname -r | sed -e 's/\([^-][^-]*\)-.*/\1/')
FBSDMAJ := $(basename $(FBSDREL))
SUBDIRS += sched stated
SUBDIRS += sched new_sched stated
ifneq ($(FBSDMAJ),8)
# doesn't build right now due to API changes
SUBDIRS += delay-agent
......@@ -44,6 +44,7 @@ etc-subdir:
install:
@$(MAKE) -C lib install
@$(MAKE) -C sched install
@$(MAKE) -C new_sched install
@$(MAKE) -C tbgen install
@$(MAKE) -C stated install
@$(MAKE) -C linktest install
......@@ -57,6 +58,7 @@ control-install:
@$(MAKE) -C lib control-install
@$(MAKE) -C tbgen control-install
@$(MAKE) -C sched control-install
@$(MAKE) -C new_sched control-install
@$(MAKE) -C linktest control-install
@$(MAKE) -C program-agent control-install
@$(MAKE) -C proxy control-install
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = event/new_sched
include $(OBJDIR)/Makeconf
all: event-sched_rrpc
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -g -pthread -DBINDIR='"$(INSTALL_BINDIR)"'
CFLAGS += -DSBINDIR='"$(INSTALL_SBINDIR)"'
#CFLAGS += -DDEBUG
CFLAGS += -O -Wall
CFLAGS += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb
CFLAGS += -I/usr/local/include
LDFLAGS += -pthread
LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb
LDFLAGS += $(LDSTATIC)
DBLIBS = -L/usr/local/lib/mysql -lmysqlclient -lz
LIBS += -levent_r -ltb -lz
XMLRPCINC = `xmlrpc-c-config c++2 client --cflags`
CXXFLAGS += -pthread -O $(XMLRPCINC) -I$(OBJDIR) -I$(TESTBED_SRCDIR)/lib/libtb
CXXFLAGS += -I$(SRCDIR)/../lib
XMLRPCLIBS = `xmlrpc-c-config c++2 client --libs`
#
# XXX elvin-config adds -lc which is rather bogus, and messes up -pthread
# build on freebsd. I made a vain attempt to filter it out, but
# gave up quickly. Deal with it later.
#
#LIBS += `elvin-config --libs vin4mt`
LIBS += -L/usr/local/lib -lpubsub_r -lssl -lcrypto -lm
OBJS = event-sched.o
version.c: event-sched.c
echo >$@ "char build_info[] = \"Built on `date +%d-%b-%Y` by `id -nu`@`hostname | sed 's/\..*//'`:`pwd`\";"
OBJS = \
emulab_proxy.o \
console-agent.o \
error-record.o \
event-sched_rpc.o \
group-agent.o \
listNode.o \
local-agent.o \
node-agent.o \
queue.o \
rrpc.o \
simulator-agent.o \
timeline-agent.o \
version.o
event-sched_rrpc: $(OBJS) event-sched.h ../lib/libevent.a
$(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(XMLRPCLIBS) $(LIBS)
DEPS = \
console-agent.h error-record.h event-sched.h group-agent.h listNode.h \
local-agent.h node-agent.h rpc.h simulator-agent.h timeline-agent.h \
../lib/event.h
emulab_proxy.o: emulab_proxy.cc $(DEPS)
queue.o: queue.c $(DEPS)
listNode.o: listNode.c $(DEPS)
error-record.o: error-record.c $(DEPS)
local-agent.o: local-agent.c $(DEPS)
group-agent.o: group-agent.c $(DEPS)
simulator-agent.o: simulator-agent.cc $(DEPS)
console-agent.o: console-agent.cc $(DEPS)
node-agent.o: node-agent.cc $(DEPS)
event-sched_rpc.o: event-sched.c $(DEPS)
$(CC) $(CFLAGS) -DRPC -c -o $@ $<
rpc.o: rpc.cc rpc.h event-sched.h
$(CXX) $(CXXFLAGS) -DSSHRPC $(XMLRPCINC) -c $<
rrpc.o: rpc.cc $(DEPS)
$(CXX) -g $(CXXFLAGS) -DSSLRPC $(XMLRPCINC) -c -o rrpc.o $<
install: event-sched_rrpc
-mkdir -p $(INSTALL_DIR)/opsdir/sbin
$(INSTALL_PROGRAM) $< $(INSTALL_DIR)/opsdir/sbin/new-event-sched
-mkdir -p $(INSTALL_DIR)/opsdir/man/man8
$(INSTALL) -m 0644 $(SRCDIR)/event-sched.8 \
$(INSTALL_DIR)/opsdir/man/man8/event-sched.8
-mkdir -p $(INSTALL_DIR)/opsdir/bin
$(INSTALL_PROGRAM) $(SRCDIR)/elog2xplot \
$(INSTALL_DIR)/opsdir/bin/elog2xplot
control-install: event-sched_rrpc
$(INSTALL_PROGRAM) $< $(INSTALL_SBINDIR)/new-event-sched
# not a client thing
client:
client-install: client
clean:
/bin/rm -f *.o event-sched event-sched_rpc event-sched_rrpc version.c
#
# EMULAB-COPYRIGHT
# Copyright (c) 2002 University of Utah and the Flux Group.
# All rights reserved.
#
# Makefile for building event scheduler
#
# $Id: Makefile,v 1.5 2006-12-01 22:59:37 mike Exp $
CC = gcc
CFLAGS = -g -I. -I../lib -Wall -DDEBUG
LDFLAGS =
LIBS = -lpthread -L../lib -levent
CFLAGS += `elvin-config --cflags vin4mt`
LIBS += `elvin-config --libs vin4mt`
MV = mv -f
RM = rm -f
program = event-sched
source = event-sched.c queue.c
object = event-sched.o queue.o
header = event-sched.h
.c.o:
$(CC) $(CFLAGS) -c $<
default: $(program)
$(program): $(object)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(LIBS)
$(program): ../lib/libevent.a
$(object): $(header) ../lib/event.h
clean:
$(RM) $(program) $(object)
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2004, 2005, 2007 University of Utah and the Flux Group.
* All rights reserved.
*/
#include "config.h"
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <unistd.h>
#include <string.h>
#include "console-agent.h"
#ifndef min
#define min(x, y) ((x) < (y)) ? (x) : (y)
#endif
/**
* A "looper" function for console agents that dequeues and processes events
* for a particular console. This function will be passed to pthread_create
* when a new thread needs to be created to handle events.
*
* @param arg The console agent object to handle events for.
* @return NULL
*
* @see reload_with
* @see do_reboot
* @see local_agent_queue
* @see local_agent_dequeue
*/
static void *console_agent_looper(void *arg);
console_agent_t create_console_agent(void)
{
console_agent_t ca, retval;
if ((ca = (console_agent_t)
malloc(sizeof(struct _console_agent))) == NULL) {
retval = NULL;
errno = ENOMEM;
}
else if (local_agent_init(&ca->ca_local_agent) != 0) {
retval = NULL;
}
else {
ca->ca_local_agent.la_flags |= LAF_MULTIPLE;
ca->ca_local_agent.la_looper = console_agent_looper;
ca->ca_mark = -1;
retval = ca;
ca = NULL;
}
free(ca);
ca = NULL;
return retval;
}
int console_agent_invariant(console_agent_t ca)
{
assert(ca != NULL);
assert(local_agent_invariant(&ca->ca_local_agent));
}
static void do_start(console_agent_t ca, sched_event_t *se)
{
int lpc;
assert(ca != NULL);
assert(console_agent_invariant(ca));
assert(se != NULL);
for (lpc = 0; lpc < se->length; lpc++) {
char path[MAXPATHLEN];
struct agent *agent;
struct stat st;
if (se->length == 1)
agent = se->agent.s;
else
agent = se->agent.m[lpc];
snprintf(path, sizeof(path),
"%s/%s.run",
TIPLOGDIR, agent->nodeid);
if (stat(path, &st) < 0) {
error("could not stat %s\n", path);
}
else {
ca = (console_agent_t)agent->handler;
ca->ca_mark = st.st_size;
}
}
}
static void do_stop(console_agent_t ca, sched_event_t *se, char *args)
{
char *filename;
int rc, lpc;
assert(ca != NULL);
assert(console_agent_invariant(ca));
assert(se != NULL);
assert(args != NULL);
if (ca->ca_mark == -1) {
error("CONSOLE STOP event without a START");
return;
}
if ((rc = event_arg_get(args, "FILE", &filename)) < 0) {
error("no filename given in CONSOLE STOP event");
return;
}
filename[rc] = '\0';
for (lpc = 0; lpc < se->length; lpc++) {
char path[MAXPATHLEN], outpath[MAXPATHLEN];
int infd = -1, outfd = -1;
struct agent *agent;
size_t end_mark;
struct stat st;
if (se->length == 1)
agent = se->agent.s;
else
agent = se->agent.m[lpc];
snprintf(path, sizeof(path),
"%s/%s.run",
TIPLOGDIR, agent->nodeid);
if (stat(path, &st) < 0) {
error("could not stat %s\n", path);
ca->ca_mark = -1;
continue;
}
snprintf(outpath, sizeof(outpath),
"logs/%s-%s.log",
agent->name,
filename);
ca = (console_agent_t)agent->handler;
end_mark = st.st_size;
if ((infd = open(path, O_RDONLY)) < 0) {
error("could not open %s\n", path);
}
else if (lseek(infd, ca->ca_mark, SEEK_SET) < 0) {
error("could not seek to right place\n");
}
else if ((outfd = open(outpath,
O_WRONLY|O_CREAT|O_TRUNC,
0640)) < 0) {
error("could not create output file\n");
}
else {
size_t remaining = end_mark - ca->ca_mark;
char buffer[4096];
while ((rc = read(infd,
buffer,
min(remaining,
sizeof(buffer)))) > 0) {
write(outfd, buffer, rc);
remaining -= rc;
}
}
if (infd != -1)
close(infd);
if (outfd != -1)
close(outfd);
ca->ca_mark = -1;
}
}
static void *console_agent_looper(void *arg)
{
console_agent_t ca = (console_agent_t)arg;
event_handle_t handle;
void *retval = NULL;
sched_event_t se;
assert(arg != NULL);
handle = ca->ca_local_agent.la_handle;
while (local_agent_dequeue(&ca->ca_local_agent, 0, &se) == 0) {
char evtype[TBDB_FLEN_EVEVENTTYPE];
event_notification_t en;
char argsbuf[BUFSIZ];
en = se.notification;
if (!event_notification_get_eventtype(
handle, en, evtype, sizeof(evtype))) {
error("couldn't get event type from notification %p\n",
en);
}
else {
struct agent **agent_array, *agent_singleton[1];
int rc, lpc, token = ~0;
event_notification_get_arguments(handle,
en,
argsbuf,
sizeof(argsbuf));
event_notification_get_int32(handle,
en,
"TOKEN",
(int32_t *)&token);
argsbuf[sizeof(argsbuf) - 1] = '\0';
if (strcmp(evtype, TBDB_EVENTTYPE_START) == 0) {
do_start(ca, &se);
}
else if (strcmp(evtype, TBDB_EVENTTYPE_STOP) == 0) {
do_stop(ca, &se, argsbuf);
}
else {
error("cannot handle CONSOLE event %s.",
evtype);
rc = -1;
}
}
sched_event_free(handle, &se);
}
return retval;
}
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2005 University of Utah and the Flux Group.
* All rights reserved.
*/
/**
* @file console-agent.h
*/
#ifndef _console_agent_h
#define _console_agent_h
#include "event-sched.h"
#include "local-agent.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TIPLOGDIR "/var/log/tiplogs"
/**
* A local agent structure for Console objects.
*/
struct _console_agent {
struct _local_agent ca_local_agent; /*< Local agent base. */
off_t ca_mark;
};
/**
* Pointer type for the _console_agent structure.
*/
typedef struct _console_agent *console_agent_t;
/**
* Create a console agent and intialize it with the default values.
*
* @return An initialized console agent object.
*/
console_agent_t create_console_agent(void);