By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

how to get ip address through port

P: 20
what do i have to do to get the IP address connected to my computer on a certain port, after i provide the port number.
Jan 19 '09 #1
Share this Question
Share on Google+
6 Replies


Plater
Expert 5K+
P: 7,872
What?
Do you want to allow connects to a port on your computer?
Jan 19 '09 #2

uogen
P: 18
hi
i cann't understand you but if you want ip address
right click on my network connection-->properties-->choose view status of this connection -->details
Jan 19 '09 #3

P: 20
remote computer is already connected to a certain port and i know that port number
now i want to find out whats the IP address of that remoate computer

like netstat command in windows
where a list of IP addresses and ports is shown

Proto Local Address Foreign Address State
TCP pcname:1027 FLH1Adu111.tky.mesh.ad.jp:58597 ESTABLISHED

by giving 1027 as port number i want to be able to get FLH1Adu111.tky.mesh.ad.jp

i hope i have made my question clear
thanks
Jan 19 '09 #4

Plater
Expert 5K+
P: 7,872
Ahh ok, so you want to know the IP address of a computer that is talking to yours, based on the port number.
Hmm. Not sure I know how to do that without processing netstat's output
Jan 19 '09 #5

P: 20
is it even possible in c# or vb.net
Jan 24 '09 #6

Plater
Expert 5K+
P: 7,872
@zahid313
Not directly I don't think. Pretty sure you will have to use the Process class and get the output of netstat for it.
There might be some Win32_API you can use for it, but I don't know it.
Jan 26 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.