⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tp.4

📁 早期freebsd实现
💻 4
📖 第 1 页 / 共 2 页
字号:
.\" Copyright (c) 1990, 1991, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"     @(#)tp.4	8.4 (Berkeley) 4/19/94.\".Dd April 19, 1994.Dt TP 4.Os.Sh NAME.Nm TP.Nd.Tn ISOTransport Protocol.Sh SYNOPSIS.Fd #include <sys/socket.h>.Fd #include <netiso/iso_errno.h>.Fd #include <netiso/tp_param.h>.Fd #include <netiso/tp_user.h>.Ft int.Fn socket "[AF_INET, AF_ISO]" SOCK_SEQPACKET 0.Sh DESCRIPTION.PpThe.Tn TPprotocol provides reliable, flow-controlled, two-waytransmission of data and record boundaries. It is a byte-stream protocol and is accessed according tothe.Dv SOCK_SEQPACKETabstraction.The.Tn TPprotocol makes use of a standard.Tn ISOaddress format,including a Network Service Access Point, and a Transport Service EntitySelector.Subclass 4 may make use of the internetInternet address format..PpSockets utilizing the tp protocol are either.Dq activeor.Dq passive .Active sockets initiate connections to passivesockets.  By default.Tn TCPsockets are created active; to create apassive socket the.Xr listen 2system call must be usedafter binding the socket with the.Xr bind 2system call.  Onlypassive sockets may use the .Xr accept 2call to accept incoming connections.  Only active sockets mayuse the.Xr connect 2call to initiate connections..PpPassive sockets may.Dq underspecifytheir location to matchincoming connection requests from multiple networks.  Thistechnique, termed.Dq wildcard addressing ,allows a singleserver to provide service to clients on multiple networks.To create a socket which listens on all networks, the.Tn NSAPportionof the bound address must be void (of length zero).The Transport Selector may still be specifiedat this time; if the port is not specified the system will assign one.Once a connection has been established the socket's address isfixed by the peer entity's location.   The address assigned thesocket is the address associated with the network interfacethrough which packets are being transmitted and received..PpThe.Tn ISOTransport Protocol implemented for.Tn AOS R2at the University of Wisconsin - Madison,and modified for inclusion in the Berkeley Software Distribution,includes classes 0 and 4 of the.Tn ISOtransport protocolsas specified inthe June 1986 version of.Tn IS8073.Class 4 of the protocol provides reliable, sequenced,flow-controlled, two-waytransmission of data packets with an alternate stop-and-wait data path calledthe "expedited data" service.Class 0 is essentially a null transport protocol, which is usedwhen the underlying network service provides reliable, sequenced,flow-controlled, two-way data transmission.Class 0 does not provide the expedited data service.The protocols are implemented as a single transport layer entity that coexists with the Internet protocol suite.Class 0 may be used only in the.Tn ISOdomain.Class 4 may be used in the Internet domain as well as in the.Tn ISOdomain..PpTwo system calls were modified from the previousrelease of the Berkeley Software Distributionto permit the support of the end-of-transport-service-data-unit.Pq Dv EOTSDUindication, and for the receipt and transmission of userconnect, confirm, and disconnect data.See.Xr sendmsg 2and.Xr recvmsg 2 ,and further discussionbelow for the formats of the data in the ancillary data buffer.If the.Dv EOTSDUis not needed, the normal.Xr read 2 ,and.Xr write 2system calls may be used..PpThrough the .Xr getsockoptand.Xr setsockoptsystem calls,.Tn TPsupports several options to control such things as negotiable optionsin the protocol and protocol strategies.The options are defined in.Aq Pa netiso/tp_user.h ,and are described below..PpIn the tables below,the options marked with a pound sign.Ql \&#may be used with.Xr setsockoptafter a connection is established.Others must be used before the connectionis established, in other words,before calling.Xr connector .Xr accept .All options may be used with.Xr getsockoptbefore orafter a connection is established..Bl -tag -width TPOPT_PSTATISTICS.It Dv TPOPT_CONN_DATA(char *) [none].brData to send on.Xr connect .The passive user may issue a.Xr getsockoptcall to retrieve a connection request's user data,after having done the.Xr acceptsystem call without implying confirmation of the connection..PpThe data may also be retrieved by issuing a.Xr recvmsgrequest for ancillary data only,without implying confirmation of the connection.The returned.Va cmsghdrwill contain.Dv SOL_TRANSPORTfor the.Va csmg_leveland.Dv TPOPT_CONN_DATAfor.Va cmsg_type..It Dv TPOPT_DISC_DATA \&#(char *) [none].brData to send on.Xr close .Disconnect data may be sent by the side initiating the closebut not by the passive side ("passive" with respect to the closingof the connection), so there is no need to read disconnect dataafter calling.Xr close .This may be sent by a.Xr setsockoptsystem call, or by issuing a.Xr sendmsgrequest specifying ancillary data only.The user-provided.Va cmsghdrmust contain.Dv SOL_TRANSPORTfor.Va csmg_leveland.Dv TPOPT_DISC_DATAfor.Va cmsg_type .Sending of disconnect data will in of itself tear down (or reject)the connection..It Dv TPOPT_CFRM_DATA \&#(char *) [none].brData to send when confirming a connection.This may also be sent by a .Xr setsockoptsystem call, or by issuing a.Xr sendmsgrequest, as above.Sending of connect confirm data will cause the connectionto be confirmed rather than rejected..It Dv TPOPT_PERF_MEAS \&#Boolean..brWhen.Xr true ,performance measurements will be keptfor this connection.  When set before a connection is established, theactive side will use a locally defined parameter on theconnect request packet; if the peer is another.Tn ARGOimplementation, this will cause performance measurement to beturned on on the passive side as well.See.Xr tpperf 8 ..It Dv TPOPT_PSTATISTICSNo associated value on input.On output,.Ar struct tp_pmeas ..PpThis command is used to read the performance statistics accumulatedduring a connection's lifetime.It can only be used with.Xr getsockopt .The structure it returns is described in.Aq Pa netiso/tp_stat.h .See.Xr tpperf 8 ..It Dv TPOPT_FLAGSunsigned integer. [0x0].brThis command can only be used with.Xr getsockopt .See the description of the flags below..It Dv TPOPT_PARAMS.Ar struct tp_conn_param.brUsed to get or set a group parameters for a connection.The.Ar struct tp_conn_paramis the argument used with the.Xr getsockoptor.Xr setsockoptsystem call. It is described in .Aq Pa netiso/tp_user.h ..PpThe fields of the.Ar tp_conn_paramstructure aredescribed below..El.Pp.Em Values for TPOPT_PARAMS:.Bl -tag -width p_sendack_ticks.It Ar p_Nretransnonzero short integer [1].brNumber of times a TPDUwill be retransmitted before thelocal TP entity closes a connection..It Ar p_dr_ticksnonzero short integer [various].brNumber of clock ticks between retransmissions of disconnect requestTPDUs..It Ar p_dt_ticksnonzero short integer [various].brNumber of clock ticks between retransmissions of dataTPDUs.This parameter applies only to class 4..It Ar p_cr_ticksnonzero short integer [various].brNumber of clock ticks between retransmissions of connection requestTPDUs..It Ar p_cc_ticksnonzero short integer [various].brNumber of clock ticks between retransmissions of connection confirmTPDUs.This parameter applies only to class 4..It Ar p_x_ticksnonzero short integer [various].brNumber of clock ticks between retransmissions of expedited dataTPDUs.This parameter applies only to class 4..It Ar p_sendack_ticksnonzero short integer [various].brNumber of clock ticks that the local TP entitywill wait before sending an acknowledgment for normal data(not applicable if the acknowledgement strategy is.Dv TPACK_EACH ) .This parameter applies only to class 4..It Ar p_ref_ticksnonzero short integer [various].brNumber of clock ticks for which a reference willbe considered frozen after the connection to whichit applied is closed.This parameter applies to classes 4 and 0 in the .Tn ARGO

⌨️ 快捷键说明

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