📄 draft-bidulock-tsvwg-sctptpi-00.me
字号:
The size of CDATA (Connection Data) should be set to -1 to indicate that theprovider supports the transfer of data with connect primitives and that thereis no limit on the maximum amount of data sent with the connect primitives..ip "\fIDDATA_size\fR"The size of DDATA (Disconnect Data) should be set to -1 to indicate that theprovider supports the transfer of data with disconnect primitives and thatthere is no limit on the maximum amount of data sent with the disconnectprimitives. (Note: this only really has practical use with orderly releaseprimitives \fBT_ORDREL_REQ\fR and \fBT_ORDREL_IND\fR.).ip "\fIADDR_size\fR"If the provider has a restriction on the maximum number of IP addresses whichcan be provided in an SCTP endpoint address, this size should be set toreflect that value. Otherwise, this value should be set to -1 to indicatethat there is no limit on the number of IP addresses which are provided withany primitive..ip "\fIOPT_size\fR"If the provider has a restriction on the maximum number of options which canbe provided in an operation, this size should be set to reflect that value.Otherwise, this value should be set to -1 to indicate that there is no limiton the number of options which are provided with any primitive..ip "\fITIDU_size\fR"This should be set to the system-tunable system limit on the maximum size of aSTREAMS message. It might be possible to set this value to the currentmaximum size of the data in a DATA chunk which will currently fit within thepath MTU, however, the provider cannot reject TIDUs which are larger than thisdynamic value but which are smaller than the value first advertized when theSTREAM was opened..ip "\fISERV_type\fR"This field should be set to \fBT_COTS_ORD\fR to indicate that the SCTPprovider is connection oriented with orderly release support..ip "\fICURRENT_state\fR"This field should be set to the TPI provider state..ip "\fIPROVIDER_flag\fR"This field should NOT have \fBSENDZERO\fR set (because SCTP does not supportthe sending of zero-length TSDUs in general) and should have \fBXPG4_1\fR setto indicate support for XPG4 semantics (\fBT_ADDR_REQ\fR and\fBT_ADDR_ACK\fR)..ba -4.sh 3 "Binding and Listening".lpOnce a STREAM is opened the provider places the STREAM in the \fBTS_UNBND\fRstate and the STREAM is available for binding with the \fBT_BIND_REQ\fRprimitive and will be placed in the \fBTS_BIND\fR state. A STREAM which is inthe \fBTS_BIND\fR state may be unbound again using the \fBT_UNBIND_REQ\fRprimitive and returned to the \fBTS_UNBND\fR state. Unlike BSD sockets, thispermits a STREAM to be reused for another connection without closing andreopening another STREAM..sh 4 "T_BIND_REQ, T_BIND_ACK".lpSTREAMS must be bound to a local protocol address before they can becomeinvolved in a connection and used for data transfer. The semantics forbinding and unbinding STREAMS are identical to those provided in the TransportProvider Interface. The only specifics of the SCTP implementation lie in theformat and interpretation of the transport address. The \fBT_BIND_REQ\fRprimtive provides an opaque protocol address as indicated by \fIADDR_length\fRand \fIADDR_offset\fR which in the SCTP implementation has the followingformat:.(l\fCtypedef struct sctp_addr { uint16_t port; uint32_t addr[0];} sctp_addr_t;.)lWhere.ba +4.ip "\fIport\fR"indicates the 16-bit (host order) port number to which to bind; and,.ip "\fIaddr\fR"indicates an array of 32-bit IPv4 addresses (host order) to which to bind..ba -4.lpThe transport address will be interpreted according to the following rules bythe SCTP Transport Provider:.npIf the transport address is not provided (i.e. \fIADDR_length\fR is zero), theSCTP provider will assign an available port number from the range of portnumbers available to SCTP and will bind the STREAM to any and all IPv4addresses which are available to the SCTP Transport Provider..npIf the transport address is provided, but does not contain any IPv4 addresses,the SCTP Transport Provider will bind the STREAM to any and all IPv4 addresseswhich are available to the SCTP Transport Provider..npIf the transport address is provided with the \fIport\fR set to zero, and the\fICONIND_number\fR is also set to zero, the SCTP TP will assign a portnumber..npIf the transport address is provided with the \fIport\fR set to zero, and the\fICONIND_number\fR is non-zero, the SCTP TP will treat the STREAM as a"default listener." This \fIdefault listener\fR will receive indications forany port number on the bound IPv4 addresses which are not otherwise bound.One and only one STREAM may be bound as a \fIdefault listener\fR to any givenIPv4 address. If the STREAM is bound as a \fIdefault listener\fR and no IPv4addresses are provided in the transport address, the STREAM will receive allSCTP messages to which no other STREAM is bound..npAll valid IPv4 addresses may be bound to a SCTP Transport Provider STREAM.This includes \fIbroadcast\fR and \fImulticast\fR addresses; however, to bindto a \fIbroadcast\fR or \fImulticast\fR address may require that the STREAMwas opened with sufficient access permissions to allow binding of theseaddresses. \fIBroadcast\fR and \fImulticast\fR addresses will only be used bythe SCTP Transport Provider for establishment of an SCTP association (INITchunks) and will not be used for normal transmission or retransmission ofchunks..lpOther than the above rules, the TPI semantics of the \fBT_BIND_REQ\fR and\fBT_BIND_ACK\fR primitives are preserved, particularly with regards to thetreatment of the \fICONIND_number\fR field.Considering the SCTP Transport Provider interpretation of the transportaddress, the following errors may be returned in a \fBT_ERROR_ACK\fR primitivein response to a problematic \fBT_BIND_REQ\fR primitive:.ba +4.ip "\fBTACCES\fR"This indicates that the user did not have proper permissions for the use ofthe requested address. This includes the following reasons:.ba +4.npThe user attempted to bind to a port number within the UNIX protected portnumber range (1-1024) and did not have sufficient priviledge..npThe user attempted to bind to a \fIbroadcast\fR or \fImulticast\fR address anddid not have sufficient priviledge..npThe user attempted to bind a \fIdefault listener\fR (i.e. to bind to port 0)and did not have sufficient priviledge..ba -4.ip "\fBTADDRBUSY\fR"This indicates that the requested address was in use. This includes thefollowing reasons:.ba +4.lp.npThe SCTP TP only permits one STREAM to be a "listener" (i.e. with a non-zero\fICONIND_number\fR) for a given port number IPv4 address combination.The\fBT_BIND_REQ\fR will be rejected it the user attempts to bind a second STREAMwith a non-zero \fICONIND_number\fR to the same port number and IPv4 addresscombination to which another STREAM is already bound with a non-zero\fICONIND_number\fR..npThe SCTP TP only permits one STREAM to be a "default listener" (i.e. listeningon all ports) for a given IPv4 address.The \fBT_BIND_REQ\fR will be rejected if the user attempts to bind a second"default listener" with a zero \fIport\fR number and a non-zero\fICONIND_number\fR to the same IPv4 address to which another STREAM isalready bound with a zero \fIport\fR number and a non-zero\fICONIND_number\fR..ba -4.ip "\fBTBADADDR\fR"This indicates that the protocol address was in an incorrect format or theaddress contained invalid information. It is not intended to indicateprotocol errors. This may include the following reasons:.ba +4.lp.npThe size of the address as given by \fIADDR_length\fR is not the size of the\fBsctp_addr\fR structure plus a positive integer number of 4-byte IPv4addresses..npThe format of the \fBsctp_addr\fR structure is correct, but one or more of theIPv4 addresses provided are not valid IPv4 addresses (e.g. 0.1.1.1 or 0.0.0.0).(Note: the SCTP TP does not permit binding to address 0.0.0.0).ba -4.ip "\fBTNOADDR\fR"This indicates that the transport provider could not allocate an address.This may include the following reasons:.ba +4.lp.npThe user has requested that the SCTP Transport Provider provide a transportaddress with \fICONIND_number\fR equal to zero, and the SCTP TP is unable toassign a port number because all the port numbers within the assignable rangeare in use..ba -4.ip "\fBTOUTSTATE\fR"The primitive would place the transport interface out of state..ip "\fBTSYSERR\fR"A system error occurred and the UNIX system error is indicated in theprimitive. This may include the following errors:.ba +4.ip "\fBENOMEM\fR"There was insufficient memory resources to complete the operation..ip "\fBEFAULT\fR"A recoverable internal software error has occured..ba -4.ba -4.sh 4 "T_UNBIND_REQ".lpSTREAMS which are in the \fBTS_IDLE\fR state (i.e. those which are notcurrently involved in an SCTP association) can be unbound at any time usingthe \fBT_UNBIND_REQ\fR primitive. As provided for the TPI specification, thisprimitive permits the unbinding, or reversal of the bind operation..lpThere are no SCTP Transport Provider specifics concerning this primitive..sh 3 "Options Management".sh 4 "T_OPTMGMT_REQ, T_OPTMGMT_ACK".sh 2 "STREAM Connection".sh 3 "Client".sh 4 "T_CONN_REQ, T_CONN_CON, T_DISCON_IND".sh 3 "Server".sh 4 "T_CONN_IND, T_CONN_REQ, T_DISCON_REQ".sh 2 "STREAM Data Transfer".sh 3 "Sending Data".sh 4 "T_DATA_REQ, T_EXDATA_REQ, T_OPTDATA_REQ".sh 3 "Receiving Data".sh 4 "T_DATA_IND, T_EXDATA_IND, T_OPTDATA_IND".sh 2 "STREAM Release".sh 3 "Disconnection".sh 4 "T_DISCON_REQ, T_DISCON_IND".sh 3 "Orderly Release".sh 4 "T_ORDREL_REQ, T_ORDREL_IND".sh 1 "Mapping of SCTP states to TPI states".(l.(c\fC+----------------+---------------------------------+| TPI State | SCTP State |+----------------+---------------------------------+| TS_UNBND | SCTP_CLOSED || TS_WACK_BREQ | SCTP_CLOSED || TS_WACK_UREQ | SCTP_CLOSED or SCTP_LISTEN || TS_IDLE | SCTP_CLOSED or SCTP_LISTEN || TS_WACK_OPTREQ | SCTP_CLOSED or SCTP_LISTEN || TS_WACK_CREQ | SCTP_COOKIE_WAIT || | SCTP_COOKIE_ECHOED || TS_WCON_CREQ | SCTP_COOKIE_WAIT || | SCTP_COOKIE_ECHOED || TS_WRES_CIND | SCTP_LISTEN || TS_WACK_CRES | SCTP_ESTABLISHED || TS_DATA_XFER | SCTP_ESTABLISHED || TS_WIND_ORDREL | SCTP_SHUTDOWN_PENDING || | SCTP_SHUTDOWN_SENT || TS_WREQ_ORDREL | SCTP_SHUTDOWN_RECEIVED || TS_WACK_DREQ6 | SCTP_CLOSED or SCTP_LISTEN || TS_WACK_DREQ7 | SCTP_LISTEN || TS_WACK_DREQ9 | SCTP_ESTABLISHED || TS_WACK_DREQ10 | SCTP_SHUTDOWN_PENDING || | SCTP_SHUTDOWN_SENT || TS_WACK_DREQ11 | SCTP_SHUTDOWN_RECEIVED || TS_NOSTATES | SCTP_UNREACHABLE |+----------------+---------------------------------+.)c.ce 2\fBFigure 3.\fR Mapping of SCTP Statesto TPI States.sh 1 "Use of XTI with SCTP protocol".sh 2 "Introduction".lpThis section describes the protocol-specific information that is relevant forSCTP transport providers. It also defines data structures and constantsrequired for SCTP transport providers which are exposed through the<xti_sctp.h> header file..sh 2 "Protocol Features".ip "\fIT_MORE Flag and TSDUs\fR"The notion of TSDU is supported by SCTP transport provider, so the T_MORE flagis interpreted correctly by the SCTP transport provider..ip "\fIExpedited Data\fR"SCTP does not have a notion of expedited data in a sense comparable to ISOexpedited data. SCTP defines an out-of-order delivery mechanism which canbe implemented similar to TCP's urgent mechanism, by which DATA chunks whichare marked for out-of-order delivery could be transmitted in advance of normalin-order deliver DATA chunks on a given stream. See the SCTP Draft Standardfor more detailed information..ip "\fIOrderly Release\fR"The orderly release functions \fBt_sndrel()\fR and \fBt_rcvrel()\fR which weredefined to support the orderly release facility of TCP will also be used forthe orderly release facility of SCTP. The specification states that onlyestablished connections may be closed with orderly release: that is, on anendpoint in T_DATAXFER or T_INREL state..ip "\fIAbortive Release\fR"Functions \fBt_sdnddis()\fR and \fBt_rcvdis()\fR may be used to performabortive release over SCTP transport. However, their use is not recommendedas the abortive release primitive (ABORT chunk) is not transmitted reliably bythe SCTP protocol..ip "\fIConnection Establishment\fR"Unlike TCP, SCTP partially allows the possibility of refusing a connectionindication. This is peformed by sending an ABORT chunk instead of aCOOKIE-ACK chunk in response to a COOKIE-ECHO. Therfore, unlike TCP,\fBt_listen()\fR and \fBt_accept()\fR have similar semantics to that for ISOproviders..ip "\fIConnection Release\fR"After a connection has been released, the local address(es) bound to the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -