ia64/xen-unstable

view tools/internal/xi_vifinit @ 522:07cb518caf2f

bitkeeper revision 1.289 (3f09877bT-kkJTOM1WvHevpN2wY-qw)

Prune old code
author rac61@labyrinth.cl.cam.ac.uk
date Mon Jul 07 14:45:15 2003 +0000 (2003-07-07)
parents 67a66de6d9a0
children 9339f3942f4e cda951fc1bef
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 dom] [vif idx] [dotted decimal ip address]
11 #
12 if [ $# -ne 3 ] ;
13 then
14 echo "usage: $0 <domain_id> <vid_ifx> <dotted_decimal_ip_address>"
15 exit
16 fi
18 #outbound rule:
19 echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/vfr
21 #inbound rule:
22 echo "ADD ACCEPT dstaddr=$3 dstaddrmask=255.255.255.255 src=ANY dstdom=$1 dstidx=$2 proto=any" > /proc/vfr
24 #----] done.