netconf.C magics
The netconf.c file containes interfaces and routing definitions. Below is a perl script that would help you in exporting all the static routes from the file, also the output will be formatted so that it can be injected from the splat cli.
###########PERL CODE###############
#!/usr/bin/perl
$input_file = "netconf.C";
$output_file = "result.txt";
open (DAT, "$input_file") || die("Could not open file!");
@raw_data=<DAT>;
close (DAT);
foreach $LINE_VAR (@raw_data)
{
if ( $LINE_VAR =~ m/dest/ )
{
my @route = split (/"/, $LINE_VAR);
print "route add -net $route[1] gw ";
}
if ( $LINE_VAR =~ m/via/ )
{
my @gateway = split (/([()])/, $LINE_VAR);
print $gateway[2];
print "\n";
}
}
#########################




