?
Solved

Noob Question !

Posted on 2006-10-26
4
Medium Priority
?
205 Views
Last Modified: 2010-04-05
Hi experts, this is my noob question

My client application has got a textbox on the form.

User will type the IP address in the textbox then click "Connect" button to connect to the server

The Computer is running "the Server application" and the computer is running "the Client Application" are on the same Local Area Network

My purpose : the server computer and client computer are on the same Local Area Network

So in the client application , how can the client application can dectect if the ip address which entered by the user is LAN IP or Internet IP

and in the server application , how can the server application can dectect if the ip address of the connection from client application  is LAN IP or Internet IP






 
0
Comment
Question by:lhquang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 500 total points
ID: 17817089

When dealing with ip addresses, the following applies:

192.x.x.x // Commonly handed out by routers
10.x.x.x
172.x.x.x // not very common, but still seen

These IP addresses are defined as private address numbers. If the entered address starts with one of these, it is coming from an internal (private) network, otherwise its external (WAN/Internet).

Regards,
Russell


0
 

Assisted Solution

by:pvlogchem
pvlogchem earned 500 total points
ID: 17864683
I found a page for you where you can find a method to check if a IP-address is inside the local network (look for the method called "WSocketIsAddrInSubNet") : http://www.mail-archive.com/twsocket@elists.org/msg06158.html
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question