Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 59781 invoked from network); 14 Mar 2007 16:23:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 16:23:46 -0000 Received: (qmail 79030 invoked by uid 500); 14 Mar 2007 16:23:53 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 78999 invoked by uid 500); 14 Mar 2007 16:23:53 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 78990 invoked by uid 99); 14 Mar 2007 16:23:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 09:23:53 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [195.135.220.2] (HELO mx1.suse.de) (195.135.220.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 09:23:41 -0700 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 3D69D12205 for ; Wed, 14 Mar 2007 17:23:15 +0100 (CET) Date: Wed, 14 Mar 2007 17:23:15 +0100 From: "Dr. Peter Poeml" To: modules-dev@httpd.apache.org Subject: Check for IP address in network/netmask Message-ID: <20070314162313.GT16396@suse.de> Mail-Followup-To: modules-dev@httpd.apache.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKC5HTBlrbpnwuKu" Content-Disposition: inline X-Useless-Header: If you read this, say 'honk'! User-Agent: Mutt/1.5.13 (2006-08-11) Sender: Peter Poeml X-Virus-Checked: Checked by ClamAV on apache.org --tKC5HTBlrbpnwuKu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, what is the standard way to store network/netmask combos, and check if a client IP address is contained in them? I once saw a function for that but I can't find it now. Maybe it was apr_ipsubnet_test(), as used in modules/aaa/mod_authz_host.c. Probably this does what I need. I find further code in apr/test/testipsub.c. However, I would appreciate pointers to possible alternatives. I would also appreciate pointers to examples where this is used in a module other than mod_authz_host. Thanks! Peter --=20 SUSE LINUX Products GmbH Bug, bogey, bugbear, bugaboo: Research & Development A malevolent monster (not true?); Some mischief microbic; What makes someone phobic; The work one does not want to do. From: Chris Young (The Omnificent English Dictionary In Limerick Form) --tKC5HTBlrbpnwuKu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFF+CFx92K4Je+2lOoRAuclAJ9s+pZ8QTB6/Vi87JsCwte+oPkB7gCfYVK2 pJ9HHRKN6gbs4HlXDllQszI= =huzF -----END PGP SIGNATURE----- --tKC5HTBlrbpnwuKu--