473,395 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Getting TCP/IP information.

UJ
I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?

TIA - Jeff.
Aug 27 '06 #1
3 1931
Jeff,

No, not through a regular socket connection. You would have to have
this sent to your client/server as part of your message exchange for your
protocol.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"UJ" <fr**@nowhere.comwrote in message
news:ue**************@TK2MSFTNGP04.phx.gbl...
>I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?

TIA - Jeff.

Aug 27 '06 #2
"UJ" <fr**@nowhere.comwrote
>I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?
Is this really what you're looking for? Most people asking this tend to be
looking for a way to traverse NAT's and Firewalls in order to make direct
P2P connections for thigs like conferencing, or file transfers.

If this is so, you want to lookup the technologies called ICE and STUN.
Using these provides a solid mechanism for getting direct connections even
for 2 machines that are both behind firewalls and using NAT.

However I don't know of any ICE/STUN implementations in .Net. If you find
one, please let me know!

--
Chris Mullins MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Aug 28 '06 #3
UJ wrote:
I can easily get the TCP/IP address of the local machine but I'd also like
to know if the machine is behind a firewall/hub - what the address is that
is being sent over the net.

Is there anyway to get the TCP/IP that is actually being sent out there?
You can ask a service out on the internet what IP it sees.

I once wrote this little hack:

public static string MyIp()
{
WebClient wc = new WebClient();
StreamReader sr = new
StreamReader(wc.OpenRead("http://www.myip.dk/"));
string html = sr.ReadToEnd();
return Regex.Matches(html, @"(?:<title>Your IP:
)(\d+\.\d+\.\d+\.\d+)(?:</title>)")[0].Groups[1].Value;
}
Arne
Aug 28 '06 #4

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

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
0
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the...
0
by: Jim | last post by:
This si a repost, I apologize but perhaps my original inquiry got buried under all the usenet spam... I need some help getting started with a .NET web project for a commercial site. I am new to...
5
by: Brian Henry | last post by:
I have a page which reads an article from the database it has 1 text box, 2 dropdown lists, and a longreat HTML text box. I load the information from the database when the page is set to edit mode...
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
4
by: Hiten | last post by:
Hi, I am trying to find a way to get and change file summary information. I tried using FileInfo class, but it doesn't give me information such as "Author,Title,Rating" etc. Is there a way to...
2
by: dmagliola | last post by:
Hello all, I'm experiencing a problem with ASP.Net for which I can't find a reasonable explanation, or any information. I'm currently developing an application that, through AJAX, asks the...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
4
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.