I have made a port scanner in java which works correctly, now all i would like to have is a way of telling my user what the port is being used for. The desired method would ideally be something that takes the input as an int representing the port and gives back the description of that port. Such as the input 53 would result in the output “DNS”. How would i achieve something like this other than plugging in predetermined data.
Share
I do not think there is any API in the core Java or Android that provides this information. I suspect you will have to provide the predetermined list yourself. This should not be difficult: you can grab the list from a number of places, including http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers