Rivoreo Source Code Repositories
src.rivoreo.one
/
net
/
ipfilter
/
6e0687ad3cc171ac63438a69eed7c4f075c11638
/
.
/
lib
/
getport.c
blob: 838f034a51258a1855f155ad745e9a445ccd77f7 [
file
] [
log
] [
blame
] [
raw
]
#include
"ipf.h"
int
getport
(
name
)
char
*
name
;
{
struct
servent
*
s
;
s
=
getservbyname
(
name
,
NULL
);
if
(
s
!=
NULL
)
return
s
->
s_port
;
return
0
;
}