rpc_name_to_sockaddr.3ncs

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3NCS 代码 · 共 115 行

3NCS
115
字号
.TH rpc_name_to_sockaddr 3ncs.SH Namerpc_name_to_sockaddr \- convert a host name and port number to a socket address (client or server).SH Syntax#include <idl/c/rpc.h>void rpc_$name_to_sockaddr(\fIname, nlength, port, family, sockaddr,\fP\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\fIslength, status\fP).nfunsigned char \fIname\fP;unsigned long \fInlength\fP;unsigned long \fIport\fP;unsigned long \fIfamily\fP;socket_$addr_t *\fIsockaddr\fP;unsigned long *\fIslength\fP;status_$t *\fIstatus\fP;.fi.\".SH SYNOPSIS (PASCAL).\".DS.\"\fB%include '/usr/include/idl/pas/rpc.ins.pas'\fR.\".\"\fBprocedure rpc_$name_to_sockaddr(\fR.\"	\fBin \fIname\fB: array [0..255] of char;\fR.\"	\fBin \fInlength\fB: unsigned32;\fR.\"	\fBin \fIport\fB: unsigned32;\fR.\"	\fBin \fIfamily\fB: unsigned32;\fR.\"	\fBout \fIsockaddr\fB: socket_$addr_t;\fR.\"	\fBout \fIslength\fB: unsigned32;\fR.\"	\fBout \fIstatus\fB: status_$t);\fR.\".DE.SH Arguments.TP 20\fIname\fRA string that contains a host name and, optionally, a port and an address family.The format is \fIfamily\fB:\fIhost\fB\|[\|\fIport\fB\|]\|\fR,where \fIfamily\fB:\fR and \fB\|[\|\fIport\fB\|]\|\fR are optional..#LIf you specify a \fIfamily\fR as part of the \fIname\fR parameter,you must specify \fBsocket_$unspec\fR in the \fIfamily\fR parameter..#LThe \fIfamily\fR part of the name parameter is \fBip\fR;\fIhost\fR is the host name;\fIport\fR is an integer port number..TP 20\fInlength\fRThe number of characters in \fIname\fR. \" terminator?.TP 20\fIport\fRThe socket port number.This parameter should have the value \fBrpc_$unbound_port\fRif you are not specifying a well-known port;in this case, the returned socket address will specifythe Local Location Broker (LLB) forwarding port at \fIhost\fR.If you specify the port number in the \fIname\fR parameter,this parameter is ignored..TP 20\fIfamily\fRThe address family to use for the socket address.This value corresponds to the communications protocolused to access the socket and determines how the \fIsockaddr\fR is expressed.If you specify the address family in the \fIname\fR parameter,this parameter must have the value \fBsocket_$unspec\fR..TP 20\fIsockaddr\fRThe socket address corresponding to \fIname\fR, \fIport\fR, and \fIfamily\fR..TP 20\fIslength\fRThe length, in bytes, of \fIsockaddr\fR..TP 20\fIstatus\fRThe completion status.If the completion status returned in.PN status\&.allis equal to.B status_$ok ,then the routine that supplied it was successful..SH DescriptionThe .PN rpc_$name_to_sockaddrroutine provides the socket address for a socket,given the host name, the port number, and the address family..PP.NXR "Interface to the Remote Procedure Call" "rpc_name_to_sockaddr"You can specify the socket address informationeither as one text string in the \fIname\fR parameteror by passing each of the three elements as separate parameters(.I name,.I port,and.I family);in the latter case, the \fIname\fR parameter should contain only the hostname..SH DiagnosticsThis section lists status codes for errors returned by this .PN rpc_$routine in.PN status\&.all ..TP 20\fBrpc_$not_in_call\fRAn internal error..TP 20\fBrpc_$proto_error\fRAn internal protocol error..NT This routine has been superseded by the .PN socket_$from_nameroutine..NE.SH Files.PN /usr/include/idl/c/rpc.h.br.PN /usr/include/idl/rpc.idl.SH See Alsointro(3ncs), rpc_sockaddr_to_name(3ncs), socket_from_name(3ncs)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?