#!/usr/bin/perl -w
#
# make-route-commands
#
# Output a set of routing commands for the branch network
#
#
# Andrew Findlay
# 1 October 2009
#
# $Id: make-route-commands,v 1.3 2009/10/21 11:22:06 afindlay Exp $

use lib '/usr/local/lib/raddle/branch-network';

use strict;
use netconfig;

# Are we adding or deleting these routes?
my $mode = "add";
$mode = "del" if ($ARGV[0] and ($ARGV[0] eq "del"));

# This assumes that honeyd is running on the loopback interface
# We provide a host route to the entry-point router and then
# route the other networks via that.
#
print "route $mode -host $R1ClassNetAddr dev lo\n";
#
print "route $mode -net $SerialNetNet/$SerialNetMaskLen gw $R1ClassNetAddr\n";
print "route $mode -net $NetANet/$NetAMaskLen gw $R1ClassNetAddr\n";
print "route $mode -net $NetBNet/$NetBMaskLen gw $R1ClassNetAddr\n";
print "route $mode -net $NetCNet/$NetCMaskLen gw $R1ClassNetAddr\n";


