The getservbyname function gets the service record given its NAME and PROTOCOL.
getservbyname NAME, PROTOCOL