function retrieves service information corresponding:
getservbyname
getservbyport