472,958 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Is local IP Addresses viewable to remote IP Address?

I have an issue where I have a remote IP Address, and I need to discover the
local network interface IP Address which is viewable to the remote IP Address
(for UPnP document purposes). For example, if I have the remote IP Address
10.0.0.4, and I know all of the local IP Addresses:

127.0.0.1
10.0.0.5
10.1.0.20
192.168.0.5
157.54.185.126

How can I determine which of these IP addresses, without connecting to the
remote machine, that if broadcast over that network interface, the remote
device could see the broadcast and also connect to the local machine at that
IP address. I was looking at some properties in the NetworkInterface class
and stuff, but nothing was obvious to me. I hope I am explaining the problem
well enough.

Thanks

Jun 27 '08 #1
1 2326
On Wed, 04 Jun 2008 18:59:02 -0700, Agendum
<Ag*****@discussions.microsoft.comwrote:
[...]
How can I determine which of these IP addresses, without connecting to
the
remote machine, that if broadcast over that network interface, the remote
device could see the broadcast and also connect to the local machine at
that
IP address.
Well, given your remote IP address, you should be able to apply your local
subnet mask to the remote address and each of your local addresses, and if
they result is equal then those addresses are on the same subnet.

But, you really shouldn't need to do this. Just broadcast to
IPAddress.Any, and assuming the remote machine is reachable, it will
receive the broadcast and can use the origin IP address to determine how
to connect back. There should be no reason for your local process to know
or care what the configured IP address is.

Pete
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: miles111 | last post by:
Basically, can I execute a php script from within a php script? Heres some details: I'm using a remote script to get my local ip address using $HTTP_SERVER_VARS; This works. Now I want to run...
4
by: Arne | last post by:
Hi, Probably an easy answer to this, but I have not been able to figure it out. How can I find the IP-address of the machine that my Java-program is running on ? Could not find any methods in...
0
by: Michael Höhne | last post by:
Hi, we're developing some web services and use the local development server of Visual Studio 2005 to create, run and debug the project. The web service methods connect to a database hosted on a...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
4
by: Tom | last post by:
I come from C but don't really understand why in C++ you can return a temporary object from a function. For example: class Test { public: Test() { cout << "Address of object: " <<this...
5
by: Hooyoo | last post by:
Hi, here, How to get local machine name and IP address? Thanks.
2
by: daz_oldham | last post by:
Hi everyone I'm trying to lock my SQL Server Desktop Edition down which is running on a relatively fresh install of Windows 2003 Server Standard Edition which is a dedicated server from...
7
by: RN1 | last post by:
Is it possible to connect to my local SQL Server 2005 database from a remote web server? If yes, what ConnectionString do I use? Thanks, Ron
1
code green
by: code green | last post by:
I have had 3 seperate procedures running happily for a couple of years that I now wish to merge into one. 1. Collect list of email addresses from Access on local server. Write these addresses to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.