TCP/IP number and Port Check

Sarah sarahr at genesearch.com.au
Mon Mar 17 22:20:21 EST 2003


On Monday, March 17, 2003, at 10:32  pm, Rolf Kocherhans wrote:

> Has anyone already made a script which checks a field if a user has 
> entered a correct
> TCP/IP address ?
I haven't but 2 approaches spring to mind:
1. try using the hostnameToAddress function to see if the IP number 
translates to a valid server name.
2. as #1 won't give any answer with an invalid entry, blank entry or 
one that isn't registered e.g. a local network address, you could write 
a function that checked that there were 4 sections separated by periods 
and that each was a number between 0 and 255.
>
> Also does anyone know from where to where portnumbers go ?
here is a link to a site that lists the currently assigned port numbers:
http://www.iana.org/assignments/port-numbers

Cheers,
Sarah





More information about the use-livecode mailing list