Index: trunk/packages/invirt-xen-config/config.todo
===================================================================
--- trunk/packages/invirt-xen-config/config.todo	(revision 1257)
+++ trunk/packages/invirt-xen-config/config.todo	(revision 1257)
@@ -0,0 +1,3 @@
+xend-config.sxp: isolate patch
+files/etc/xen/scripts/vif-sipbroute: isolate patch
+files/etc/xen/scripts/vif-sipbroute: gateway, interface (for arpspoof)
Index: trunk/packages/invirt-xen-config/debian/changelog
===================================================================
--- trunk/packages/invirt-xen-config/debian/changelog	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/changelog	(revision 1257)
@@ -0,0 +1,101 @@
+invirt-xen-config (0.0.1) unstable; urgency=low
+
+  * Rename sipb-xen-dom0 -> invirt-xen-config
+
+ -- Evan Broder <broder@mit.edu>  Sat, 25 Oct 2008 15:22:45 -0400
+
+sipb-xen-dom0 (2.10) unstable; urgency=low
+
+  * Fix DHCP checksum error for ParaVMs
+
+ -- Evan Broder <broder@mit.edu>  Sun, 19 Oct 2008 22:12:09 -0400
+
+sipb-xen-dom0 (2.9.1) unstable; urgency=low
+
+  * Whoops - was slightly too vicious with the cuts to qemu-dm-sipb
+
+ -- Evan Broder <broder@mit.edu>  Sun, 19 Oct 2008 01:55:41 -0400
+
+sipb-xen-dom0 (2.9) unstable; urgency=low
+
+  * Move the qemu-ifup script to the location where it's now expected to
+    be.
+  * Clear out some debugging code from qemu-dm-sipb
+
+ -- Evan Broder <broder@mit.edu>  Sun, 19 Oct 2008 01:39:43 -0400
+
+sipb-xen-dom0 (2.8) unstable; urgency=low
+
+  * Apply Sam's fix to vif-sipbroute for the prod cluster (the interface
+    should eventually be configurized)
+
+ -- Evan Broder <broder@mit.edu>  Tue, 07 Oct 2008 01:18:37 -0400
+
+sipb-xen-dom0 (2.7) unstable; urgency=low
+
+  * Update qemu-dm-sipb to reflect the new location of qemu-dm
+
+ -- Evan Broder <broder@mit.edu>  Mon, 06 Oct 2008 18:55:59 -0400
+
+sipb-xen-dom0 (2.6) unstable; urgency=low
+
+  * depend on sipb-xen-base
+
+ -- Greg Price <price@mit.edu>  Wed, 01 Oct 2008 20:28:21 -0400
+
+sipb-xen-dom0 (2.5) unstable; urgency=low
+
+  * Don't rely on exported ROOT.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Fri, 02 May 2008 02:41:43 -0400
+
+sipb-xen-dom0 (2.4) unstable; urgency=low
+
+  * Add sipb-xen-losetup, a half-sane wrapper around the insane losetup.
+
+ -- Greg Price <price@mit.edu>  Thu,  1 May 2008 01:13:28 -0400
+
+sipb-xen-dom0 (2.3) unstable; urgency=low
+
+  * Depend on generic metapackages/provides instead of particular 
+    versions.
+
+ -- Anders Kaseorg <andersk@sipb-xen.mit.edu>  Sat, 27 Oct 2007 21:23:00 -0400
+
+sipb-xen-dom0 (2.2) unstable; urgency=low
+
+  * Add qemu-ifup script that depends on the device model script and
+    invokes vif-sipbroute.    As a consequence, we don't really support
+    bridged hvms any more.  It's not clear how to get enough information
+    out of qemu to do this.
+  * Call arpspoof with 18.181.0.1's address.  This is unfortunate in two
+    ways.  First, if we renumber we'll need to update the script.  Second,
+    it is possible that someone on 18.181 besides the router may have an
+    address cached.  Unfortunately, it doesn't work right if we don't
+    send the spoofed arp directly to the router.
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 26 Aug 2007 18:57:17 -0400
+
+sipb-xen-dom0 (2.1) unstable; urgency=low
+
+  * Fix typo in init script 
+  * depend  on dsniff for arpspoof
+
+ -- Sam Hartman <hartmans@debian.org>  Fri, 24 Aug 2007 17:22:20 -0400
+
+sipb-xen-dom0 (2) unstable; urgency=low
+
+  * Add qemu-dm-sipb written by andersk to get us the  domain ID in qemu-ifup 
+  * Add vif-sipbroute, a version of vif-route that does better netwwork
+    isolation and has initial but useless ipv6 support.  This version also
+    uses arpspoof to take over an address for domain migrations.   
+  * Add init script to enable rp_filter, proxy_arp and forwarding for the network config.
+
+ -- Sam Hartman <hartmans@debian.org>  Fri, 24 Aug 2007 17:17:23 -0400
+
+sipb-xen-dom0 (1) unstable; urgency=low
+
+  *  First version
+
+ -- Sam Hartman <hartmans@debian.org>  Sat,  4 Aug 2007 20:20:32 -0400
+
Index: trunk/packages/invirt-xen-config/debian/compat
===================================================================
--- trunk/packages/invirt-xen-config/debian/compat	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/compat	(revision 1257)
@@ -0,0 +1,1 @@
+4
Index: trunk/packages/invirt-xen-config/debian/control
===================================================================
--- trunk/packages/invirt-xen-config/debian/control	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/control	(revision 1257)
@@ -0,0 +1,14 @@
+Source: invirt-xen-config
+Section: base
+Priority: extra
+Maintainer: Invirt project <invirt@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0)
+Standards-Version: 3.7.2
+
+Package: invirt-xen-config
+Architecture: all
+Depends: ${misc:Depends}, nullmailer, dsniff, lvm2, grub,
+  ubuntu-xen-server, sipb-xen-base
+Description: Invirt Xen domain 0 configuration
+ This package includes the dependencies and configuration for a domain
+ 0 Invirt server.
Index: trunk/packages/invirt-xen-config/debian/copyright
===================================================================
--- trunk/packages/invirt-xen-config/debian/copyright	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/copyright	(revision 1257)
@@ -0,0 +1,16 @@
+This software was written as part of the Invirt project <invirt@mit.edu>.
+
+Copyright :
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file /usr/share/common-licenses/GPL.
Index: trunk/packages/invirt-xen-config/debian/invirt-xen-config.init
===================================================================
--- trunk/packages/invirt-xen-config/debian/invirt-xen-config.init	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/invirt-xen-config.init	(revision 1257)
@@ -0,0 +1,22 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          invirt-xen-config
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Startup script for the Invirt Xen host
+# Description:       
+### END INIT INFO
+
+set -e
+
+case $1 in
+    start)
+    echo 1 >/proc/sys/net/ipv4/ip_forward
+    for foo in all default; do
+    echo 1 >/proc/sys/net/ipv4/conf/$foo/rp_filter 
+    echo 1 >/proc/sys/net/ipv4/conf/$foo/proxy_arp
+    done
+    ;;
+    esac
Index: trunk/packages/invirt-xen-config/debian/invirt-xen-config.install
===================================================================
--- trunk/packages/invirt-xen-config/debian/invirt-xen-config.install	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/invirt-xen-config.install	(revision 1257)
@@ -0,0 +1,1 @@
+files/* .
Index: trunk/packages/invirt-xen-config/debian/rules
===================================================================
--- trunk/packages/invirt-xen-config/debian/rules	(revision 1257)
+++ trunk/packages/invirt-xen-config/debian/rules	(revision 1257)
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
Index: trunk/packages/invirt-xen-config/files/etc/xen/qemu-ifup
===================================================================
--- trunk/packages/invirt-xen-config/files/etc/xen/qemu-ifup	(revision 1257)
+++ trunk/packages/invirt-xen-config/files/etc/xen/qemu-ifup	(revision 1257)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "config qemu network with xen bridge for $@"
+
+if [ -z "$domid" ]; then
+    echo "domid is not set!!!" >&2
+    exit 1
+fi
+
+dev=$1
+qemu_online=yes
+XENBUS_PATH=/local/domain/0/backend/vif/${domid}/0
+vif=vif${domid}.0
+export vif qemu_online XENBUS_PATH dev 
+
+exec /etc/xen/scripts/vif-invirtroute online
Index: trunk/packages/invirt-xen-config/files/etc/xen/scripts/vif-invirtroute
===================================================================
--- trunk/packages/invirt-xen-config/files/etc/xen/scripts/vif-invirtroute	(revision 1257)
+++ trunk/packages/invirt-xen-config/files/etc/xen/scripts/vif-invirtroute	(revision 1257)
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+
+
+
+
+#============================================================================
+# /etc/xen/vif-route
+#
+# Script for configuring a vif in routed mode.
+# The hotplugging system will call this script if it is specified either in
+# the device configuration given to Xend, or the default Xend configuration
+# in /etc/xen/xend-config.sxp.  If the script is specified in neither of those
+# places, then vif-bridge is the default.
+#
+# Usage:
+# vif-route (add|remove|online|offline)
+#
+# Environment vars:
+# vif         vif interface name (required).
+# XENBUS_PATH path to this device's details in the XenStore (required).
+# Read from the store:
+# ip      list of IP networks for the vif, space-separated (default given in
+#         this script).
+# V6PREFIX  prefix of v6 address to use
+# Note that the v6 support is kind of broken because there's not really a way to populate the v6 prefix
+# This script will set up proxy arp  for any ip addresses that are being routed
+# type read to determine if the device is ioemu
+
+#============================================================================
+
+dir=$(dirname "$0")
+. "$dir/vif-common.sh"
+
+main_ip=$(dom0_ip)
+dev=${dev:-${vif}}
+
+case "$command" in
+    online)
+        ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up
+        echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp
+	echo 1 >/proc/sys/net/ipv4/conf/${dev}/rp_filter 
+        ethtool -K ${dev} tx off
+        ipcmd='add'
+        cmdprefix=''
+        ;;
+    offline)
+        do_without_error ifdown ${vif}
+	if [ -f /var/run/radvd/radvd.pid.${vif} ] ; then
+	    do_without_error kill `cat /var/run/radvd/radvd.pid.${vif}`
+	    fi
+        ipcmd='del'
+        cmdprefix='do_without_error'
+        ;;
+esac
+
+v6prefix=${v6prefix:-}
+v6prefix=$(xenstore_read_default "$XENBUS_PATH/v6prefix" "$v6prefix")
+vif_type=$(xenstore_read_default "$XENBUS_PATH/type" "viffront")
+if [  ${vif_type} != "ioemu"  -o  x${qemu_online} = xyes ] ; then
+    if [ "${ip}" ] ; then
+    # If we've been given a list of IP addresses, then add routes from dom0 to
+    # the guest using those addresses.
+	for addr in ${ip} ; do
+	    ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip}
+	    arpspoof -i eth2 -t 18.181.0.1 ${addr}&
+	    sleep 5
+	    kill %arpspoof
+	done 
+    fi
+
+    if [ x${v6prefix} != x ] ; then
+	sed -e "s/@interface@/${dev}/" -e "s+@prefix@+${v6prefix}+" /etc/xen/radvd.conf.template >/var/run/radvd.conf.${vif}
+	${cmdprefix} ip -6 addr  ${ipcmd}  fe80::/64 scope link  dev ${dev} 
+	if [ $1 = online ] ; then
+	    radvd  -u radvd -C /var/run/radvd.conf.${vif} -p /var/run/radvd/radvd.pid.${vif}
+	fi
+	${cmdprefix} ip -6 route ${ipcmd} ${v6prefix} dev ${dev} 
+    fi
+fi
+
+handle_iptable
+
+log debug "Successful vif-route $command for $vif."
+if [ "$command" == "online" ]
+then
+  success
+fi
Index: trunk/packages/invirt-xen-config/files/usr/sbin/qemu-dm-invirt
===================================================================
--- trunk/packages/invirt-xen-config/files/usr/sbin/qemu-dm-invirt	(revision 1257)
+++ trunk/packages/invirt-xen-config/files/usr/sbin/qemu-dm-invirt	(revision 1257)
@@ -0,0 +1,12 @@
+#!/bin/sh
+domid=
+for i; do
+    if [ "$domid" = "_NEXT_" ]; then
+	domid=$i
+	break
+    elif [ "$i" = "-d" ]; then
+	domid=_NEXT_
+    fi
+done
+export domid
+exec "/usr/lib/xen/bin/qemu-dm" "$@"
Index: trunk/packages/sipb-xen-dom0/config.todo
===================================================================
--- trunk/packages/sipb-xen-dom0/config.todo	(revision 1256)
+++ 	(revision )
@@ -1,3 +1,0 @@
-xend-config.sxp: isolate patch
-files/etc/xen/scripts/vif-sipbroute: isolate patch
-files/etc/xen/scripts/vif-sipbroute: gateway, interface (for arpspoof)
Index: trunk/packages/sipb-xen-dom0/debian/changelog
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/changelog	(revision 1256)
+++ 	(revision )
@@ -1,95 +1,0 @@
-sipb-xen-dom0 (2.10) unstable; urgency=low
-
-  * Fix DHCP checksum error for ParaVMs
-
- -- Evan Broder <broder@mit.edu>  Sun, 19 Oct 2008 22:12:09 -0400
-
-sipb-xen-dom0 (2.9.1) unstable; urgency=low
-
-  * Whoops - was slightly too vicious with the cuts to qemu-dm-sipb
-
- -- Evan Broder <broder@mit.edu>  Sun, 19 Oct 2008 01:55:41 -0400
-
-sipb-xen-dom0 (2.9) unstable; urgency=low
-
-  * Move the qemu-ifup script to the location where it's now expected to
-    be.
-  * Clear out some debugging code from qemu-dm-sipb
-
- -- Evan Broder <broder@mit.edu>  Sun, 19 Oct 2008 01:39:43 -0400
-
-sipb-xen-dom0 (2.8) unstable; urgency=low
-
-  * Apply Sam's fix to vif-sipbroute for the prod cluster (the interface
-    should eventually be configurized)
-
- -- Evan Broder <broder@mit.edu>  Tue, 07 Oct 2008 01:18:37 -0400
-
-sipb-xen-dom0 (2.7) unstable; urgency=low
-
-  * Update qemu-dm-sipb to reflect the new location of qemu-dm
-
- -- Evan Broder <broder@mit.edu>  Mon, 06 Oct 2008 18:55:59 -0400
-
-sipb-xen-dom0 (2.6) unstable; urgency=low
-
-  * depend on sipb-xen-base
-
- -- Greg Price <price@mit.edu>  Wed, 01 Oct 2008 20:28:21 -0400
-
-sipb-xen-dom0 (2.5) unstable; urgency=low
-
-  * Don't rely on exported ROOT.
-
- -- Anders Kaseorg <andersk@mit.edu>  Fri, 02 May 2008 02:41:43 -0400
-
-sipb-xen-dom0 (2.4) unstable; urgency=low
-
-  * Add sipb-xen-losetup, a half-sane wrapper around the insane losetup.
-
- -- Greg Price <price@mit.edu>  Thu,  1 May 2008 01:13:28 -0400
-
-sipb-xen-dom0 (2.3) unstable; urgency=low
-
-  * Depend on generic metapackages/provides instead of particular 
-    versions.
-
- -- Anders Kaseorg <andersk@sipb-xen.mit.edu>  Sat, 27 Oct 2007 21:23:00 -0400
-
-sipb-xen-dom0 (2.2) unstable; urgency=low
-
-  * Add qemu-ifup script that depends on the device model script and
-    invokes vif-sipbroute.    As a consequence, we don't really support
-    bridged hvms any more.  It's not clear how to get enough information
-    out of qemu to do this.
-  * Call arpspoof with 18.181.0.1's address.  This is unfortunate in two
-    ways.  First, if we renumber we'll need to update the script.  Second,
-    it is possible that someone on 18.181 besides the router may have an
-    address cached.  Unfortunately, it doesn't work right if we don't
-    send the spoofed arp directly to the router.
-
- -- Sam Hartman <hartmans@debian.org>  Sun, 26 Aug 2007 18:57:17 -0400
-
-sipb-xen-dom0 (2.1) unstable; urgency=low
-
-  * Fix typo in init script 
-  * depend  on dsniff for arpspoof
-
- -- Sam Hartman <hartmans@debian.org>  Fri, 24 Aug 2007 17:22:20 -0400
-
-sipb-xen-dom0 (2) unstable; urgency=low
-
-  * Add qemu-dm-sipb written by andersk to get us the  domain ID in qemu-ifup 
-  * Add vif-sipbroute, a version of vif-route that does better netwwork
-    isolation and has initial but useless ipv6 support.  This version also
-    uses arpspoof to take over an address for domain migrations.   
-  * Add init script to enable rp_filter, proxy_arp and forwarding for the network config.
-
- -- Sam Hartman <hartmans@debian.org>  Fri, 24 Aug 2007 17:17:23 -0400
-
-sipb-xen-dom0 (1) unstable; urgency=low
-
-  *  First version
-
- -- Sam Hartman <hartmans@debian.org>  Sat,  4 Aug 2007 20:20:32 -0400
-
Index: trunk/packages/sipb-xen-dom0/debian/compat
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/compat	(revision 1256)
+++ 	(revision )
@@ -1,1 +1,0 @@
-4
Index: trunk/packages/sipb-xen-dom0/debian/control
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/control	(revision 1256)
+++ 	(revision )
@@ -1,15 +1,0 @@
-Source: sipb-xen-dom0
-Section: base
-Priority: extra
-Maintainer: SIPB Xen Project <sipb-xen@mit.edu>
-Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0)
-Standards-Version: 3.7.2
-
-Package: sipb-xen-dom0
-Architecture: all
-Depends: ${misc:Depends}, emacs, nullmailer, dsniff,
-  xen-hypervisor, xen-utils, linux-image-xen-amd64|linux-xen, lvm2, grub,
-  sipb-xen-base
-Description: SIPB Xen domain 0 configuration
- This package includes the dependencies and configuration for 
- a domain 0 sipb-xen server.
Index: trunk/packages/sipb-xen-dom0/debian/copyright
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/copyright	(revision 1256)
+++ 	(revision )
@@ -1,16 +1,0 @@
-This software was written as part of the Invirt project <invirt@mit.edu>.
-
-Copyright :
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-On Debian systems, the complete text of the GNU General Public License
-can be found in the file /usr/share/common-licenses/GPL.
Index: trunk/packages/sipb-xen-dom0/debian/rules
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/rules	(revision 1256)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/usr/bin/make -f
-
-include /usr/share/cdbs/1/rules/debhelper.mk
Index: trunk/packages/sipb-xen-dom0/debian/sipb-xen-dom0.dirs
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/sipb-xen-dom0.dirs	(revision 1256)
+++ 	(revision )
@@ -1,1 +1,0 @@
-usr/share/sipb-xen-dom0
Index: trunk/packages/sipb-xen-dom0/debian/sipb-xen-dom0.init
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/sipb-xen-dom0.init	(revision 1256)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-set -e
-
-case $1 in
-    start)
-    echo 1 >/proc/sys/net/ipv4/ip_forward
-    for foo in all default; do
-    echo 1 >/proc/sys/net/ipv4/conf/$foo/rp_filter 
-    echo 1 >/proc/sys/net/ipv4/conf/$foo/proxy_arp
-    done
-    ;;
-    esac
Index: trunk/packages/sipb-xen-dom0/debian/sipb-xen-dom0.install
===================================================================
--- trunk/packages/sipb-xen-dom0/debian/sipb-xen-dom0.install	(revision 1256)
+++ 	(revision )
@@ -1,2 +1,0 @@
-files/* .
-xend-config.sxp usr/share/sipb-xen-dom0
Index: trunk/packages/sipb-xen-dom0/files/etc/modprobe.d/loop-maxloop
===================================================================
--- trunk/packages/sipb-xen-dom0/files/etc/modprobe.d/loop-maxloop	(revision 1256)
+++ 	(revision )
@@ -1,1 +1,0 @@
-options loop max_loop=64
Index: trunk/packages/sipb-xen-dom0/files/etc/xen/qemu-ifup
===================================================================
--- trunk/packages/sipb-xen-dom0/files/etc/xen/qemu-ifup	(revision 1256)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#!/bin/sh
-
-echo "config qemu network with xen bridge for $@"
-
-if [ -z "$domid" ]; then
-    echo "domid is not set!!!" >&2
-    exit 1
-fi
-
-dev=$1
-qemu_online=yes
-XENBUS_PATH=/local/domain/0/backend/vif/${domid}/0
-vif=vif${domid}.0
-export vif qemu_online XENBUS_PATH dev 
-
-exec /etc/xen/scripts/vif-sipbroute online
Index: trunk/packages/sipb-xen-dom0/files/etc/xen/scripts/vif-sipbroute
===================================================================
--- trunk/packages/sipb-xen-dom0/files/etc/xen/scripts/vif-sipbroute	(revision 1256)
+++ 	(revision )
@@ -1,88 +1,0 @@
-#!/bin/bash
-
-
-
-
-
-#============================================================================
-# /etc/xen/vif-route
-#
-# Script for configuring a vif in routed mode.
-# The hotplugging system will call this script if it is specified either in
-# the device configuration given to Xend, or the default Xend configuration
-# in /etc/xen/xend-config.sxp.  If the script is specified in neither of those
-# places, then vif-bridge is the default.
-#
-# Usage:
-# vif-route (add|remove|online|offline)
-#
-# Environment vars:
-# vif         vif interface name (required).
-# XENBUS_PATH path to this device's details in the XenStore (required).
-# Read from the store:
-# ip      list of IP networks for the vif, space-separated (default given in
-#         this script).
-# V6PREFIX  prefix of v6 address to use
-# Note that the v6 support is kind of broken because there's not really a way to populate the v6 prefix
-# This script will set up proxy arp  for any ip addresses that are being routed
-# type read to determine if the device is ioemu
-
-#============================================================================
-
-dir=$(dirname "$0")
-. "$dir/vif-common.sh"
-
-main_ip=$(dom0_ip)
-dev=${dev:-${vif}}
-
-case "$command" in
-    online)
-        ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up
-        echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp
-	echo 1 >/proc/sys/net/ipv4/conf/${dev}/rp_filter 
-        ethtool -K ${dev} tx off
-        ipcmd='add'
-        cmdprefix=''
-        ;;
-    offline)
-        do_without_error ifdown ${vif}
-	if [ -f /var/run/radvd/radvd.pid.${vif} ] ; then
-	    do_without_error kill `cat /var/run/radvd/radvd.pid.${vif}`
-	    fi
-        ipcmd='del'
-        cmdprefix='do_without_error'
-        ;;
-esac
-
-v6prefix=${v6prefix:-}
-v6prefix=$(xenstore_read_default "$XENBUS_PATH/v6prefix" "$v6prefix")
-vif_type=$(xenstore_read_default "$XENBUS_PATH/type" "viffront")
-if [  ${vif_type} != "ioemu"  -o  x${qemu_online} = xyes ] ; then
-    if [ "${ip}" ] ; then
-    # If we've been given a list of IP addresses, then add routes from dom0 to
-    # the guest using those addresses.
-	for addr in ${ip} ; do
-	    ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip}
-	    arpspoof -i eth2 -t 18.181.0.1 ${addr}&
-	    sleep 5
-	    kill %arpspoof
-	done 
-    fi
-
-    if [ x${v6prefix} != x ] ; then
-	sed -e "s/@interface@/${dev}/" -e "s+@prefix@+${v6prefix}+" /etc/xen/radvd.conf.template >/var/run/radvd.conf.${vif}
-	${cmdprefix} ip -6 addr  ${ipcmd}  fe80::/64 scope link  dev ${dev} 
-	if [ $1 = online ] ; then
-	    radvd  -u radvd -C /var/run/radvd.conf.${vif} -p /var/run/radvd/radvd.pid.${vif}
-	fi
-	${cmdprefix} ip -6 route ${ipcmd} ${v6prefix} dev ${dev} 
-    fi
-fi
-
-handle_iptable
-
-log debug "Successful vif-route $command for $vif."
-if [ "$command" == "online" ]
-then
-  success
-fi
Index: trunk/packages/sipb-xen-dom0/files/usr/sbin/qemu-dm-sipb
===================================================================
--- trunk/packages/sipb-xen-dom0/files/usr/sbin/qemu-dm-sipb	(revision 1256)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-domid=
-for i; do
-    if [ "$domid" = "_NEXT_" ]; then
-	domid=$i
-	break
-    elif [ "$i" = "-d" ]; then
-	domid=_NEXT_
-    fi
-done
-export domid
-exec "/usr/lib/xen/bin/qemu-dm" "$@"
Index: trunk/packages/sipb-xen-dom0/files/usr/sbin/sipb-xen-losetup
===================================================================
--- trunk/packages/sipb-xen-dom0/files/usr/sbin/sipb-xen-losetup	(revision 1256)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#!/usr/bin/env python2.5
-
-import sys
-import os
-from subprocess import call, Popen, PIPE
-
-def losetup(source, offset=0):
-  lockfilename = '/tmp/losetup.lock'
-  os.close(os.open(lockfilename, os.O_CREAT+os.O_EXCL)) #lock
-  try:
-    loopdevice = Popen(['losetup', '-f'], stdout=PIPE).communicate()[0].rstrip()
-    if loopdevice == '':
-      raise RuntimeError('out of loop devices for copying VM image: too many at once?')
-    if call(['losetup', '-o', str(offset), loopdevice, source]) != 0:
-      raise RuntimeError('losetup failed')
-  finally:
-    os.unlink(lockfilename) #unlock
-  return loopdevice
-
-def main(*argv):
-  args = argv[1:]
-  os.environ['PATH'] = '/usr/sbin:/usr/bin:/sbin:/bin'
-  if not (1 <= len(args) <= 2):
-    print >>sys.stderr, 'usage: %s sourcedevice [offset]' % argv[0]
-    print >>sys.stderr, 'prints resulting loopback device; don\'t forget to losetup -d'
-    return 2
-  print losetup(*args)
-  return 0
-
-if __name__ == '__main__':
-  sys.exit(main(*sys.argv))
Index: trunk/packages/sipb-xen-dom0/xend-config.sxp
===================================================================
--- trunk/packages/sipb-xen-dom0/xend-config.sxp	(revision 1256)
+++ 	(revision )
@@ -1,135 +1,0 @@
-# -*- sh -*-
-
-#
-# Xend configuration file.
-#
-
-# This example configuration is appropriate for an installation that 
-# utilizes a bridged network configuration. Access to xend via http
-# is disabled.  
-
-# Commented out entries show the default for that entry, unless otherwise
-# specified.
-
-#(logfile /var/log/xen/xend.log)
-#(loglevel DEBUG)
-
-#(xend-http-server no)
-#(xend-unix-server no)
-#(xend-tcp-xmlrpc-server no)
-#(xend-unix-xmlrpc-server yes)
-#(xend-relocation-server no)
-
-#(xend-unix-path /var/lib/xend/xend-socket)
-
-# Port xend should use for the HTTP interface, if xend-http-server is set.
-#(xend-port            8000)
-
-# Port xend should use for the relocation interface, if xend-relocation-server
-# is set.
-#(xend-relocation-port 8002)
-
-# Address xend should listen on for HTTP connections, if xend-http-server is
-# set.
-# Specifying 'localhost' prevents remote connections.
-# Specifying the empty string '' (the default) allows all connections.
-#(xend-address '')
-#(xend-address localhost)
-
-# Address xend should listen on for relocation-socket connections, if
-# xend-relocation-server is set.
-# Meaning and default as for xend-address above.
-#(xend-relocation-address '')
-
-# The hosts allowed to talk to the relocation port.  If this is empty (the
-# default), then all connections are allowed (assuming that the connection
-# arrives on a port and interface on which we are listening; see
-# xend-relocation-port and xend-relocation-address above).  Otherwise, this
-# should be a space-separated sequence of regular expressions.  Any host with
-# a fully-qualified domain name or an IP address that matches one of these
-# regular expressions will be accepted.
-#
-# For example:
-#  (xend-relocation-hosts-allow '^localhost$ ^.*\.example\.org$')
-#
-#(xend-relocation-hosts-allow '')
-
-# The limit (in kilobytes) on the size of the console buffer
-#(console-limit 1024)
-
-##
-# To bridge network traffic, like this:
-#
-# dom0: fake eth0 -> vif0.0 -+
-#                            |
-#                          bridge -> real eth0 -> the network
-#                            |
-# domU: fake eth0 -> vifN.0 -+
-#
-# use
-#
-# (network-script network-bridge)
-#
-# Your default ethernet device is used as the outgoing interface, by default. 
-# To use a different one (e.g. eth1) use
-#
-# (network-script 'network-bridge netdev=eth1')
-#
-# The bridge is named xenbr0, by default.  To rename the bridge, use
-#
-# (network-script 'network-bridge bridge=<name>')
-#
-# It is possible to use the network-bridge script in more complicated
-# scenarios, such as having two outgoing interfaces, with two bridges, and
-# two fake interfaces per guest domain.  To do things like this, write
-# yourself a wrapper script, and call network-bridge from it, as appropriate.
-#
-(network-script network-bridge)
-
-# The script used to control virtual interfaces.  This can be overridden on a
-# per-vif basis when creating a domain or a configuring a new vif.  The
-# vif-bridge script is designed for use with the network-bridge script, or
-# similar configurations.
-#
-# If you have overridden the bridge name using
-# (network-script 'network-bridge bridge=<name>') then you may wish to do the
-# same here.  The bridge name can also be set when creating a domain or
-# configuring a new vif, but a value specified here would act as a default.
-#
-# If you are using only one bridge, the vif-bridge script will discover that,
-# so there is no need to specify it explicitly.
-#
-(vif-script vif-bridge)
-
-
-## Use the following if network traffic is routed, as an alternative to the
-# settings for bridged networking given above.
-#(network-script network-route)
-#(vif-script     vif-route)
-
-
-## Use the following if network traffic is routed with NAT, as an alternative
-# to the settings for bridged networking given above.
-#(network-script network-nat)
-#(vif-script     vif-nat)
-
-
-# Dom0 will balloon out when needed to free memory for domU.
-# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
-# If dom0-min-mem=0, dom0 will never balloon out.
-(dom0-min-mem 1024)
-
-# In SMP system, dom0 will use dom0-cpus # of CPUS
-# If dom0-cpus = 0, dom0 will take all cpus available
-(dom0-cpus 0)
-
-# Whether to enable core-dumps when domains crash.
-#(enable-dump no)
-
-# The tool used for initiating virtual TPM migration
-#(external-migration-tool '')
-
-# The interface for VNC servers to listen on. Defaults
-# to 127.0.0.1  To restore old 'listen everywhere' behaviour
-# set this to 0.0.0.0
-#(vnc-listen '127.0.0.1')
