Solved

Noob Question !

Posted on 2006-10-26
4
197 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Thread safe  opinion 7 126
Delphi Dbf export problem to a Visual Foxpro application 6 160
Delphi: how to send PJL commands to printer 3 88
Multiple image collision 13 69
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

8 Experts available now in Live!

Get 1:1 Help Now