RE: [fw-general] IP calculations

2008-07-31 Thread Vincent de Lau
 -Original Message-
 From: Bill Karwin [mailto:[EMAIL PROTECTED]

 I would guess that most people who need to do range matching, subnets,
etc.
 simply convert an IP address string to its packed binary equivalent, and
 then use PHP bitwise operators.  No need to have an OO interface for
 something this simple.

Why not? As everything with ZF: You don't have to use it. Having a 'wrapper'
makes this stuff more accessible.

Last night I also thought of IPv6. I suppose similar calculations and
formatting stuff might be necessary and they are more complex than IPv4.
Wrapping this and maybe some other stuff (MAC, IPX) into
Zend_Network_Adressing might be useful.

Vincent de Lau
 [EMAIL PROTECTED]



Re: [fw-general] IP calculations

2008-07-30 Thread Micah Gersten
I haven't heard any responses.  Does anyone have any thoughts on this? 
Is there a better list for this?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Micah Gersten wrote:
 Does Zend have any functions for IP calculations?  I looked in the Docs,
 but couldn't find any.  Has anyone suggested this?

   


Re: [fw-general] IP calculations

2008-07-30 Thread till
Hi,

On Wed, Jul 30, 2008 at 4:30 PM, Micah Gersten [EMAIL PROTECTED] wrote:
 I haven't heard any responses.  Does anyone have any thoughts on this?
 Is there a better list for this?

can you explain what IP calculations do?

Cheers,
Till


Re: [fw-general] IP calculations

2008-07-30 Thread Bill Karwin



Micah Gersten wrote:
 
 Does Zend have any functions for IP calculations?  I looked in the Docs,
 but couldn't find any.  Has anyone suggested this?
 

As Till mentioned, we may not have a clear understanding of what
calculations you have in mind.

I would guess that most people who need to do range matching, subnets, etc.
simply convert an IP address string to its packed binary equivalent, and
then use PHP bitwise operators.  No need to have an OO interface for
something this simple.

http://php.net/inet_pton
http://php.net/inet_ntop
http://php.net/language.operators.bitwise

If you have some other types of calculations in mind, you're going to have
to be more explicit.

Regards,
Bill Karwin
-- 
View this message in context: 
http://www.nabble.com/IP-calculations-tp18717349p18743238.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] IP calculations

2008-07-30 Thread Micah Gersten
Yes.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Vincent de Lau wrote:
 From: till [mailto:[EMAIL PROTECTED]

 On Wed, Jul 30, 2008 at 4:30 PM, Micah Gersten [EMAIL PROTECTED]
 wrote:
 
 I haven't heard any responses.  Does anyone have any thoughts on
   
 this?
 
 Is there a better list for this?
   
 can you explain what IP calculations do?
 

 I'm guessing this would be subnet calculations like:
 CIDR 192.168.123.45/25:

 Network: 192.168.123.0
 Range: 192.168.123.0-192.168.123.127
 Netmask: 255.255.255.128

 Vincent de Lau
  [EMAIL PROTECTED]

 PS: To the list this time...