Move IPv4 definitions to IPAddrs.pm

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6327 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-11 15:39:11 +00:00
parent f442e82886
commit c34422e9c8
6 changed files with 19 additions and 14 deletions

View File

@ -34,8 +34,7 @@ use Cwd 'abs_path';
use strict; use strict;
our @ISA = qw(Exporter); our @ISA = qw(Exporter);
our @EXPORT = qw(ALLIPv4 our @EXPORT = qw(
create_temp_object create_temp_object
finalize_object finalize_object
emit emit
@ -53,8 +52,6 @@ our @EXPORT = qw(ALLIPv4
create_temp_aux_config create_temp_aux_config
finalize_aux_config finalize_aux_config
@allipv4
@rfc1918_networks
$line $line
$command $command
$doing $doing
@ -64,15 +61,6 @@ our @EXPORT = qw(ALLIPv4
our @EXPORT_OK = (); our @EXPORT_OK = ();
our @VERSION = 1.00; our @VERSION = 1.00;
#
# Some IPv4 useful stuff
#
our @allipv4 = ( '0.0.0.0/0' );
use constant { ALLIPv4 => '0.0.0.0/0' };
our @rfc1918_networks = ( "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16" );
our $line = ''; # Current config file line our $line = ''; # Current config file line
our ( $command, $doing, $done ) = qw/ compile Compiling Compiled/; #describe the current command, it's present progressive, and it's completion. our ( $command, $doing, $done ) = qw/ compile Compiling Compiled/; #describe the current command, it's present progressive, and it's completion.

View File

@ -27,6 +27,7 @@ package Shorewall::Hosts;
require Exporter; require Exporter;
use Shorewall::Common; use Shorewall::Common;
use Shorewall::Config; use Shorewall::Config;
use Shorewall::IPAddrs;
use Shorewall::Zones; use Shorewall::Zones;
use Shorewall::Interfaces; use Shorewall::Interfaces;

View File

@ -30,15 +30,28 @@ use Shorewall::Config;
use strict; use strict;
our @ISA = qw(Exporter); our @ISA = qw(Exporter);
our @EXPORT = qw( our @EXPORT = qw( ALLIPv4
validate_address validate_address
validate_net validate_net
validate_range validate_range
ip_range_explicit ip_range_explicit
@allipv4
@rfc1918_networks
); );
our @EXPORT_OK = qw( ); our @EXPORT_OK = qw( );
our @VERSION = 1.00; our @VERSION = 1.00;
#
# Some IPv4 useful stuff
#
our @allipv4 = ( '0.0.0.0/0' );
use constant { ALLIPv4 => '0.0.0.0/0' };
our @rfc1918_networks = ( "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16" );
sub valid_address( $ ) { sub valid_address( $ ) {
my $address = $_[0]; my $address = $_[0];

View File

@ -29,6 +29,7 @@ package Shorewall::Interfaces;
require Exporter; require Exporter;
use Shorewall::Common; use Shorewall::Common;
use Shorewall::Config; use Shorewall::Config;
use Shorewall::IPAddrs;
use Shorewall::Zones; use Shorewall::Zones;
use strict; use strict;

View File

@ -27,6 +27,7 @@ package Shorewall::Nat;
require Exporter; require Exporter;
use Shorewall::Common; use Shorewall::Common;
use Shorewall::Config; use Shorewall::Config;
use Shorewall::IPAddrs;
use Shorewall::Zones; use Shorewall::Zones;
use Shorewall::Interfaces; use Shorewall::Interfaces;
use Shorewall::Chains; use Shorewall::Chains;

View File

@ -26,6 +26,7 @@ package Shorewall::Rules;
require Exporter; require Exporter;
use Shorewall::Common; use Shorewall::Common;
use Shorewall::Config; use Shorewall::Config;
use Shorewall::IPAddrs;
use Shorewall::Zones; use Shorewall::Zones;
use Shorewall::Interfaces; use Shorewall::Interfaces;
use Shorewall::Chains; use Shorewall::Chains;