#include <cat/catutil.h>
catnet_serv *catnet_servbyport(in port, const char *proto);
typedef struct catnet_serv { char **names; /* name, alias, ..., NULL */ int port; /* port number */ } catnet_serv;
The names parameter will contain the name of the service and any aliases. Port will contain the port number for the service.
The returned pointer points to dynamically allocated memory that needs to be free by the caller with a call to free().