Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. determine client subnet mask in terminal server

determine client subnet mask in terminal server

Scheduled Pinned Locked Moved Visual Basic
sysadminhelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    samithaslk
    wrote on last edited by
    #1

    Hi all I have developed an application that runs on the Terminal Server. I want to determine the connecting client's IP address and subnet mask to assign them appropriate rights. I have used the wtsclientinfo.dll to get the client's IP address. But I could n't find a way to get the subnet mak. Can anybody help me?:doh: samitha -- modified at 23:50 Monday 20th February, 2006

    P 1 Reply Last reply
    0
    • S samithaslk

      Hi all I have developed an application that runs on the Terminal Server. I want to determine the connecting client's IP address and subnet mask to assign them appropriate rights. I have used the wtsclientinfo.dll to get the client's IP address. But I could n't find a way to get the subnet mak. Can anybody help me?:doh: samitha -- modified at 23:50 Monday 20th February, 2006

      P Offline
      P Offline
      progload
      wrote on last edited by
      #2

      samitha, wtsclientinfo.dll is a wrapper for wtsapi32.dll by Jitendra Kumar, (you should get with him) about that. But regardless, wtsapi32 microsoft documentation for WTS_CLIENT_ADDRESS, which is called by his wrapper has some remarks you may be interested in first: MSDN Remarks: The client network address is reported by the RDP client itself when it connects to the server. This could be different than the address that actually connected to the server. For example, suppose there is a NAT between the client and the server. The client can report its own IP address, but the IP address that actually connects to the server is the NAT address. For VPN connections, the IP address might not be discoverable by the client. If it cannot be discovered, the client can report the only IP address it has, which may be the ISP assigned address. Because the address may not be the actual network address, it should not be used as a form of client authentication. Reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wts_client_address_str.asp[^] progload

      D S 2 Replies Last reply
      0
      • P progload

        samitha, wtsclientinfo.dll is a wrapper for wtsapi32.dll by Jitendra Kumar, (you should get with him) about that. But regardless, wtsapi32 microsoft documentation for WTS_CLIENT_ADDRESS, which is called by his wrapper has some remarks you may be interested in first: MSDN Remarks: The client network address is reported by the RDP client itself when it connects to the server. This could be different than the address that actually connected to the server. For example, suppose there is a NAT between the client and the server. The client can report its own IP address, but the IP address that actually connects to the server is the NAT address. For VPN connections, the IP address might not be discoverable by the client. If it cannot be discovered, the client can report the only IP address it has, which may be the ISP assigned address. Because the address may not be the actual network address, it should not be used as a form of client authentication. Reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wts_client_address_str.asp[^] progload

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Great catch! :-D A fine example of how reading the documentation on what your using can save you from wasting a lot of time. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        1 Reply Last reply
        0
        • P progload

          samitha, wtsclientinfo.dll is a wrapper for wtsapi32.dll by Jitendra Kumar, (you should get with him) about that. But regardless, wtsapi32 microsoft documentation for WTS_CLIENT_ADDRESS, which is called by his wrapper has some remarks you may be interested in first: MSDN Remarks: The client network address is reported by the RDP client itself when it connects to the server. This could be different than the address that actually connected to the server. For example, suppose there is a NAT between the client and the server. The client can report its own IP address, but the IP address that actually connects to the server is the NAT address. For VPN connections, the IP address might not be discoverable by the client. If it cannot be discovered, the client can report the only IP address it has, which may be the ISP assigned address. Because the address may not be the actual network address, it should not be used as a form of client authentication. Reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wts_client_address_str.asp[^] progload

          S Offline
          S Offline
          samithaslk
          wrote on last edited by
          #4

          NAT won't be a problem. Can anybody suggest me a method to find the client's subnet mask giving its IP Address? samitha

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups