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
Solved

Noob Question !

Posted on 2006-10-26
4
199 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
4 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 125 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 125 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 74
PHP preg_replace code convert to Delphi 14 66
MS Access from Delphi 31 60
Delphi Seattle StructureView color 1 14
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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