From owner-freebsd-questions@FreeBSD.ORG Fri Aug 1 15:58:19 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE62A1065676 for ; Fri, 1 Aug 2008 15:58:19 +0000 (UTC) (envelope-from d.hill@yournetplus.com) Received: from duane.dbq.yournetplus.com (duane.dbq.yournetplus.com [65.124.230.214]) by mx1.freebsd.org (Postfix) with ESMTP id 838E38FC26 for ; Fri, 1 Aug 2008 15:58:19 +0000 (UTC) (envelope-from d.hill@yournetplus.com) Received: by duane.dbq.yournetplus.com (Postfix, from userid 1001) id 36DB73E2C20; Fri, 1 Aug 2008 15:57:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by duane.dbq.yournetplus.com (Postfix) with ESMTP id 347FE3E2C1F; Fri, 1 Aug 2008 15:57:55 +0000 (UTC) Date: Fri, 1 Aug 2008 15:57:55 +0000 (UTC) From: Duane Hill X-X-Sender: duane@duane.dbq.yournetplus.com To: Mark Wilson In-Reply-To: <8CAC1FE1B91EC30-116C-2BF2@MBLK-M10.sysops.aol.com> Message-ID: References: <8CAC1FE1B91EC30-116C-2BF2@MBLK-M10.sysops.aol.com> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions@freebsd.org Subject: Re: Question re IPs-to-CIDR conversion program X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d.hill@yournetplus.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2008 15:58:20 -0000 On Fri, 1 Aug 2008, Mark Wilson wrote: > > I'm trying to write a program that will take 2 IPs and return an appropriate CIDR which contains both. > I found this file: ips-to-cidr-nets.pl listed under ~eivind on FreeBSD, which sounds like it might be a good model. > Unfortunately, I can't download the file (get "Forbidden") page, nor locate user "eivind" on the FreeBSD Homepages page to ask him/her about it. > (It's dated 2001, in case that helps; apparently eivind is long gone...) > > 1. Can anyone get me a copy of this program? Or... > 2. Put me in touch with its author so I can ask about it?? Or... > 3. Point me to another program which does what I need? > > Thanks. I'm very new to all this; I was able to cobble together a CIDR-to-IPs calculator in JavaScript, but going this other direction seems much harder, and far more confusing. If you know anything about Perl, you can use the port: /usr/ports/net/p5-Net-CIDR-Lite to convert back-and-forth. For documentation, I referred to: http://search.cpan.org/dist/Net-CIDR-Lite/Lite.pm -d