how to get ip address through port

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zahid313
    New Member
    • Nov 2008
    • 20

    how to get ip address through port

    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.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What?
    Do you want to allow connects to a port on your computer?

    Comment

    • uogen
      New Member
      • Jan 2009
      • 18

      #3
      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

      Comment

      • zahid313
        New Member
        • Nov 2008
        • 20

        #4
        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:5859 7 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

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          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

          Comment

          • zahid313
            New Member
            • Nov 2008
            • 20

            #6
            is it even possible in c# or vb.net

            Comment

            • Plater
              Recognized Expert Expert
              • Apr 2007
              • 7872

              #7
              Originally posted by zahid313
              is it even possible in c# or vb.net
              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.

              Comment

              Working...