Commit 56f24f9b authored by Leigh B. Stoller's avatar Leigh B. Stoller

Merge noelvin branch to the head.

parent 0d577bf1
...@@ -79,6 +79,7 @@ CLIENT_MANDIR = @CLIENT_MANDIR@ ...@@ -79,6 +79,7 @@ CLIENT_MANDIR = @CLIENT_MANDIR@
LOG_TESTBED = @LOG_TESTBED@ LOG_TESTBED = @LOG_TESTBED@
EVENTSYS = @EVENTSYS@ EVENTSYS = @EVENTSYS@
ELVIN_COMPAT = @ELVIN_COMPAT@
HAVE_MEZZANINE = @HAVE_MEZZANINE@ HAVE_MEZZANINE = @HAVE_MEZZANINE@
GTK_CONFIG = @GTK_CONFIG@ GTK_CONFIG = @GTK_CONFIG@
BRAINSTEM_DIR = @BRAINSTEM_DIR@ BRAINSTEM_DIR = @BRAINSTEM_DIR@
......
/* /*
* EMULAB-COPYRIGHT * EMULAB-COPYRIGHT
* Copyright (c) 2005 University of Utah and the Flux Group. * Copyright (c) 2005, 2007 University of Utah and the Flux Group.
* All rights reserved. * All rights reserved.
*/ */
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <rpc/rpc.h>
#include <netdb.h> #include <netdb.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
...@@ -71,7 +72,7 @@ int ...@@ -71,7 +72,7 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int sock, ch, rc, retval = EXIT_FAILURE; int sock, ch, rc, retval = EXIT_FAILURE;
int length, port = SERVERPORT; int port = SERVERPORT;
char *server = BOSSNODE; char *server = BOSSNODE;
struct sockaddr_in sin; struct sockaddr_in sin;
whoami_t whoami; whoami_t whoami;
......
/* /*
* EMULAB-COPYRIGHT * EMULAB-COPYRIGHT
* Copyright (c) 2000-2003, 2005, 2006 University of Utah and the Flux Group. * Copyright (c) 2000-2003, 2005, 2006, 2007 University of Utah and the Flux Group.
* All rights reserved. * All rights reserved.
*/ */
...@@ -49,7 +49,7 @@ main(int argc, char **argv) ...@@ -49,7 +49,7 @@ main(int argc, char **argv)
MYSQL_RES *res; MYSQL_RES *res;
MYSQL_ROW row; MYSQL_ROW row;
int tcpsock, ch; int tcpsock, ch;
int length, i, err = 0; int length, i;
struct sockaddr_in name; struct sockaddr_in name;
struct timeval timeout; struct timeval timeout;
struct group *group; struct group *group;
...@@ -134,8 +134,7 @@ main(int argc, char **argv) ...@@ -134,8 +134,7 @@ main(int argc, char **argv)
int clientsock, length = sizeof(client); int clientsock, length = sizeof(client);
int cc, port; int cc, port;
whoami_t whoami; whoami_t whoami;
unsigned char buf[BUFSIZ], node_id[64]; unsigned char node_id[64];
secretkey_t secretkey;
tipowner_t tipown; tipowner_t tipown;
void *reply = &tipown; void *reply = &tipown;
size_t reply_size = sizeof(tipown); size_t reply_size = sizeof(tipown);
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#undef BOSSEVENTPORT #undef BOSSEVENTPORT
#undef WINSUPPORT #undef WINSUPPORT
#undef OPSDBSUPPORT #undef OPSDBSUPPORT
#undef ELVIN_COMPAT
#undef HAVE_SRANDOMDEV #undef HAVE_SRANDOMDEV
......
...@@ -1446,6 +1446,7 @@ done ...@@ -1446,6 +1446,7 @@ done
# #
...@@ -1510,7 +1511,7 @@ STAMPS=0 ...@@ -1510,7 +1511,7 @@ STAMPS=0
ARCHIVESUPPORT=0 ARCHIVESUPPORT=0
NFSTRACESUPPORT=0 NFSTRACESUPPORT=0
TBLOGFACIL="local5" TBLOGFACIL="local5"
BOSSEVENTPORT=2927 BOSSEVENTPORT=16505
UNIFIED_BOSS_AND_OPS=0 UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6" FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564 FRISEBEEMCASTPORT=3564
...@@ -1518,6 +1519,7 @@ MIN_UNIX_UID=10000 ...@@ -1518,6 +1519,7 @@ MIN_UNIX_UID=10000
MIN_UNIX_GID=6000 MIN_UNIX_GID=6000
DELAYTHRESH=2 DELAYTHRESH=2
PELABSUPPORT=0 PELABSUPPORT=0
ELVIN_COMPAT=0
# #
# XXX You really don't want to change these! # XXX You really don't want to change these!
...@@ -1713,6 +1715,13 @@ EOF ...@@ -1713,6 +1715,13 @@ EOF
fi fi
if test $ELVIN_COMPAT -eq 1; then
cat >> confdefs.h <<EOF
#define ELVIN_COMPAT 1
EOF
fi
if test $PLABSUPPORT -eq 1; then if test $PLABSUPPORT -eq 1; then
if test "$PLAB_ROOTBALL" = "change.me"; then if test "$PLAB_ROOTBALL" = "change.me"; then
{ echo "configure: error: plab support included but PLAB_ROOTBALL not defined." 1>&2; exit 1; } { echo "configure: error: plab support included but PLAB_ROOTBALL not defined." 1>&2; exit 1; }
...@@ -2097,17 +2106,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h ...@@ -2097,17 +2106,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2101: checking for $ac_hdr" >&5 echo "configure:2110: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2106 "configure" #line 2115 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2146,17 +2155,17 @@ for ac_hdr in linux/videodev.h ...@@ -2146,17 +2155,17 @@ for ac_hdr in linux/videodev.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2150: checking for $ac_hdr" >&5 echo "configure:2159: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2155 "configure" #line 2164 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2189,7 +2198,7 @@ done ...@@ -2189,7 +2198,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args. # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2 set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2193: checking for $ac_word" >&5 echo "configure:2202: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2268,7 +2277,7 @@ fi ...@@ -2268,7 +2277,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2272: checking for a BSD compatible install" >&5 echo "configure:2281: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2329,7 +2338,7 @@ esac ...@@ -2329,7 +2338,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args. # Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2 set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2333: checking for $ac_word" >&5 echo "configure:2342: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2823,6 +2832,7 @@ s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g ...@@ -2823,6 +2832,7 @@ s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g
s%@MIN_UNIX_GID@%$MIN_UNIX_GID%g s%@MIN_UNIX_GID@%$MIN_UNIX_GID%g
s%@DELAYTHRESH@%$DELAYTHRESH%g s%@DELAYTHRESH@%$DELAYTHRESH%g
s%@PELABSUPPORT@%$PELABSUPPORT%g s%@PELABSUPPORT@%$PELABSUPPORT%g
s%@ELVIN_COMPAT@%$ELVIN_COMPAT%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
s%@TBROBOCOPSEMAIL@%$TBROBOCOPSEMAIL%g s%@TBROBOCOPSEMAIL@%$TBROBOCOPSEMAIL%g
......
...@@ -200,6 +200,7 @@ AC_SUBST(MIN_UNIX_UID) ...@@ -200,6 +200,7 @@ AC_SUBST(MIN_UNIX_UID)
AC_SUBST(MIN_UNIX_GID) AC_SUBST(MIN_UNIX_GID)
AC_SUBST(DELAYTHRESH) AC_SUBST(DELAYTHRESH)
AC_SUBST(PELABSUPPORT) AC_SUBST(PELABSUPPORT)
AC_SUBST(ELVIN_COMPAT)
# #
# Offer both versions of the email addresses that have the @ escaped # Offer both versions of the email addresses that have the @ escaped
...@@ -263,7 +264,7 @@ STAMPS=0 ...@@ -263,7 +264,7 @@ STAMPS=0
ARCHIVESUPPORT=0 ARCHIVESUPPORT=0
NFSTRACESUPPORT=0 NFSTRACESUPPORT=0
TBLOGFACIL="local5" TBLOGFACIL="local5"
BOSSEVENTPORT=2927 BOSSEVENTPORT=16505
UNIFIED_BOSS_AND_OPS=0 UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6" FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564 FRISEBEEMCASTPORT=3564
...@@ -271,6 +272,7 @@ MIN_UNIX_UID=10000 ...@@ -271,6 +272,7 @@ MIN_UNIX_UID=10000
MIN_UNIX_GID=6000 MIN_UNIX_GID=6000
DELAYTHRESH=2 DELAYTHRESH=2
PELABSUPPORT=0 PELABSUPPORT=0
ELVIN_COMPAT=0
# #
# XXX You really don't want to change these! # XXX You really don't want to change these!
...@@ -369,6 +371,10 @@ if test $OPSDBSUPPORT -eq 1; then ...@@ -369,6 +371,10 @@ if test $OPSDBSUPPORT -eq 1; then
AC_DEFINE_UNQUOTED(OPSDBSUPPORT, 1) AC_DEFINE_UNQUOTED(OPSDBSUPPORT, 1)
fi fi
if test $ELVIN_COMPAT -eq 1; then
AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1)
fi
if test $PLABSUPPORT -eq 1; then if test $PLABSUPPORT -eq 1; then
if test "$PLAB_ROOTBALL" = "change.me"; then if test "$PLAB_ROOTBALL" = "change.me"; then
AC_MSG_ERROR([plab support included but PLAB_ROOTBALL not defined.]) AC_MSG_ERROR([plab support included but PLAB_ROOTBALL not defined.])
......
...@@ -46,6 +46,8 @@ ARCHIVESUPPORT=changeme ...@@ -46,6 +46,8 @@ ARCHIVESUPPORT=changeme
DISABLE_NSE=1 DISABLE_NSE=1
# This means it is an inner elab! # This means it is an inner elab!
ELABINELAB=1 ELABINELAB=1
# If we can run old images ... depends on whther elvind is installed.
ELVIN_COMPAT=changeme
# The name of the outer boss for inner boss to request services from. # The name of the outer boss for inner boss to request services from.
OUTERBOSS_NODENAME=changeme OUTERBOSS_NODENAME=changeme
TBCOOKIESUFFIX=changeme TBCOOKIESUFFIX=changeme
......
...@@ -10,5 +10,5 @@ TBAPPROVALEMAIL=stoller@flux.utah.edu ...@@ -10,5 +10,5 @@ TBAPPROVALEMAIL=stoller@flux.utah.edu
TBAUDITEMAIL=stoller@flux.utah.edu TBAUDITEMAIL=stoller@flux.utah.edu
TBSTATEDEMAIL=stoller@fast.cs.utah.edu TBSTATEDEMAIL=stoller@fast.cs.utah.edu
TBTESTSUITEEMAIL=stoller@fast.cs.utah.edu TBTESTSUITEEMAIL=stoller@fast.cs.utah.edu
WWW=www.emulab.net/dev/stoller WWW=www.emulab.net/dev/leebee
THISHOMEBASE=Stoller.Emulab.Net THISHOMEBASE=Stoller.Emulab.Net
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group. # Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -18,7 +18,7 @@ ifneq ($(SYSTEM),CYGWIN_NT-5.1) ...@@ -18,7 +18,7 @@ ifneq ($(SYSTEM),CYGWIN_NT-5.1)
SUBDIRS += trafgen SUBDIRS += trafgen
endif endif
ifeq ($(SYSTEM),FreeBSD) ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += sched delay-agent nsetrafgen stated SUBDIRS += sched delay-agent stated
endif endif
all: etc-subdir trafgen-fetch all-subdirs all: etc-subdir trafgen-fetch all-subdirs
......
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group. # Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -18,12 +18,12 @@ include $(TESTBED_SRCDIR)/GNUmakerules ...@@ -18,12 +18,12 @@ include $(TESTBED_SRCDIR)/GNUmakerules
#CFLAGS += -DDEBUG #CFLAGS += -DDEBUG
CFLAGS += -O -g -Wall CFLAGS += -O -g -Wall
CFLAGS += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb CFLAGS += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb
CFLAGS += `elvin-config --cflags vin4c` CFLAGS += -I/usr/local/include
LDFLAGS += -static LDFLAGS += -static
LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto LIBS += -levent -ltb -lcrypto
LIBS += `elvin-config --libs vin4c` LIBS += -L/usr/local/lib -lpubsub -lm
OBJS = main.o callback.o OBJS = main.o callback.o
......
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2002-2006 University of Utah and the Flux Group. # Copyright (c) 2002-2007 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -10,7 +10,7 @@ OBJDIR = ../.. ...@@ -10,7 +10,7 @@ OBJDIR = ../..
SUBDIR = event/example SUBDIR = event/example
SYSTEM := $(shell uname -s) SYSTEM := $(shell uname -s)
PROGRAMS = tbrecv tbsend tbrecv.py tbsend.py eventdebug.pl dumpevsubs PROGRAMS = tbrecv tbsend tbrecv.py tbsend.py eventdebug.pl
include $(OBJDIR)/Makeconf include $(OBJDIR)/Makeconf
...@@ -21,11 +21,11 @@ include $(TESTBED_SRCDIR)/GNUmakerules ...@@ -21,11 +21,11 @@ include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -DDEBUG CFLAGS += -DDEBUG
CFLAGS += -O -g -static -Wall CFLAGS += -O -g -static -Wall
CFLAGS += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb CFLAGS += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb
CFLAGS += `elvin-config --cflags vin4c` CFLAGS += -I/usr/local/include
LDFLAGS += -static -L../lib -L${OBJDIR}/lib/libtb LDFLAGS += -static -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto LIBS += -levent -ltb -lcrypto
LIBS += `elvin-config --libs vin4c` LIBS += -L/usr/local/lib -lpubsub -lm
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
LIBS += -ldl LIBS += -ldl
endif endif
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <ctype.h> #include <ctype.h>
#include <netdb.h> #include <netdb.h>
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/socket.h> #include <sys/socket.h>
......
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group. # Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -11,11 +11,20 @@ SUBDIR = event/lib ...@@ -11,11 +11,20 @@ SUBDIR = event/lib
include $(OBJDIR)/Makeconf include $(OBJDIR)/Makeconf
PUBSUBFLAGS = -I/usr/local/include
PUBSUBMTFLAGS = -I/usr/local/include
PUBSUBLIB = /usr/local/lib/libpubsub.so
ifeq ($(ELVIN_COMPAT),1)
PUBSUBFLAGS += -DELVIN_COMPAT
PUBSUBMTFLAGS += -DELVIN_COMPAT
endif
SYSTEM := $(shell uname -s) SYSTEM := $(shell uname -s)
LIBS = libevent.a LIBS = libevent.a
SWIGLIBS = SWIGLIBS =
# Re-entrant, multi-threaded version on FreeBSD, not on Linux or Windows clients. # Re-entrant, multi-threaded version on FreeBSD, not on Linux or Windows clients.
ifeq ($(SYSTEM),FreeBSD) ifneq ($(SYSTEM),CYGWIN_NT-5.1)
LIBS += libevent_r.a LIBS += libevent_r.a
SWIGLIBS += event.so _tbevent.so SWIGLIBS += event.so _tbevent.so
endif endif
...@@ -30,11 +39,10 @@ PERLVERS := $(shell $(SRCDIR)/perlvers.pl) ...@@ -30,11 +39,10 @@ PERLVERS := $(shell $(SRCDIR)/perlvers.pl)
#CFLAGS += -DDEBUG #CFLAGS += -DDEBUG
CFLAGS += -O2 -g -static -I. -Wall CFLAGS += -O2 -g -static -I. -Wall
SCFLAGS = $(CFLAGS) `$(ELVIN_CONFIG) --cflags vin4c` SCFLAGS = $(CFLAGS) $(PUBSUBFLAGS)
TCFLAGS = $(CFLAGS) `$(ELVIN_CONFIG) --cflags vin4mt` TCFLAGS = $(CFLAGS) $(PUBSUBMTFLAGS)
# Special CFLAGS w/o warnings, for SWIG-generated code # Special CFLAGS w/o warnings, for SWIG-generated code
CFLAGS_NOWARN += -O2 -g -static -I. CFLAGS_NOWARN += -O2 -g -static -I. $(PUBSUBFLAGS)
CFLAGS_NOWARN += `$(ELVIN_CONFIG) --cflags vin4c`
ifeq ($(SYSTEM),Linux) ifeq ($(SYSTEM),Linux)
PCORE = -I/usr/lib/perl5/5.6.1/i386-linux/CORE PCORE = -I/usr/lib/perl5/5.6.1/i386-linux/CORE
PCORE += -I/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE PCORE += -I/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE
...@@ -113,10 +121,10 @@ event_wrap_py.o: $(SRCDIR)/event_wrap_py.c event.h ...@@ -113,10 +121,10 @@ event_wrap_py.o: $(SRCDIR)/event_wrap_py.c event.h
$(CC) -c $(CFLAGS_NOWARN) $(PYCORE) $< $(CC) -c $(CFLAGS_NOWARN) $(PYCORE) $<
event.so: event.o event_wrap.o util.o event.so: event.o event_wrap.o util.o
ld -shared $^ `$(ELVIN_CONFIG) --libs vin4c` -lcrypto -o event.so ld -shared $^ $(PUBSUBLIB) -lcrypto -o event.so
_tbevent.so: event.o event_wrap_py.o util.o _tbevent.so: event.o event_wrap_py.o util.o
ld -shared $^ `$(ELVIN_CONFIG) --libs vin4c` -lcrypto -o $@ ld -shared $^ $(PUBSUBLIB) -lcrypto -o $@
LIB_STUFF = event.pm event.so tbevent.py _tbevent.so LIB_STUFF = event.pm event.so tbevent.py _tbevent.so
......
This diff is collapsed.
/* /*
* EMULAB-COPYRIGHT * EMULAB-COPYRIGHT
* Copyright (c) 2000-2006 University of Utah and the Flux Group. * Copyright (c) 2000-2007 University of Utah and the Flux Group.
* All rights reserved. * All rights reserved.
*/ */
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <elvin/elvin.h> #include <stdlib.h>
#include <sys/time.h>
#include <pubsub/pubsub.h>
#ifndef MAXHOSTNAMELEN #ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64 #define MAXHOSTNAMELEN 64
...@@ -28,40 +30,38 @@ extern "C" { ...@@ -28,40 +30,38 @@ extern "C" {
/* Handle to the event server: */ /* Handle to the event server: */
struct event_handle { struct event_handle {
elvin_handle_t server; pubsub_handle_t *server;
elvin_error_t status; pubsub_error_t status;
unsigned char *keydata; unsigned char *keydata;
int keylen; int keylen;
int do_loop; int do_loop;
/* API function pointers: */ /* API function pointers: */
elvin_error_t (*init)(void); int (*connect)(char *server, int portnum, pubsub_handle_t **);
int (*connect)(elvin_handle_t handle, elvin_error_t error); int (*disconnect)(pubsub_handle_t *handle);
int (*disconnect)(elvin_handle_t handle, elvin_error_t error); int (*mainloop)(pubsub_handle_t *handle, int *go, pubsub_error_t *error);
int (*cleanup)(int force, elvin_error_t error); int (*notify)(pubsub_handle_t *handle, pubsub_notification_t *notification,
int (*mainloop)(int *do_loop, elvin_error_t error); pubsub_error_t *error);
int (*notify)(elvin_handle_t handle, elvin_notification_t notification, pubsub_subscription_t *(*subscribe)(pubsub_handle_t *handle,
int deliver_insecure, elvin_keys_t keys, char *expression,
elvin_error_t error); pubsub_notify_callback_t notify_cb,
elvin_subscription_t (*subscribe)(elvin_handle_t handle, char *sub_exp, void *notify_arg,
elvin_keys_t keys, int accept_insecure, pubsub_error_t *error);
elvin_notify_cb_t callback, void *rock, int (*unsubscribe)(pubsub_handle_t *handle,
elvin_error_t error); pubsub_subscription_t *subscription,
int (*unsubscribe)(elvin_handle_t handle, pubsub_error_t *error);
elvin_subscription_t subscription,
elvin_error_t error);
}; };
typedef struct event_handle * event_handle_t; typedef struct event_handle * event_handle_t;
/* Event notification: */ /* Event notification: */
struct event_notification { struct event_notification {
elvin_notification_t elvin_notification; pubsub_notification_t *pubsub_notification;
int has_hmac; int has_hmac;
}; };
typedef struct event_notification *event_notification_t; typedef struct event_notification *event_notification_t;
/* Event subscription: */ /* Event subscription: */
typedef elvin_subscription_t event_subscription_t; typedef pubsub_subscription_t *event_subscription_t;
/* /*
* A tuple defines the target of the event, or if you are a subscriber,