Changeset 536 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 10/31/12 17:56:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r535 r536 29 29 &listSummary &listMaster &listRBlock &listFree &listPool 30 30 &getTypeList &getPoolSelect &findAllocateFrom 31 & getParent &getRoutedCity31 &ipParent &subParent &blockParent &getRoutedCity 32 32 &allocateBlock &updateBlock &deleteBlock &getBlockData 33 33 &getNodeList &getNodeName &getNodeInfo … … 43 43 &listSummary &listMaster &listRBlock &listFree &listPool 44 44 &getTypeList &getPoolSelect &findAllocateFrom 45 & getParent &getRoutedCity45 &ipParent &subParent &blockParent &getRoutedCity 46 46 &allocateBlock &updateBlock &deleteBlock &getBlockData 47 47 &getNodeList &getNodeName &getNodeInfo … … 576 576 577 577 578 ## IPDB:: getParent()579 # Get a block's parent's details580 # Takes a database handle and CIDR block581 # Returns a hashref to the parent routed or containerblock, if any582 sub getParent {578 ## IPDB::ipParent() 579 # Get an IP's parent pool's details 580 # Takes a database handle and IP 581 # Returns a hashref to the parent pool block, if any 582 sub ipParent { 583 583 my $dbh = shift; 584 584 my $block = shift; … … 587 587 " WHERE cidr >>= ?", undef, ($block) ); 588 588 return $pinfo; 589 } # end getParent() 589 } # end ipParent() 590 591 592 ## IPDB::subParent() 593 # Get a block's parent's details 594 # Takes a database handle and CIDR block 595 # Returns a hashref to the parent container block, if any 596 sub subParent { 597 my $dbh = shift; 598 my $block = shift; 599 600 my $pinfo = $dbh->selectrow_hashref("SELECT cidr,custid,type,city,description FROM allocations". 601 " WHERE cidr >>= ?", undef, ($block) ); 602 return $pinfo; 603 } # end subParent() 604 605 606 ## IPDB::blockParent() 607 # Get a block's parent's details 608 # Takes a database handle and CIDR block 609 # Returns a hashref to the parent container block, if any 610 sub blockParent { 611 my $dbh = shift; 612 my $block = shift; 613 614 my $pinfo = $dbh->selectrow_hashref("SELECT cidr,city FROM routed". 615 " WHERE cidr >>= ?", undef, ($block) ); 616 return $pinfo; 617 } # end blockParent() 590 618 591 619
Note:
See TracChangeset
for help on using the changeset viewer.