Commit 62d58e06 authored by Leigh Stoller's avatar Leigh Stoller

Lots of copyrights, but also removed lots of obsolete files instead

of adding copyrights to them.
parent 0695d946
# #
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
# Testbed Makefile # Testbed Makefile
# #
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
# #
# Insert Copyright Here. # EMULAB-COPYRIGHT
# # Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
# Get rid of a bunch of nasty built-in implicit rules, # Get rid of a bunch of nasty built-in implicit rules,
# to avoid bogus circular dependencies and make things go faster. # to avoid bogus circular dependencies and make things go faster.
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
# #
# Most of the configure-substitution magic is done here. # Most of the configure-substitution magic is done here.
# All the other makefiles in the NodeOS include # All the other makefiles in the NodeOS include
......
#!/bin/sh #!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003-2006 University of Utah and the Flux Group.
# All rights reserved.
#
# Found on the internet, and customized for Emulab # Found on the internet, and customized for Emulab
# #
......
# #
# EMULAB-COPYRIGHT
# Copyright (c) 2002-2006 University of Utah and the Flux Group.
# All rights reserved.
#
#
# For installation only. # For installation only.
# #
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004-2006 University of Utah and the Flux Group.
# All rights reserved.
#
from Mailman import mm_cfg from Mailman import mm_cfg
from Mailman import MailList from Mailman import MailList
from Mailman import Utils from Mailman import Utils
......
# Makefile for building event system
#
# $Id: Makefile,v 1.1 2001-11-01 18:48:50 imurdock Exp $
subdirs = lib sched test
default clean:
for dir in $(subdirs); \
do \
( cd $$dir && make $@ ); \
done
# Makefile for building event library
#
# $Id: Makefile,v 1.2 2002-02-19 15:45:24 imurdock Exp $
CC = gcc
CFLAGS = -g -I. -Wall -DDEBUG
CFLAGS += `elvin-config --cflags vin4mt`
AR = ar
MV = mv -f
RANLIB = ranlib
RM = rm -f
library = libevent.a
source = event.c util.c
object = event.o util.o
header = event.h
.c.o:
$(CC) $(CFLAGS) -c $<
default: $(library)
$(library): $(object)
$(AR) crv $@ $^
$(RANLIB) $@
$(object): $(header)
clean:
$(RM) $(library) $(object)
# #
# CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG # CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG
# #
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
# For now, this has to get cat'ed onto the end of event.pm, since it # For now, this has to get cat'ed onto the end of event.pm, since it
# doesn't seem possible to get SWIG to just pass it through into the # doesn't seem possible to get SWIG to just pass it through into the
# output file # output file
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
# #
# CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG # CODE PAST THIS POINT WAS NOT AUTOMATICALLY GENERATED BY SWIG
# #
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
# For now, this has to get cat'ed onto the end of tbevent.py, since it # For now, this has to get cat'ed onto the end of tbevent.py, since it
# doesn't seem possible to get SWIG to just pass it through into the # doesn't seem possible to get SWIG to just pass it through into the
# output file # output file
......
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = event/test
include $(OBJDIR)/Makeconf
TESTS = test-consume \
test-produce \
test-attr-consume \
test-attr-produce \
test-queue \
test-sched-produce
all: $(TESTS)
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -O -g -static -I. -I$(SRCDIR)/../lib -Wall -pthread -DDEBUG
CFLAGS += `elvin-config --cflags vin4mt`
LDFLAGS += -pthread -L../lib
LIBS += -levent -lcipher -lc_r
#
# 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 -lvin4mt -lvin4c -lvin4 -lssl -lcrypto -lm
%: %.c
$(CC) $(LDFLAGS) -o $@ $(CFLAGS) $< $(LIBS)
$(TESTS): ../lib/libevent.a ../lib/event.h
clean:
/bin/rm -f *.o event-sched
# Makefile for building event system tests
#
# $Id: Makefile,v 1.5 2002-02-19 15:51:01 imurdock 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
tests = test-consume \
test-produce \
test-attr-consume \
test-attr-produce \
test-queue \
test-sched-produce
%: %.c
$(CC) $(LDFLAGS) -o $@ $(CFLAGS) $< $(LIBS) $(LIBS)
default: $(tests)
test-queue: ../sched/queue.c
$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -DTEST_EVENT_QUEUES -I../sched \
$< $(LIBS) $(LIBS)
$(tests): ../lib/libevent.a
clean:
$(RM) $(tests)
/* test-attr-consume.c: Test delivery of events, with attributes (consumer). */
#include "event.h"
static void callback(event_handle_t handle, event_notification_t notification,
char *host, event_type_t type, void *data);
int
main(int argc, char **argv)
{
event_handle_t handle;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register(server, 0);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
}
/* Subscribe to the test event: */
if (event_subscribe(handle, callback, EVENT_TEST, "event received")
== NULL)
{
ERROR("could not subscribe to test event\n");
return 1;
}
/* Begin the event loop, waiting to receive event notifications: */
event_main(handle);
/* Unregister with the event system: */
if (event_unregister(handle) == 0) {
ERROR("could not unregister with event system\n");
return 1;
}
return 0;
}
static void
callback(event_handle_t handle, event_notification_t notification, char *host,
event_type_t type, void *data)
{
double attr_double;
int32_t attr_int32;
int64_t attr_int64;
char attr_string[64];
struct timeval attr_opaque;
TRACE("data: %s\n", (char *) data);
TRACE("host: %s\n", host);
TRACE("type: %d\n", type);
if (event_notification_get_double(handle, notification, "double",
&attr_double)
== 0)
{
ERROR("could not get double attribute\n");
return;
}
TRACE("double: %f\n", attr_double);
if (event_notification_get_int32(handle, notification, "int32",
&attr_int32)
== 0)
{
ERROR("could not get int32 attribute\n");
return;
}
TRACE("int32: %d\n", attr_int32);
if (event_notification_get_int64(handle, notification, "int64",
&attr_int64)
== 0)
{
ERROR("could not get int64 attribute\n");
return;
}
TRACE("int64: %lld\n", attr_int64);
if (event_notification_get_opaque(handle, notification, "opaque",
&attr_opaque, sizeof(attr_opaque))
== 0)
{
ERROR("could not get opaque attribute\n");
return;
}
TRACE("opaque: (tv_sec=%ld, tv_usec=%ld)\n",
attr_opaque.tv_sec,
attr_opaque.tv_usec);
if (event_notification_get_string(handle, notification, "string",
attr_string, 64)
== 0)
{
ERROR("could not get string attribute\n");
return;
}
TRACE("string: \"%s\"\n", attr_string);
}
/* test-attr-produce.c: Test delivery of events, with attributes (producer). */
#include "event.h"
int
main(int argc, char **argv)
{
event_handle_t handle;
event_notification_t notification;
char *server = NULL;
int c;
struct timeval time;
/* Get current time: */
gettimeofday(&time, NULL);
TRACE("time.tv_sec = %ld, time.tv_usec = %ld\n",
time.tv_sec,
time.tv_usec);
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register(server, 0);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
}
/* Generate a test event, with some attributes: */
notification = event_notification_alloc(handle, EVENT_HOST_ANY,
EVENT_TEST);
if (notification == NULL) {
ERROR("could not allocate notification\n");
return 1;
}
if (event_notification_put_double(handle, notification, "double", 1.23)
== 0)
{
ERROR("could not put double attribute\n");
return 1;
}
if (event_notification_put_int32(handle, notification, "int32", 123)
== 0)
{
ERROR("could not put int32 attribute\n");
return 1;
}
if (event_notification_put_int64(handle, notification, "int64",
100000000000)
== 0)
{
ERROR("could not put int64 attribute\n");
return 1;
}
if (event_notification_put_opaque(handle, notification, "opaque", &time,
sizeof(time))
== 0)
{
ERROR("could not put opaque attribute\n");
return 1;
}
if (event_notification_put_string(handle, notification, "string", "foo")
== 0)
{
ERROR("could not put string attribute\n");
return 1;
}
if (event_notify(handle, notification) == 0) {
ERROR("could not send test event notification\n");
return 1;
}
event_notification_free(handle, notification);
/* Unregister with the event system: */
if (event_unregister(handle) == 0) {
ERROR("could not unregister with event system\n");
return 1;
}
return 0;
}
/* test-consume.c: Test delivery of events (consumer). */
#include "event.h"
static void callback(event_handle_t handle, event_notification_t notification,
char *host, event_type_t type, void *data);
int
main(int argc, char **argv)
{
event_handle_t handle;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register(server, 0);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
}
/* Subscribe to the test event: */
if (event_subscribe(handle, callback, EVENT_TEST, "event received")
== NULL)
{
ERROR("could not subscribe to test event\n");
return 1;
}
/* Begin the event loop, waiting to receive event notifications: */
event_main(handle);
/* Unregister with the event system: */
if (event_unregister(handle) == 0) {
ERROR("could not unregister with event system\n");
return 1;
}
return 0;
}
static void
callback(event_handle_t handle, event_notification_t notification, char *host,
event_type_t type, void *data)
{
TRACE("data: %s\n", (char *) data);
TRACE("host: %s\n", host);
TRACE("type: %d\n", type);
}
/* test-produce.c: Test delivery of events (producer). */
#include "event.h"
int
main(int argc, char **argv)
{
event_handle_t handle;
event_notification_t notification;
char *server = NULL;
int c;
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register(server, 0);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
}
/* Generate a test event: */
notification = event_notification_alloc(handle, EVENT_HOST_ANY,
EVENT_TEST);
if (notification == NULL) {
ERROR("could not allocate notification\n");
return 1;
}
if (event_notify(handle, notification) == 0) {
ERROR("could not send test event notification\n");
return 1;
}
event_notification_free(handle, notification);
/* Unregister with the event system: */
if (event_unregister(handle) == 0) {
ERROR("could not unregister with event system\n");
return 1;
}
return 0;
}
/* test-sched-produce.c: Test event scheduler, with attributes (producer).
This test may be used with test-consume or test-attr-consume. */
#include "event.h"
int
main(int argc, char **argv)
{
event_handle_t handle;
event_notification_t notification;
char *server = NULL;
int c;
struct timeval time;
/* Get current time: */
gettimeofday(&time, NULL);
TRACE("time.tv_sec = %ld, time.tv_usec = %ld\n",
time.tv_sec,
time.tv_usec);
while ((c = getopt(argc, argv, "s:")) != -1) {
switch (c) {
case 's':
server = optarg;
break;
default:
fprintf(stderr, "Usage: %s [-s SERVER]\n", argv[0]);
return 1;
}
}
/* Register with the event system: */
handle = event_register(server, 0);
if (handle == NULL) {
ERROR("could not register with event system\n");
return 1;
}
/* Generate a test event, with some attributes: */
notification = event_notification_alloc(handle, EVENT_HOST_ANY,
EVENT_TEST);
if (notification == NULL) {
ERROR("could not allocate notification\n");
return 1;
}
if (event_notification_put_double(handle, notification, "double", 1.23)
== 0)
{
ERROR("could not put double attribute\n");
return 1;
}
if (event_notification_put_int32(handle, notification, "int32", 123)
== 0)
{
ERROR("could not put int32 attribute\n");
return 1;
}
if (event_notification_put_int64(handle, notification, "int64",
100000000000)
== 0)
{
ERROR("could not put int64 attribute\n");
return 1;
}
if (event_notification_put_opaque(handle, notification, "opaque", &time,
sizeof(time))
== 0)
{
ERROR("could not put opaque attribute\n");
return 1;
}
if (event_notification_put_string(handle, notification, "string", "foo")
== 0)
{
ERROR("could not put string attribute\n");
return 1;
}
/* Schedule the event to fire in 5 seconds: */
time.tv_sec += 5;
if (event_schedule(handle, notification, &time) == 0) {
ERROR("could not send test event notification\n");
return 1;
}
event_notification_free(handle, notification);
/* Unregister with the event system: */
if (event_unregister(handle) == 0) {
ERROR("could not unregister with event system\n");
return 1;
}
return 0;
}
# #
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
# For installation. # For installation.
# #
SRCDIR = @srcdir@ SRCDIR = @srcdir@
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@ SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = .. OBJDIR = ..
......
# #
# Insert Copyright Here. # EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
# #
SRCDIR = @srcdir@ SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@ TESTBED_SRCDIR = @top_srcdir@
......
...@@ -112,9 +112,6 @@ HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.html) ...@@ -112,9 +112,6 @@ HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.html)
HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.jpg) HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.jpg)
HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.gif) HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.gif)
SDRFILES = $(wildcard $(SRCDIR)/sdr/*.php3)
SDRFILES += $(wildcard $(SRCDIR)/sdr/*.html)
TTFILES = $(wildcard $(SRCDIR)/timetree/*.png) TTFILES = $(wildcard $(SRCDIR)/timetree/*.png)
TTFILES += $(wildcard $(SRCDIR)/timetree/*.js) TTFILES += $(wildcard $(SRCDIR)/timetree/*.js)
TTFILES += $(wildcard $(SRCDIR)/timetree/*.css) TTFILES += $(wildcard $(SRCDIR)/timetree/*.css)
...@@ -172,7 +169,6 @@ ALLOPSCVSWEB = $(notdir $(OPSCVSWEBFILES)) ...@@ -172,7 +169,6 @@ ALLOPSCVSWEB = $(notdir $(OPSCVSWEBFILES))
ALLBUI = $(notdir $(BUIFILES)) ALLBUI = $(notdir $(BUIFILES))
ALLNL = $(notdir $(NLFILES)) ALLNL = $(notdir $(NLFILES))
ALLHY = $(notdir $(HYFILES)) ALLHY = $(notdir $(HYFILES))
ALLSDR = $(notdir $(SDRFILES))
ALLTT = $(notdir $(TTFILES)) ALLTT = $(notdir $(TTFILES))
ALLJS = $(notdir $(JSFILES)) ALLJS = $(notdir $(JSFILES))
ALLROBO = $(notdir $(ROBOTRACKFILES)) ALLROBO = $(notdir $(ROBOTRACKFILES))
...@@ -189,7 +185,6 @@ INSTALLFILES = $(addprefix $(INSTALL_SBINDIR)/, htmlinstall) \ ...@@ -189,7 +185,6 @@ INSTALLFILES = $(addprefix $(INSTALL_SBINDIR)/, htmlinstall) \
$(addprefix $(INSTALL_WWWDIR)/buildui/, $(ALLBUI)) \ $(addprefix $(INSTALL_WWWDIR)/buildui/, $(ALLBUI)) \
$(addprefix $(INSTALL_WWWDIR)/netlab/, $(ALLNL)) \ $(addprefix $(INSTALL_WWWDIR)/netlab/, $(ALLNL)) \
$(addprefix $(INSTALL_WWWDIR)/hyperviewer/, $(ALLHY)) \ $(addprefix $(INSTALL_WWWDIR)/hyperviewer/, $(ALLHY)) \
$(addprefix $(INSTALL_WWWDIR)/sdr/, $(ALLSDR)) \
$(addprefix $(INSTALL_WWWDIR)/timetree/, $(ALLTT)) \ $(addprefix $(INSTALL_WWWDIR)/timetree/, $(ALLTT)) \
$(addprefix $(INSTALL_WWWDIR)/js/, $(ALLJS)) \ $(addprefix $(INSTALL_WWWDIR)/js/, $(ALLJS)) \
$(addprefix $(INSTALL_WWWDIR)/robotrack/, $(ALLROBO)) \ $(addprefix $(INSTALL_WWWDIR)/robotrack/, $(ALLROBO)) \
......