Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect LAN or WAN connection
Message
De
28/05/2005 22:30:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
18/05/2005 11:54:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01015414
Message ID:
01018416
Vues:
19
>Any suggestions on how to detect if a workstation running a VFP application, which is installed on a server, is connected to that server via a LAN as opposed to being connected via a WAN?

You can check whether two IP addresses - the client and the server, according to your question - are in the same subnet; provided you can get the information on the respective IP addresses and subnet masks.

For example, if both the client and the server use the more or less standard subnet mask, 255.255.255.0, and if the first three bytes in the IP addresses are the same, then they are in the same subnet.

If there is a WAN connection, then there are usually some routers or similar equipment involved, separating the networks into different subnets. However, a big corporate LAN might also be subdivided into subnets, with the purpose of reducing broadcast domains, and for administrative purposes. In other words, all the above is not a very safe criterion.

You can also do a traceroute to the destination. On a PC, the command would be tracert [IP address] or tracert [domain name]. The output might (sometimes) give some hints to a clever human, but would be quite difficult to interpret by a dumb machine, so this would be difficult to do automatically.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform