atop

ATOP(3abz)                        Library calls                       ATOP(3abz)



NAME
       atop - convert a string to a port number

LIBRARIES
       Abz Library (-labz), Debug Library (-ldebug)

SYNOPSIS
       #include <abz/atop.h>

       int atop(in_port_t *port, const char *str);

DESCRIPTION
       The atop() function converts a string to a port number. The string may
       either be a service as specified in /etc/services or a port number.

       The port number is stored in network byte order.

RETURN VALUE
       The atop() function returns 0 if successful or -1 if some error occurred.
       Check errno to see what error occurred.

NOTES
       None of the libabz routines are thread-safe. I'm not planning to change
       this either! For more information, please see
       http://threading.2038bug.com/

       If the library was compiled without the GETSERVBYNAME flag, only port
       numbers may be specified.

SEE ALSO
       services(5)

AUTHOR
       Written by Abraham vd Merwe <abz@blio.com>



Unix                               August 2004                        ATOP(3abz)