2006-05-31 22:43:24 +00:00
|
|
|
.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
|
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
|
2007-12-23 07:50:04 +00:00
|
|
|
.TH GETRPCPORT 3 2007-12-23 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
getrpcport \- get RPC port number
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
2007-12-23 07:50:04 +00:00
|
|
|
.BI "int getrpcport(char *" host ", int " prognum ", int " versnum \
|
|
|
|
", int " proto );
|
2004-11-03 13:51:07 +00:00
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
2005-10-19 07:07:02 +00:00
|
|
|
.BR getrpcport ()
|
2004-11-03 13:51:07 +00:00
|
|
|
returns the port number for version
|
|
|
|
.I versnum
|
|
|
|
of the RPC program
|
|
|
|
.I prognum
|
|
|
|
running on
|
|
|
|
.I host
|
|
|
|
and using protocol
|
|
|
|
.IR proto .
|
|
|
|
It returns 0 if it cannot contact the portmapper, or if
|
|
|
|
.I prognum
|
2007-04-12 22:42:49 +00:00
|
|
|
is not registered.
|
|
|
|
If
|
2004-11-03 13:51:07 +00:00
|
|
|
.I prognum
|
|
|
|
is registered but not with version
|
|
|
|
.IR versnum ,
|
|
|
|
it will still return a port number (for some version of the program)
|
|
|
|
indicating that the program is indeed registered.
|
|
|
|
The version mismatch will be detected upon the first call to the service.
|
2006-08-04 12:39:17 +00:00
|
|
|
.SH "CONFORMING TO"
|
2007-04-12 22:42:49 +00:00
|
|
|
Not in POSIX.1-2001.
|
2006-08-04 12:39:17 +00:00
|
|
|
Present on the BSDs, Solaris, and many other systems.
|