2 Replies - 223 Views - Last Post: 07 December 2012 - 03:41 AM Rate Topic: -----

#1 ghazalrosebud  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-December 12

problem : Are two ips in the same network or not ?

Posted 07 December 2012 - 02:37 AM

I want to know how can I write a program that get two ips from client and convert them to binary then add it to its subnet mask .

one answer in this site exists , but it does not work !
Is This A Good Question/Topic? 0
  • +

Replies To: problem : Are two ips in the same network or not ?

#2 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2773
  • View blog
  • Posts: 11,720
  • Joined: 20-September 08

Re: problem : Are two ips in the same network or not ?

Posted 07 December 2012 - 03:16 AM

You can forget 'binary' - that[s just a String thing. All you need is the ip address as a number then you can do bitwise operations on it:
http://technojeeves....dress-to-number
Was This Post Helpful? 0
  • +
  • -

#3 ghazalrosebud  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 07-December 12

Re: problem : Are two ips in the same network or not ?

Posted 07 December 2012 - 03:41 AM

we should add ip with its sub net mask to get net id then compair two net ids ...
I need to the answer quikley , thans alot
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1