Solved

Noob Question !

Posted on 2006-10-26
4
196 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
Comment Utility

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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now