net.ultrametrics.security
Class  PortLookup
java.lang.Object
  |
  +--net.ultrametrics.security.PortLookup
- public class PortLookup- extends java.lang.Object
A class and command-line utility which converts a port number into a 
 description of its use, according to the IANA registry.
 
 
Usage: PortLookup port/protocol [-f | --file file]
If a local file is not specified, default is
http://www.isi.edu/in-notes/iana/assignments/port-numbers
If you have a slow (or no!) network connection, this might take a
while. Use -f instead.
i.e. java net.ultrametrics.security.PortLookup 7/udp 23/tcp -f /etc/services
 
 
| Method Summary | 
|  java.lang.String | doQuery(java.lang.String query)Lookup query in the services table.
 | 
| static void | main(java.lang.String[] args)main()
 | 
|  void | processQueries()For each element in queries, lookup the service.
 | 
|  void | readServices(java.lang.String fileName)Read the services url or file and populate the services Hashtable.
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
 
PortLookup
public PortLookup()
doQuery
public java.lang.String doQuery(java.lang.String query)
- Lookup query in the services table.
readServices
public void readServices(java.lang.String fileName)
                  throws java.io.FileNotFoundException,
                         java.io.IOException
- Read the services url or file and populate the services Hashtable.- 
- Parameters:
- fileName- the name of the services file
 
processQueries
public void processQueries()
- For each element in queries, lookup the service.
main
public static void main(java.lang.String[] args)
- main()- 
- See Also: 
- parseArgs