.\" openfwtk project: str_to_port.3 1-Nov-2000 .TH str_to_port 3 .SH NAME str_to_port() \- a getservbyname frontend .SH SYNOPSIS .nf #include "fwfunc.h" .fi .sp int \fBstr_to_port\fP(char *portstr) .SH DESCRIPTION The \fIstr_to_port\fP function coverts character tcp port name to integer value in network byte order. .SH RETURN VALUES The \fIstr_to_port\fP function returns atoi of portstr if it is all-digit, tcp port number from getservbyname if it is not, and exits with fwtkcfgerr if the service is unknown. .SH SEE ALSO getservbyname(3) .SH HISTORY present in fwtk since v2