Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
56f24f9b
Commit
56f24f9b
authored
Apr 23, 2007
by
Leigh B. Stoller
Browse files
Merge noelvin branch to the head.
parent
0d577bf1
Changes
61
Expand all
Hide whitespace changes
Inline
Side-by-side
Makeconf.in
View file @
56f24f9b
...
...
@@ -79,6 +79,7 @@ CLIENT_MANDIR = @CLIENT_MANDIR@
LOG_TESTBED = @LOG_TESTBED@
EVENTSYS = @EVENTSYS@
ELVIN_COMPAT = @ELVIN_COMPAT@
HAVE_MEZZANINE = @HAVE_MEZZANINE@
GTK_CONFIG = @GTK_CONFIG@
BRAINSTEM_DIR = @BRAINSTEM_DIR@
...
...
capture/capquery.c
View file @
56f24f9b
/*
* 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.
*/
...
...
@@ -10,6 +10,7 @@
#include
<sys/socket.h>
#include
<netinet/in.h>
#include
<arpa/inet.h>
#include
<rpc/rpc.h>
#include
<netdb.h>
#include
<fcntl.h>
#include
<stdio.h>
...
...
@@ -71,7 +72,7 @@ int
main
(
int
argc
,
char
**
argv
)
{
int
sock
,
ch
,
rc
,
retval
=
EXIT_FAILURE
;
int
length
,
port
=
SERVERPORT
;
int
port
=
SERVERPORT
;
char
*
server
=
BOSSNODE
;
struct
sockaddr_in
sin
;
whoami_t
whoami
;
...
...
capture/capserver.c
View file @
56f24f9b
/*
* 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.
*/
...
...
@@ -49,7 +49,7 @@ main(int argc, char **argv)
MYSQL_RES
*
res
;
MYSQL_ROW
row
;
int
tcpsock
,
ch
;
int
length
,
i
,
err
=
0
;
int
length
,
i
;
struct
sockaddr_in
name
;
struct
timeval
timeout
;
struct
group
*
group
;
...
...
@@ -134,8 +134,7 @@ main(int argc, char **argv)
int
clientsock
,
length
=
sizeof
(
client
);
int
cc
,
port
;
whoami_t
whoami
;
unsigned
char
buf
[
BUFSIZ
],
node_id
[
64
];
secretkey_t
secretkey
;
unsigned
char
node_id
[
64
];
tipowner_t
tipown
;
void
*
reply
=
&
tipown
;
size_t
reply_size
=
sizeof
(
tipown
);
...
...
config.h.in
View file @
56f24f9b
...
...
@@ -39,6 +39,7 @@
#undef BOSSEVENTPORT
#undef WINSUPPORT
#undef OPSDBSUPPORT
#undef ELVIN_COMPAT
#undef HAVE_SRANDOMDEV
...
...
configure
View file @
56f24f9b
...
...
@@ -1446,6 +1446,7 @@ done
#
...
...
@@ -1510,7 +1511,7 @@ STAMPS=0
ARCHIVESUPPORT
=
0
NFSTRACESUPPORT
=
0
TBLOGFACIL
=
"local5"
BOSSEVENTPORT
=
2927
BOSSEVENTPORT
=
16505
UNIFIED_BOSS_AND_OPS
=
0
FRISEBEEMCASTADDR
=
"234.5.6"
FRISEBEEMCASTPORT
=
3564
...
...
@@ -1518,6 +1519,7 @@ MIN_UNIX_UID=10000
MIN_UNIX_GID
=
6000
DELAYTHRESH
=
2
PELABSUPPORT
=
0
ELVIN_COMPAT
=
0
#
# XXX You really don't want to change these!
...
...
@@ -1713,6 +1715,13 @@ EOF
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
"
$PLAB_ROOTBALL
"
=
"change.me"
;
then
{
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
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:21
0
1: checking for
$ac_hdr
"
>
&5
echo
"configure:211
0
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 21
06
"configure"
#line 21
15
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:21
11
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:21
20
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -2146,17 +2155,17 @@ for ac_hdr in linux/videodev.h
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:215
0
: checking for
$ac_hdr
"
>
&5
echo
"configure:215
9
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 21
55
"configure"
#line 21
64
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:216
0
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:216
9
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out |
grep
-v
"^conftest.
${
ac_ext
}
\$
"
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -2189,7 +2198,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args.
set
dummy gtk-config
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:2
193
: checking for
$ac_word
"
>
&5
echo
"configure:2
202
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_GTK_CONFIG
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -2268,7 +2277,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./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
"configure:22
72
: checking for a BSD compatible install"
>
&5
echo
"configure:22
81
: checking for a BSD compatible install"
>
&5
if
test
-z
"
$INSTALL
"
;
then
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_install
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
...
...
@@ -2329,7 +2338,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args.
set
dummy rsync
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:23
33
: checking for
$ac_word
"
>
&5
echo
"configure:23
42
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_path_RSYNC
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -2823,6 +2832,7 @@ s%@MIN_UNIX_UID@%$MIN_UNIX_UID%g
s%@MIN_UNIX_GID@%
$MIN_UNIX_GID
%g
s%@DELAYTHRESH@%
$DELAYTHRESH
%g
s%@PELABSUPPORT@%
$PELABSUPPORT
%g
s%@ELVIN_COMPAT@%
$ELVIN_COMPAT
%g
s%@TBOPSEMAIL@%
$TBOPSEMAIL
%g
s%@TBOPSEMAIL_NOSLASH@%
$TBOPSEMAIL_NOSLASH
%g
s%@TBROBOCOPSEMAIL@%
$TBROBOCOPSEMAIL
%g
...
...
configure.in
View file @
56f24f9b
...
...
@@ -200,6 +200,7 @@ AC_SUBST(MIN_UNIX_UID)
AC_SUBST(MIN_UNIX_GID)
AC_SUBST(DELAYTHRESH)
AC_SUBST(PELABSUPPORT)
AC_SUBST(ELVIN_COMPAT)
#
# Offer both versions of the email addresses that have the @ escaped
...
...
@@ -263,7 +264,7 @@ STAMPS=0
ARCHIVESUPPORT=0
NFSTRACESUPPORT=0
TBLOGFACIL="local5"
BOSSEVENTPORT=
2927
BOSSEVENTPORT=
16505
UNIFIED_BOSS_AND_OPS=0
FRISEBEEMCASTADDR="234.5.6"
FRISEBEEMCASTPORT=3564
...
...
@@ -271,6 +272,7 @@ MIN_UNIX_UID=10000
MIN_UNIX_GID=6000
DELAYTHRESH=2
PELABSUPPORT=0
ELVIN_COMPAT=0
#
# XXX You really don't want to change these!
...
...
@@ -369,6 +371,10 @@ if test $OPSDBSUPPORT -eq 1; then
AC_DEFINE_UNQUOTED(OPSDBSUPPORT, 1)
fi
if test $ELVIN_COMPAT -eq 1; then
AC_DEFINE_UNQUOTED(ELVIN_COMPAT, 1)
fi
if test $PLABSUPPORT -eq 1; then
if test "$PLAB_ROOTBALL" = "change.me"; then
AC_MSG_ERROR([plab support included but PLAB_ROOTBALL not defined.])
...
...
defs-elabinelab
View file @
56f24f9b
...
...
@@ -46,6 +46,8 @@ ARCHIVESUPPORT=changeme
DISABLE_NSE=1
# This means it is an inner elab!
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.
OUTERBOSS_NODENAME=changeme
TBCOOKIESUFFIX=changeme
...
...
defs-stoller-emulab
View file @
56f24f9b
...
...
@@ -10,5 +10,5 @@ TBAPPROVALEMAIL=stoller@flux.utah.edu
TBAUDITEMAIL=stoller@flux.utah.edu
TBSTATEDEMAIL=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
event/GNUmakefile.in
View file @
56f24f9b
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
6
University of Utah and the Flux Group.
# Copyright (c) 2000-200
7
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -18,7 +18,7 @@ ifneq ($(SYSTEM),CYGWIN_NT-5.1)
SUBDIRS += trafgen
endif
ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += sched delay-agent
nsetrafgen
stated
SUBDIRS += sched delay-agent stated
endif
all: etc-subdir trafgen-fetch all-subdirs
...
...
event/delay-agent/GNUmakefile.in
View file @
56f24f9b
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
4
University of Utah and the Flux Group.
# Copyright (c) 2000-200
7
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -18,12 +18,12 @@ include $(TESTBED_SRCDIR)/GNUmakerules
#CFLAGS += -DDEBUG
CFLAGS += -O -g -Wall
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 += -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto
LIBS +=
`elvin-config --libs vin4c`
LIBS +=
-L/usr/local/lib -lpubsub -lm
OBJS = main.o callback.o
...
...
event/example/GNUmakefile.in
View file @
56f24f9b
#
# EMULAB-COPYRIGHT
# Copyright (c) 2002-200
6
University of Utah and the Flux Group.
# Copyright (c) 2002-200
7
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -10,7 +10,7 @@ OBJDIR = ../..
SUBDIR = event/example
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
...
...
@@ -21,11 +21,11 @@ include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -DDEBUG
CFLAGS += -O -g -static -Wall
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
LIBS += -levent -ltb -lcrypto
LIBS +=
`elvin-config --libs vin4c`
LIBS +=
-L/usr/local/lib -lpubsub -lm
ifeq ($(SYSTEM),Linux)
LIBS += -ldl
endif
...
...
event/example/tbrecv.c
View file @
56f24f9b
...
...
@@ -13,6 +13,7 @@
#include
<ctype.h>
#include
<netdb.h>
#include
<unistd.h>
#include
<string.h>
#include
<sys/types.h>
#include
<sys/time.h>
#include
<sys/socket.h>
...
...
event/lib/GNUmakefile.in
View file @
56f24f9b
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
6
University of Utah and the Flux Group.
# Copyright (c) 2000-200
7
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -11,11 +11,20 @@ SUBDIR = event/lib
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)
LIBS = libevent.a
SWIGLIBS =
# Re-entrant, multi-threaded version on FreeBSD, not on Linux or Windows clients.
ifeq ($(SYSTEM),
FreeBSD
)
if
n
eq ($(SYSTEM),
CYGWIN_NT-5.1
)
LIBS += libevent_r.a
SWIGLIBS += event.so _tbevent.so
endif
...
...
@@ -30,11 +39,10 @@ PERLVERS := $(shell $(SRCDIR)/perlvers.pl)
#CFLAGS += -DDEBUG
CFLAGS += -O2 -g -static -I. -Wall
SCFLAGS = $(CFLAGS)
`
$(
ELVIN_CONFIG) --cflags vin4c`
TCFLAGS = $(CFLAGS)
`
$(
ELVIN_CONFIG) --cflags vin4mt`
SCFLAGS = $(CFLAGS) $(
PUBSUBFLAGS)
TCFLAGS = $(CFLAGS) $(
PUBSUBMTFLAGS)
# Special CFLAGS w/o warnings, for SWIG-generated code
CFLAGS_NOWARN += -O2 -g -static -I.
CFLAGS_NOWARN += `$(ELVIN_CONFIG) --cflags vin4c`
CFLAGS_NOWARN += -O2 -g -static -I. $(PUBSUBFLAGS)
ifeq ($(SYSTEM),Linux)
PCORE = -I/usr/lib/perl5/5.6.1/i386-linux/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
$(CC) -c $(CFLAGS_NOWARN) $(PYCORE) $<
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
ld -shared $^
`
$(
ELVIN_CONFIG) --libs vin4c`
-lcrypto -o $@
ld -shared $^ $(
PUBSUBLIB)
-lcrypto -o $@
LIB_STUFF = event.pm event.so tbevent.py _tbevent.so
...
...
event/lib/event.c
View file @
56f24f9b
This diff is collapsed.
Click to expand it.
event/lib/event.h
View file @
56f24f9b
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-200
6
University of Utah and the Flux Group.
* Copyright (c) 2000-200
7
University of Utah and the Flux Group.
* All rights reserved.
*/
...
...
@@ -16,7 +16,9 @@
#include
<stdio.h>
#include
<stdarg.h>
#include
<elvin/elvin.h>
#include
<stdlib.h>
#include
<sys/time.h>
#include
<pubsub/pubsub.h>
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
...
...
@@ -28,40 +30,38 @@ extern "C" {
/* Handle to the event server: */
struct
event_handle
{
elvin
_handle_t
server
;
elvin
_error_t
status
;
pubsub
_handle_t
*
server
;
pubsub
_error_t
status
;
unsigned
char
*
keydata
;
int
keylen
;
int
do_loop
;
/* API function pointers: */
elvin_error_t
(
*
init
)(
void
);
int
(
*
connect
)(
elvin_handle_t
handle
,
elvin_error_t
error
);
int
(
*
disconnect
)(
elvin_handle_t
handle
,
elvin_error_t
error
);
int
(
*
cleanup
)(
int
force
,
elvin_error_t
error
);
int
(
*
mainloop
)(
int
*
do_loop
,
elvin_error_t
error
);
int
(
*
notify
)(
elvin_handle_t
handle
,
elvin_notification_t
notification
,
int
deliver_insecure
,
elvin_keys_t
keys
,
elvin_error_t
error
);
elvin_subscription_t
(
*
subscribe
)(
elvin_handle_t
handle
,
char
*
sub_exp
,
elvin_keys_t
keys
,
int
accept_insecure
,
elvin_notify_cb_t
callback
,
void
*
rock
,
elvin_error_t
error
);
int
(
*
unsubscribe
)(
elvin_handle_t
handle
,
elvin_subscription_t
subscription
,
elvin_error_t
error
);
int
(
*
connect
)(
char
*
server
,
int
portnum
,
pubsub_handle_t
**
);
int
(
*
disconnect
)(
pubsub_handle_t
*
handle
);
int
(
*
mainloop
)(
pubsub_handle_t
*
handle
,
int
*
go
,
pubsub_error_t
*
error
);
int
(
*
notify
)(
pubsub_handle_t
*
handle
,
pubsub_notification_t
*
notification
,
pubsub_error_t
*
error
);
pubsub_subscription_t
*
(
*
subscribe
)(
pubsub_handle_t
*
handle
,
char
*
expression
,
pubsub_notify_callback_t
notify_cb
,
void
*
notify_arg
,
pubsub_error_t
*
error
);
int
(
*
unsubscribe
)(
pubsub_handle_t
*
handle
,
pubsub_subscription_t
*
subscription
,
pubsub_error_t
*
error
);
};
typedef
struct
event_handle
*
event_handle_t
;
/* Event notification: */
struct
event_notification
{
elvin
_notification_t
elvin
_notification
;
pubsub
_notification_t
*
pubsub
_notification
;
int
has_hmac
;
};
typedef
struct
event_notification
*
event_notification_t
;
/* 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,
...
...
@@ -133,6 +133,8 @@ int address_tuple_free(address_tuple_t);
event_notification_get_string(handle, note, "___SENDER___", buf, len)
#define event_notification_set_sender(handle, note, buf) \
event_notification_put_string(handle, note, "___SENDER___", buf)
#define event_notification_clr_sender(handle, note) \
event_notification_remove(handle, note, "___SENDER___")
#endif
/* ifndef NO_EVENT_MACROS */
#endif
/* ifndef SWIG */
...
...
@@ -242,12 +244,14 @@ int event_unsubscribe(event_handle_t handle, event_subscription_t es);
int
event_async_unsubscribe
(
event_handle_t
handle
,
event_subscription_t
es
);
int
event_notification_insert_hmac
(
event_handle_t
handle
,
event_notification_t
notification
);
#ifdef NOTYET
int
event_notification_pack
(
event_handle_t
handle
,
event_notification_t
notification
,
unsigned
char
*
data
,
int
*
len
);
int
event_notification_unpack
(
event_handle_t
handle
,
event_notification_t
*
notification
,
unsigned
char
*
data
,
int
len
);
#endif
int
event_set_idle_period
(
event_handle_t
handle
,
int
seconds
)
;
int
event_set_failover
(
event_handle_t
handle
,
int
dofail
)
;
...
...
event/lib/event.pm
View file @
56f24f9b
...
...
@@ -7,7 +7,7 @@ require DynaLoader;
package
eventc
;
bootstrap
event
;
package
event
;
@EXPORT
=
qw( $MAXHOSTNAMELEN event_handle_server_set event_handle_server_get event_handle_status_set event_handle_status_get event_handle_keydata_set event_handle_keydata_get event_handle_keylen_set event_handle_keylen_get event_handle_do_loop_set event_handle_do_loop_get
event_handle_init_set event_handle_init_get
event_handle_connect_set event_handle_connect_get event_handle_disconnect_set event_handle_disconnect_get
event_handle_cleanup_set event_handle_cleanup_get
event_handle_mainloop_set event_handle_mainloop_get event_handle_notify_set event_handle_notify_get event_handle_subscribe_set event_handle_subscribe_get event_handle_unsubscribe_set event_handle_unsubscribe_get new_event_handle delete_event_handle event_notification_
elvin
_notification_set event_notification_
elvin
_notification_get event_notification_has_hmac_set event_notification_has_hmac_get new_event_notification delete_event_notification address_tuple_site_set address_tuple_site_get address_tuple_expt_set address_tuple_expt_get address_tuple_group_set address_tuple_group_get address_tuple_host_set address_tuple_host_get address_tuple_objtype_set address_tuple_objtype_get address_tuple_objname_set address_tuple_objname_get address_tuple_eventtype_set address_tuple_eventtype_get address_tuple_scheduler_set address_tuple_scheduler_get address_tuple_timeline_set address_tuple_timeline_get new_address_tuple delete_address_tuple $ADDRESSTUPLE_ALL $OBJECTTYPE_TESTBED $OBJECTTYPE_TRAFGEN address_tuple_alloc address_tuple_free $EVENT_HOST_ANY $EVENT_NULL $EVENT_TEST $EVENT_SCHEDULE $EVENT_TRAFGEN_START $EVENT_TRAFGEN_STOP event_register event_register_withkeyfile event_register_withkeydata event_register_withkeyfile_withretry event_register_withkeydata_withretry event_unregister c_event_poll c_event_poll_blocking dont_use_this_function_because_it_does_not_work event_stop_main event_notify event_schedule event_notification_alloc event_notification_free event_notification_clone event_notification_get_double event_notification_get_int32 event_notification_get_int64 event_notification_get_opaque c_event_notification_get_string event_notification_put_double event_notification_put_int32 event_notification_put_int64 event_notification_put_opaque event_notification_put_string event_notification_remove c_event_subscribe event_subscribe_auth event_async_subscribe event_unsubscribe event_async_unsubscribe event_notification_insert_hmac
event_notification_pack event_notification_unpack
event_set_idle_period event_set_failover event_arg_get event_arg_dup $EA_TAG_DONE $EA_Site $EA_Experiment $EA_Group $EA_Host $EA_Type $EA_Name $EA_Event $EA_Arguments $EA_ArgInteger $EA_ArgFloat $EA_ArgString $EA_When event_notification_create_v event_notification_create event_do_v event_do xmalloc xrealloc timeval_tv_sec_set timeval_tv_sec_get timeval_tv_usec_set timeval_tv_usec_get new_timeval delete_timeval callback_data_callback_notification_set callback_data_callback_notification_get callback_data_next_set callback_data_next_get new_callback_data delete_callback_data $callback_data_list allocate_callback_data free_callback_data dequeue_callback_data enqueue_callback_data perl_stub_callback stub_event_subscribe $event_string_buffer event_notification_get_string event_notification_get_site event_notification_get_expt event_notification_get_group event_notification_get_host event_notification_get_objtype event_notification_get_objname event_notification_get_eventtype event_notification_get_arguments event_notification_set_arguments event_notification_get_sender event_notification_set_sender )
;
@EXPORT
=
qw( $MAXHOSTNAMELEN event_handle_server_set event_handle_server_get event_handle_status_set event_handle_status_get event_handle_keydata_set event_handle_keydata_get event_handle_keylen_set event_handle_keylen_get event_handle_do_loop_set event_handle_do_loop_get event_handle_connect_set event_handle_connect_get event_handle_disconnect_set event_handle_disconnect_get event_handle_mainloop_set event_handle_mainloop_get event_handle_notify_set event_handle_notify_get event_handle_subscribe_set event_handle_subscribe_get event_handle_unsubscribe_set event_handle_unsubscribe_get new_event_handle delete_event_handle event_notification_
pubsub
_notification_set event_notification_
pubsub
_notification_get event_notification_has_hmac_set event_notification_has_hmac_get new_event_notification delete_event_notification address_tuple_site_set address_tuple_site_get address_tuple_expt_set address_tuple_expt_get address_tuple_group_set address_tuple_group_get address_tuple_host_set address_tuple_host_get address_tuple_objtype_set address_tuple_objtype_get address_tuple_objname_set address_tuple_objname_get address_tuple_eventtype_set address_tuple_eventtype_get address_tuple_scheduler_set address_tuple_scheduler_get address_tuple_timeline_set address_tuple_timeline_get new_address_tuple delete_address_tuple $ADDRESSTUPLE_ALL $OBJECTTYPE_TESTBED $OBJECTTYPE_TRAFGEN address_tuple_alloc address_tuple_free $EVENT_HOST_ANY $EVENT_NULL $EVENT_TEST $EVENT_SCHEDULE $EVENT_TRAFGEN_START $EVENT_TRAFGEN_STOP event_register event_register_withkeyfile event_register_withkeydata event_register_withkeyfile_withretry event_register_withkeydata_withretry event_unregister c_event_poll c_event_poll_blocking dont_use_this_function_because_it_does_not_work event_stop_main event_notify event_schedule event_notification_alloc event_notification_free event_notification_clone event_notification_get_double event_notification_get_int32 event_notification_get_int64 event_notification_get_opaque c_event_notification_get_string event_notification_put_double event_notification_put_int32 event_notification_put_int64 event_notification_put_opaque event_notification_put_string event_notification_remove c_event_subscribe event_subscribe_auth event_async_subscribe event_unsubscribe event_async_unsubscribe event_notification_insert_hmac event_set_idle_period event_set_failover event_arg_get event_arg_dup $EA_TAG_DONE $EA_Site $EA_Experiment $EA_Group $EA_Host $EA_Type $EA_Name $EA_Event $EA_Arguments $EA_ArgInteger $EA_ArgFloat $EA_ArgString $EA_When event_notification_create_v event_notification_create event_do_v event_do xmalloc xrealloc
make_timestamp
timeval_tv_sec_set timeval_tv_sec_get timeval_tv_usec_set timeval_tv_usec_get new_timeval delete_timeval callback_data_callback_notification_set callback_data_callback_notification_get callback_data_next_set callback_data_next_get new_callback_data delete_callback_data $callback_data_list allocate_callback_data free_callback_data dequeue_callback_data enqueue_callback_data perl_stub_callback stub_event_subscribe $event_string_buffer event_notification_get_string event_notification_get_site event_notification_get_expt event_notification_get_group event_notification_get_host event_notification_get_objtype event_notification_get_objname event_notification_get_eventtype event_notification_get_arguments event_notification_set_arguments event_notification_get_sender event_notification_set_sender )
;
# ---------- BASE METHODS -------------
...
...
@@ -80,8 +80,6 @@ package event;
*event_unsubscribe
=
*
eventc::
event_unsubscribe
;
*event_async_unsubscribe
=
*
eventc::
event_async_unsubscribe
;
*event_notification_insert_hmac
=
*
eventc::
event_notification_insert_hmac
;
*event_notification_pack
=
*
eventc::
event_notification_pack
;
*event_notification_unpack
=
*
eventc::
event_notification_unpack
;
*event_set_idle_period
=
*
eventc::
event_set_idle_period
;
*event_set_failover
=
*
eventc::
event_set_failover
;
*event_arg_get
=
*
eventc::
event_arg_get
;
...
...
@@ -92,6 +90,7 @@ package event;
*event_do
=
*
eventc::
event_do
;
*xmalloc
=
*
eventc::
xmalloc
;
*xrealloc
=
*
eventc::
xrealloc
;
*make_timestamp
=
*
eventc::
make_timestamp
;
*allocate_callback_data
=
*
eventc::
allocate_callback_data
;
*free_callback_data
=
*
eventc::
free_callback_data
;
*dequeue_callback_data
=
*
eventc::
dequeue_callback_data
;
...
...
@@ -128,14 +127,10 @@ use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
*swig_keylen_set
=
*
eventc::
event_handle_keylen_set
;
*swig_do_loop_get
=
*
eventc::
event_handle_do_loop_get
;
*swig_do_loop_set
=
*
eventc::
event_handle_do_loop_set
;
*swig_init_get
=
*
eventc::
event_handle_init_get
;
*swig_init_set
=
*
eventc::
event_handle_init_set
;
*swig_connect_get
=
*
eventc::
event_handle_connect_get
;
*swig_connect_set
=
*
eventc::
event_handle_connect_set
;
*swig_disconnect_get
=
*
eventc::
event_handle_disconnect_get
;
*swig_disconnect_set
=
*
eventc::
event_handle_disconnect_set
;
*swig_cleanup_get
=
*
eventc::
event_handle_cleanup_get
;
*swig_cleanup_set
=
*
eventc::
event_handle_cleanup_set
;
*swig_mainloop_get
=
*
eventc::
event_handle_mainloop_get
;
*swig_mainloop_set
=
*
eventc::
event_handle_mainloop_set
;
*swig_notify_get
=
*
eventc::
event_handle_notify_get
;
...
...
@@ -181,8 +176,8 @@ use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA
=
qw( event )
;
%OWNER
=
();
%ITERATORS
=
();
*swig_
elvin
_notification_get
=
*
eventc::
event_notification_
elvin
_notification_get
;
*swig_
elvin
_notification_set
=
*
eventc::
event_notification_
elvin
_notification_set
;
*swig_
pubsub
_notification_get
=
*
eventc::
event_notification_
pubsub
_notification_get
;
*swig_
pubsub
_notification_set
=
*
eventc::
event_notification_
pubsub
_notification_set
;
*swig_has_hmac_get
=
*
eventc::
event_notification_has_hmac_get
;
*swig_has_hmac_set
=
*
eventc::
event_notification_has_hmac_set
;
sub
new
{
...
...
@@ -389,6 +384,11 @@ bless $callback_data_list, event::callback_data;
#
# 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
# doesn't seem possible to get SWIG to just pass it through into the
# output file
...
...
event/lib/event_wrap.c
View file @
56f24f9b
This diff is collapsed.
Click to expand it.
event/lib/event_wrap_py.c
View file @
56f24f9b
This diff is collapsed.
Click to expand it.
event/lib/tbevent.py
View file @
56f24f9b
# This file was created automatically by SWIG.
# This file was created automatically by SWIG
1.3.29
.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import
_tbevent
def
_swig_setattr
(
self
,
class_type
,
name
,
value
):
import
new
new_instancemethod
=
new
.
instancemethod
def
_swig_setattr_nondynamic
(
self
,
class_type
,
name
,
value
,
static
=
1
):
if
(
name
==
"thisown"
):
return
self
.
this
.
own
(
value
)
if
(
name
==
"this"
):
if
isinstance
(
value
,
class_type
):
self
.
__dict__
[
name
]
=
value
.
this
if
hasattr
(
value
,
"thisown"
):
self
.
__dict__
[
"thisown"
]
=
value
.
thisown
del
value
.
thisown
if
type
(
value
).
__name__
==
'PySwigObject'
:
self
.
__dict__
[
name
]
=
value
return
method
=
class_type
.
__swig_setmethods__
.
get
(
name
,
None
)
if
method
:
return
method
(
self
,
value
)
self
.
__dict__
[
name
]
=
value
if
(
not
static
)
or
hasattr
(
self
,
name
):
self
.
__dict__
[
name
]
=
value
else
:
raise
AttributeError
(
"You cannot add attributes to %s"
%
self
)
def
_swig_setattr
(
self
,
class_type
,
name
,
value
):
return
_swig_setattr_nondynamic
(
self
,
class_type
,
name
,
value
,
0
)
def
_swig_getattr
(
self
,
class_type
,
name
):
if
(
name
==
"thisown"
):
return
self
.
this
.
own
()
method
=
class_type
.
__swig_getmethods__
.
get
(
name
,
None
)
if
method
:
return
method
(
self
)
raise
AttributeError
,
name
def
_swig_repr
(
self
):
try
:
strthis
=
"proxy of "
+
self
.
this
.
__repr__
()
except
:
strthis
=
""
return
"<%s.%s; %s >"
%
(
self
.
__class__
.
__module__
,
self
.
__class__
.
__name__
,
strthis
,)
import
types
try
:
_object
=
types
.
ObjectType
...
...
@@ -36,8 +48,7 @@ class event_handle(_object):
__setattr__
=
lambda
self
,
name
,
value
:
_swig_setattr
(
self
,
event_handle
,
name
,
value
)
__swig_getmethods__
=
{}
__getattr__
=
lambda
self
,
name
:
_swig_getattr
(
self
,
event_handle
,
name
)
def
__repr__
(
self
):
return
"<C event_handle instance at %s>"
%
(
self
.
this
,)
__repr__
=
_swig_repr
__swig_setmethods__
[
"server"
]
=
_tbevent
.
event_handle_server_set
__swig_getmethods__
[
"server"
]
=
_tbevent
.
event_handle_server_get
if
_newclass
:
server
=
property
(
_tbevent
.
event_handle_server_get
,
_tbevent
.
event_handle_server_set
)
...
...
@@ -53,18 +64,12 @@ class event_handle(_object):
__swig_setmethods__
[
"do_loop"
]
=
_tbevent
.
event_handle_do_loop_set
__swig_getmethods__
[
"do_loop"
]
=
_tbevent
.
event_handle_do_loop_get
if
_newclass
:
do_loop
=
property
(
_tbevent
.
event_handle_do_loop_get
,
_tbevent
.
event_handle_do_loop_set
)
__swig_setmethods__
[
"init"
]
=
_tbevent
.
event_handle_init_set
__swig_getmethods__
[
"init"
]
=
_tbevent
.
event_handle_init_get
if
_newclass
:
init
=
property
(
_tbevent
.
event_handle_init_get
,
_tbevent
.
event_handle_init_set
)
__swig_setmethods__
[
"connect"
]
=
_tbevent
.
event_handle_connect_set
__swig_getmethods__
[
"connect"
]
=
_tbevent
.
event_handle_connect_get
if
_newclass
:
connect
=
property
(
_tbevent
.
event_handle_connect_get
,
_tbevent
.
event_handle_connect_set
)
__swig_setmethods__
[
"disconnect"
]
=
_tbevent
.
event_handle_disconnect_set
__swig_getmethods__
[
"disconnect"
]
=
_tbevent
.
event_handle_disconnect_get
if
_newclass
:
disconnect
=
property
(
_tbevent
.
event_handle_disconnect_get
,
_tbevent
.
event_handle_disconnect_set
)
__swig_setmethods__
[
"cleanup"
]
=
_tbevent
.
event_handle_cleanup_set
__swig_getmethods__
[
"cleanup"
]
=
_tbevent
.
event_handle_cleanup_get
if
_newclass
:
cleanup
=
property
(
_tbevent
.
event_handle_cleanup_get
,
_tbevent
.
event_handle_cleanup_set
)
__swig_setmethods__
[
"mainloop"
]
=
_tbevent
.
event_handle_mainloop_set
__swig_getmethods__
[
"mainloop"
]
=
_tbevent
.
event_handle_mainloop_get
if
_newclass
:
mainloop
=
property
(
_tbevent
.
event_handle_mainloop_get
,
_tbevent
.
event_handle_mainloop_set
)
...
...
@@ -77,56 +82,42 @@ class event_handle(_object):
__swig_setmethods__
[
"unsubscribe"
]
=
_tbevent
.
event_handle_unsubscribe_set
__swig_getmethods__
[
"unsubscribe"
]
=
_tbevent
.
event_handle_unsubscribe_get
if
_newclass
:
unsubscribe
=
property
(
_tbevent
.
event_handle_unsubscribe_get
,
_tbevent
.
event_handle_unsubscribe_set
)
def
__init__
(
self
,
*
args
):
_swig_setattr
(
self
,
event_handle
,
'this'
,
_tbevent
.
new_event_handle
(
*
args
))
_swig_setattr
(
self
,
event_handle
,
'thisown'
,
1
)
def
__del__
(
self
,
destroy
=
_tbevent
.
delete_event_handle
):
try
:
if
self
.
thisown
:
destroy
(
self
)
except
:
pass
class
event_handlePtr
(
event_handle
):
def
__init__
(
self
,
this
):
_swig_setattr
(
self
,
event_handle
,
'this'
,
this
)
if
not
hasattr
(
self
,
"thisown"
):
_swig_setattr
(
self
,
event_handle
,
'thisown'
,
0
)
_swig_setattr
(
self
,
event_handle
,
self
.
__class__
,
event_handle
)
_tbevent
.
event_handle_swigregister
(
event_handlePtr
)
def
__init__
(
self
,
*
args
):