Rivoreo Source Code Repositories
src.rivoreo.one
/
net
/
ipfilter
/
f1bfecffbe415f749220c6befcf2a1b4a395de36
/
.
/
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
;
}