03-13-2013 04:00 AM
Hi all!
I have a Client/Server connection on a network, and I wish to determine whether they are part of the same subnet.
The server is installed on a NI cFP-2220, so I can not use any system exec commands to access the network settings.
My code so far is just determine whether the client and server are both on localhost.
Please see attachment!
Regards
Paul
Solved! Go to Solution.
03-13-2013 04:53 AM
Hi,
I will try aswer.
Lets M as Local Host Subnet mask,
H as Local Host IP and
R as Remote Host IP
Do the bitwise oprations
(H and M) xor R
If 0 then the Subnets of Remote and Local hosts are same.
03-13-2013 07:25 AM
Hi!
Thanks for replying.
After searching google, I think this is the right way to do it: (Ref)
(M and H) xOR (M and R)
Thank you for leading me on the right track!
Regards,
Paul