socket_from_name.3ncs
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3NCS 代码 · 共 103 行
3NCS
103 行
.TH socket_from_name 3ncs.SH Namesocket_from_name \- convert a name and port number to a socket address.SH Syntax#include <idl/c/socket.h>void socket_$from_name(\fIfamily, name, nlength, port, sockaddr, slength,\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\fIstatus\fP).nfunsigned long \fIfamily\fP;socket_$string_t \fIname\fP;unsigned long \fInlength\fP;unsigned long \fIport\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/socket.ins.pas'\fR.\".\"\fBprocedure socket_$from_name(\fR.\" \fBin \fIfamily\fB: unsigned32;\fR.\" \fBin \fIname\fB: socket_$string_t;\fR.\" \fBin \fInlength\fB: unsigned32;\fR.\" \fBin \fIport\fB: unsigned32;\fR.\" \fBout \fIsockaddr\fB: socket_$addr_t;\fR.\" \fBin out \fIslength\fB: unsigned32;\fR.\" \fBout \fIstatus\fB: status_$t);\fR.\".DE.SH Arguments.TP\fIfamily\fRThe integer representation of an address family. Value can be.B socket_$internet or.B socket_$unspecIf the \fIfamily\fR parameter is \fBsocket_$unspec\fR,then the \fIname\fR parameter is scanned for a prefix of \fIfamily\fB:\fR(for example, \fBip:\fR)..TP\fIname\fRA string in the format \fIfamily\fB:\fIhost\fB\|[\|\fIport\fB\|]\|\fR,where \fIfamily\fB:\fR, \fIhost\fR, and \fB\|[\|\fIport\fB\|]\|\fR are all optional..if t .sp .5The \fIfamily\fR is an address family.The only valid.I familyis \fBip\fR.If you specify a \fIfamily\fR as part of the \fIname\fR parameter,you must specify \fBsocket_$unspec\fR in the \fIfamily\fR parameter..if t .sp .5The \fIhost\fR is a host name.A leading number sign \fB(#)\fR can be used to indicate thatthe host name is in the standard numeric form(for example, #192.9.8.7).If \fIhost\fR is omitted, the local host name is used..if t .sp .5The \fIport\fR is a port number.If you specify a \fIport\fR as part of the \fIname\fR parameter,the \fIport\fR parameter is ignored..TP\fInlength\fRThe length, in bytes, of \fIname\fR..TP\fIport\fRA port number.If you specify a port number in the \fIname\fR parameter,this parameter is ignored..TP\fIsockaddr\fRA socket address..TP\fIslength\fRThe length, in bytes, of \fIsockaddr\fR..TP\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 socket_$from_nameroutine converts a textual address family, host name, and port number to a socket address..NXR "Operations on Socket Addresses" "socket_from_name"The address family and the port number can beeither specified as separate parameters orincluded in the \fIname\fR parameter..ig.SH External VariablesThis section describes external variables used in \fBsocket_$\fR routines..TP 20...SH Files.PN /usr/include/idl/socket.idl.br.PN /usr/include/idl/c/socket.h.SH See Alsointro(3ncs), socket_family_from_name(3ncs), socket_to_name(3ncs)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?