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