direct-io.hg

view tools/domain_builder/vifinit @ 239:6e72ef415573

bitkeeper revision 1.97 (3e5a5dbcRcV73TYDcXAlNFfJfUqd9g)

.del-hypervisor-ifs~6f8a72aef886cac9:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
author kaf24@labyrinth.cl.cam.ac.uk
date Mon Feb 24 18:00:28 2003 +0000 (2003-02-24)
parents 7f19fcd72411
children 90eb994a96e2
line source
1 #!/bin/bash
2 #
3 # vifinit
4 #
5 # This is a silly little script to dump a couple of simple rules down to
6 # the hypervisor to assign a full static IP to a given virtual interface.
7 #
8 # Usage is:
9 #
10 # vifinit [vif id] [dotted decimal ip address]
11 #
12 if [ $# -ne 2 ] ;
13 then
14 echo "usage: vifinit [vif id] [dotted decimal ip address]"
15 exit
16 fi
18 #outbound rule:
19 echo "ADD ACCEPT srcaddr=$2 srcaddrmask=255.255.255.255 srcint=$1 dstint=-1 proto=any" > /proc/vfr
21 #inbound rule:
22 echo "ADD ACCEPT dstaddr=$2 dstaddrmask=255.255.255.255 srcint=-4 dstint=$1 proto=any" > /proc/vfr
24 #----] done.