upscli_splitaddr (3) - Linux Man Pages
upscli_splitaddr: split a listening address into its components
upscli_splitaddr - split a listening address into its components
int upscli_splitaddr(const char *buf, char **hostname, int *port)
A listening address definition is specified according to this format:
You must free(3) the pointer hostname when you are done with it to avoid memory leaks.