diff options
author | tlh20@elite.cl.cam.ac.uk <tlh20@elite.cl.cam.ac.uk> | 2003-05-06 09:36:15 +0000 |
---|---|---|
committer | tlh20@elite.cl.cam.ac.uk <tlh20@elite.cl.cam.ac.uk> | 2003-05-06 09:36:15 +0000 |
commit | fd347f1b55d1a77969f2624f0063152568dabab0 (patch) | |
tree | e90591937b99940e1237421f9a6e047d5dbca521 /tools/internal/xi_vifinit | |
parent | 5379a4b2d0213f3a323dc6c0340845b6353cd273 (diff) | |
download | xen-fd347f1b55d1a77969f2624f0063152568dabab0.tar.gz xen-fd347f1b55d1a77969f2624f0063152568dabab0.tar.bz2 xen-fd347f1b55d1a77969f2624f0063152568dabab0.zip |
bitkeeper revision 1.206 (3eb7820fjxOimwW6NMSeo6KyAdqZUQ)
Many files:
new file
domctl, xi_ tools, updated domain builder, /proc/xeno/domains
Diffstat (limited to 'tools/internal/xi_vifinit')
-rwxr-xr-x | tools/internal/xi_vifinit | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/internal/xi_vifinit b/tools/internal/xi_vifinit new file mode 100755 index 0000000000..feac666bb6 --- /dev/null +++ b/tools/internal/xi_vifinit @@ -0,0 +1,25 @@ +#!/bin/bash +# +# vifinit +# +# This is a silly little script to dump a couple of simple rules down to +# the hypervisor to assign a full static IP to a given virtual interface. +# +# Usage is: +# +# vifinit [vif dom] [vif idx] [dotted decimal ip address] +# +if [ $# -ne 3 ] ; +then + echo "usage: $0 <domain_id> <vid_ifx> <dotted_decimal_ip_address>" + exit +fi + +#outbound rule: +echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/vfr + +#inbound rule: +echo "ADD ACCEPT dstaddr=$3 dstaddrmask=255.255.255.255 src=ANY dstdom=$1 dstidx=$2 proto=any" > /proc/vfr + +#----] done. + |