* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this package; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * * On Debian GNU/Linux systems, the complete text of the GNU General * Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt ****************************************************************************/ /** * Class and Function List: * Function list: * Classes list: */ ob_implicit_flush(); ini_set('include_path', '/usr/share/ossim/include'); require_once 'classes/Net.inc'; $net = $argv[1]; if (!preg_match("/\\d+\\.\\d+\\.\\d+\\.\\d+\\/\\d+/", $net)) { die("Incorrect CIDR\n"); } $ip_range = Net::expand_CIDR($net); foreach ($ip_range as $ip) { echo $ip . "\n"; }