In Kixtart you can use the @ras macro, which will return Number of active Remote Access Service (RAS) connections.
An example:

IF (@ras <> 0)
? "RAS connection detected."
? "this is not a RAS connection."

Additional Infomation from Microsoft on this -
How to Determine Whether a Client Is Connected by RAS or LAN

[ 09. March 2003, 08:57: Message edited by: kdyer ]
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's