Changeset 118 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 01/06/05 15:03:33 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r108 r118 23 23 @EXPORT_OK = qw( 24 24 %disp_alloctypes %list_alloctypes @citylist @poplist @masterblocks 25 %allocated %free %routed %bigfree 25 26 &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock &deleteBlock 26 27 &mailNotify … … 30 31 %EXPORT_TAGS = ( ALL => [qw( 31 32 %disp_alloctypes %list_alloctypes @citylist @poplist @masterblocks 33 %allocated %free %routed %bigfree 32 34 &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock 33 35 &deleteBlock &mailNotify … … 43 45 our @poplist; 44 46 our @masterblocks; 47 our %allocated; 48 our %free; 49 our %routed; 50 our %bigfree; 45 51 46 52 # Let's initialize the globals. … … 77 83 for (my $i=0; my @data = $sth->fetchrow_array(); $i++) { 78 84 $masterblocks[$i] = new NetAddr::IP $data[0]; 85 $allocated{"$masterblocks[$i]"} = 0; 86 $free{"$masterblocks[$i]"} = 0; 87 $bigfree{"$masterblocks[$i]"} = 128; # Larger number means smaller block. 88 # Set to 128 to prepare for IPv6 89 $routed{"$masterblocks[$i]"} = 0; 79 90 } 80 91 return (undef,$sth->errstr) if $sth->err;
Note:
See TracChangeset
for help on using the changeset viewer.