Commit 6cf05acb authored by Leigh Stoller's avatar Leigh Stoller

New event agent to control wireless links. At present, this agent is

very specific to wireless links in general, and to iwconfig on Redhat
9.0. It allows you to control the entire lan or an individual member
of a wireless lan via the event system. For example to change the
accesspoint of a wireless lan, you could do this:

	tevc -e foo/bar now lan0 modify accesspoint=00:09:5B:93:0B:A4

The agent deciphers the event arguments and calls iwconfig with the
appropriate as needed. Note that there are many ways to make the lan
unusable doing this, so you want to be careful. You can get the MAC
addresses from the experiment info page (tbreport).

New script called link_config, which might be badly named since it
implies generality) to front end tevc. Operates mostly like
delay_config in that it will change the physical table settings, and
optionally (-m) the virtual table entries. So,

	link_config testbed two-wireless lan0 accesspoint=00:09:5B:93:0B:A4

You can change individual members of a lan too:

	link_config -s nodew1 testbed two-wireless lan0 txpower=50

Currently no web interface; too much work. I will add an xmlrpc
interface though since that is easy to do.
parent 7c481b95
......@@ -2,7 +2,7 @@
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
# Copyright (C) 1992, 93, 94, 95, 96, 04 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
......@@ -1245,6 +1245,7 @@ else
event/nsetrafgen/nse-makepatch \
event/delay-agent/GNUmakefile \
event/program-agent/GNUmakefile \
event/link-agent/GNUmakefile \
event/stated/waitForState \
event/stated/GNUmakefile event/stated/stated \
event/linktest/GNUmakefile \
......@@ -1381,7 +1382,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
capture/GNUmakefile \
db/GNUmakefile db/nalloc db/nfree db/if2port db/backup \
db/webcontrol db/node_status db/genelists db/genelists.proxy \
db/setsitevar db/newwanode db/audit \
db/setsitevar db/newwanode db/audit db/changeuid \
db/libdb.pm db/inuse db/avail db/nodeip db/showgraph \
db/dhcpd_makeconf db/nodelog db/webnodelog db/unixgroups \
db/dbcheck db/interswitch db/dbboot db/schemacheck \
......@@ -1466,6 +1467,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
utils/firstuser utils/export_tables utils/eventping \
utils/cvsupd.pl utils/newnode utils/grantnodetype \
utils/nsgen/GNUmakefile utils/nsgen/webnsgen \
utils/link_config utils/import_commitlog \
www/GNUmakefile www/defs.php3 www/dbdefs.php3 \
www/swish.conf www/websearch \
vis/GNUmakefile vis/webvistopology vis/dbvistopology \
......@@ -1483,6 +1485,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
xmlrpc/webxmlrpc \
xmlrpc/emulab xmlrpc/node xmlrpc/experiment xmlrpc/fs xmlrpc/user \
xmlrpc/imageid xmlrpc/osid \
cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \
install/ops-install install/boss-install \
install/newnode_sshkeys/GNUmakefile "
......
......@@ -360,6 +360,7 @@ else
event/nsetrafgen/nse-makepatch \
event/delay-agent/GNUmakefile \
event/program-agent/GNUmakefile \
event/link-agent/GNUmakefile \
event/stated/waitForState \
event/stated/GNUmakefile event/stated/stated \
event/linktest/GNUmakefile \
......@@ -426,7 +427,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
capture/GNUmakefile \
db/GNUmakefile db/nalloc db/nfree db/if2port db/backup \
db/webcontrol db/node_status db/genelists db/genelists.proxy \
db/setsitevar db/newwanode db/audit \
db/setsitevar db/newwanode db/audit db/changeuid \
db/libdb.pm db/inuse db/avail db/nodeip db/showgraph \
db/dhcpd_makeconf db/nodelog db/webnodelog db/unixgroups \
db/dbcheck db/interswitch db/dbboot db/schemacheck \
......@@ -511,6 +512,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
utils/firstuser utils/export_tables utils/eventping \
utils/cvsupd.pl utils/newnode utils/grantnodetype \
utils/nsgen/GNUmakefile utils/nsgen/webnsgen \
utils/link_config utils/import_commitlog \
www/GNUmakefile www/defs.php3 www/dbdefs.php3 \
www/swish.conf www/websearch \
vis/GNUmakefile vis/webvistopology vis/dbvistopology \
......@@ -528,6 +530,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
xmlrpc/webxmlrpc \
xmlrpc/emulab xmlrpc/node xmlrpc/experiment xmlrpc/fs xmlrpc/user \
xmlrpc/imageid xmlrpc/osid \
cdrom/GNUmakefile cdrom/tbbootconfig/GNUmakefile \
install/ops-install install/boss-install \
install/newnode_sshkeys/GNUmakefile "
......
......@@ -13,7 +13,8 @@ include $(OBJDIR)/Makeconf
SYSTEM := $(shell uname -s)
SUBDIRS = lib tbgen trafgen program-agent proxy example linktest
SUBDIRS = lib tbgen trafgen program-agent proxy example linktest \
link-agent
ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += sched delay-agent nsetrafgen stated
endif
......@@ -39,6 +40,7 @@ client-install: lib/all.MAKE
ifeq ($(SYSTEM),FreeBSD)
@$(MAKE) -C delay-agent client-install
endif
@$(MAKE) -C link-agent client-install
@$(MAKE) -C tbgen client-install
@$(MAKE) -C program-agent client-install
@$(MAKE) -C trafgen client-install
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = event/link-agent
SYSTEM := $(shell uname -s)
PROGRAMS = link-agent
include $(OBJDIR)/Makeconf
all: $(PROGRAMS)
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`
LDFLAGS += -static -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto
LIBS += `elvin-config --libs vin4c`
ifeq ($(SYSTEM),Linux)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
endif
LIBS += -ldl
endif
link-agent: link-agent.o
$(CC) $(LDFLAGS) -o $@ link-agent.o $(LIBS)
$(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install:
$(INSTALL_PROGRAM) link-agent \
$(DESTDIR)$(CLIENT_BINDIR)/link-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
This diff is collapsed.
......@@ -14,7 +14,7 @@ include $(OBJDIR)/Makeconf
SUBDIRS = nsgen
BIN_SCRIPTS = delay_config sshtb create_image node_admin
BIN_SCRIPTS = delay_config sshtb create_image node_admin link_config
SBIN_SCRIPTS = vlandiff vlansync withadminprivs export_tables cvsupd.pl \
eventping grantnodetype import_commitlog
LIBEXEC_SCRIPTS = webcreateimage newnode
......@@ -22,7 +22,7 @@ LIBEXEC_SCRIPTS = webcreateimage newnode
#
# These are the ones installed on plastic (users, control, etc).
#
USERBINS = create_image delay_config node_admin
USERBINS = create_image delay_config node_admin link_config
#
# Force dependencies on the scripts so that they will be rerun through
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment