




已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
SCTP Packet Format16bits16bitsSource Port Number (16 bits)CommonHeaderDestination Port Number (16 bits)Verification Tag (32 bits)Checksum (32 bits)Chunk Type (8 bits)Chunk Flags (8 bits)Chunk #1Chunk Length (16 bits)Chunk Value (variablelength)Chunk Type (8 bits)Chunk Flags (8 bits)Chunk #2Chunk Length (16 bits)Chunk Value (variablelength).Chunk Type (8 bits)Chunk Flags (8 bits)Chunk #nChunk Length (16 bits)Chunk Value (variablelength)1. An SCTP packet is composed of a common header and chunks. Common header (96 bits, 12 bytes)Chunk #1Chunk #2.Chunk #n Multiple chunks can be bundled into one SCTP packet up to the MTU size. INIT, INIT ACK, and SHUTDOWN COMPLETE chunks MUST NOT be bundled with any other chunk in a packet. If a user data message doesnt fit into one SCTP packet it can be fragmented into multiple chunks. All integer fields in an SCTP packet MUST be transmitted in network byte order, unless otherwise stated.2. SCTP common header formatSource Port Number (16 bits)Destination Port Number (16 bits)Verification Tag (32 bits)Checksum (32 bits) Source Port Number: 16 bits (unsigned integer) Destination Port Number: 16 bits (unsigned integer) Verification Tag: 32 bits (unsigned integer)v On transmit, the value of this Verification Tag MUST be set to the value of the Initiate Tag received from the peer endpoint during the association Initialization.v A packet containing an INIT chunk MUST have a zero Verification Tag.v A packet containing a SHUTDOWN COMPLETE chunk with the T bit set MUST have the Verification Tag copied from the packet with the SHUTDOWN ACK chunk.v A packet containing an ABORT chunk may have the verification tag copied from the packet that caused the ABORT to be sent. Checksum: 32 bits (unsigned integer)v SCTP uses the CRC32c algorithm for calculating the checksum.3. A chunk contains either control information or user data.Chunk Type (8 bits)Chunk Flag (8 bits)Chunk Length (16 bits)Chunk Value Chunk Type: 8 bits (unsigned integer) 0.254 0 - Payload Data (DATA)1 - Initiation (INIT)2 - Initiation Acknowledgement (INIT ACK)3 - Selective Acknowledgement (SACK)4 - Heartbeat Request (HEARTBEAT)5 - Heartbeat Acknowledgement (HEARTBEAT ACK)6 - Abort (ABORT)7 - Shutdown (SHUTDOWN)8 - Shutdown Acknowledgement (SHUTDOWN ACK)9 - Operation Error (ERROR)10 - State Cookie (COOKIE ECHO)11 - Cookie Acknowledgement (COOKIE ACK)12 - Reserved for Explicit Congestion Notification Echo(ECNE)13 - Reserved for Congestion Window Reduced (CWR)14 - Shutdown Complete (SHUTDOWN COMPLETE)15 to 62 - available63 - reserved for IETF-defined Chunk Extensions64 to 126 - available127 - reserved for IETF-defined Chunk Extensions128 to 190 - available191 - reserved for IETF-defined Chunk Extensions192 to 254 - available255 - reserved for IETF-defined Chunk ExtensionsChunk Types are encoded such that the highest-order 2 bits specifythe action that must be taken if the processing endpoint does not recognize the Chunk Type.00 - Stop processing this SCTP packet and discard it, do notprocess any further chunks within it.01 - Stop processing this SCTP packet and discard it, do notprocess any further chunks within it, and report theunrecognized chunk in an Unrecognized Chunk Type.10 - Skip this chunk and continue processing.11 - Skip this chunk and continue processing, but report in anERROR chunk using the Unrecognized Chunk Type cause ofError. Chunk Flags: 8 bitsv The usage of these bits depends on the Chunk type as given by the Chunk Type field. Unless otherwise specified, they are set to 0 on transmit and are ignored on receipt. Chunk Length: 16 bits (unsigned integer)v This value represents the size of the chunk in bytes, including the Chunk Type, Chunk Flags, Chunk Length, and Chunk Value fields. Therefore, if the Chunk Value field is zero-length, the Length field will be set to 4. The Chunk Length field does not count any chunk padding.v Chunks (including Type, Length, and Value fields) are padded out by the sender with all zero bytes to be a multiple of 4 bytes long. This padding MUST NOT be more than 3 bytes in total. The Chunk Length value does not include terminating padding of the chunk. However, it does include padding of any variable-length parameter except the last parameter in the chunk. The receiver MUST ignore the padding. Chunk Value: variable lengthv The Chunk Value field contains the actual information to be transferred in the chunk. The usage and format of this field is dependent on the Chunk Type.v The total length of a chunk (including Type, Length, and Value fields) MUST be a multiple of 4 bytes. If the length of the chunk is not a multiple of 4 bytes, the sender MUST pad the chunk with all zero bytes.4. Chunk Values of SCTP control chunks Chunk values of SCTP control chunks consist of a chunk-type-specificheader of required fields, followed by zero or more parameters.Chunk Parameter FormatParameter Type (16 bits)Parameter Length (16 bits)Parameter Value (variable length) Chunk Parameter Type: 16 bits (unsigned integer) 0.65534v The value of 65535 is reserved for IETF-defined extensions. Values other than those defined in specific SCTP chunk descriptions are reserved for use by IETF. Chunk Parameter Length: 16 bits (unsigned integer)v The Parameter Length field contains the size of the parameter in bytes, including the Parameter Type, Parameter Length, and Parameter Value fields. Thus, a parameter with a zero-length Parameter Value field would have a Length field of 4. The Parameter Length does not include any padding bytes. Chunk Parameter Value: variable lengthv The Parameter Value field contains the actual information to be transferred in the parameter.v The total length of a parameter (including Type, Parameter Length, and Value fields) MUST be a multiple of 4 bytes. If the length of the parameter is not a multiple of 4 bytes, the sender pads the parameter at the end (i.e., after the Parameter Value field) with all zero bytes.v The Parameter Types are encoded such that the highest-order 2 bits specify the action that must be taken if the processing endpoint does not recognize the Parameter Type.00 - Stop processing this parameter; do not process any further parameters within this chunk.01 - Stop processing this parameter, do not process any further parameters within this chunk, and report the unrecognized parameter in an Unrecognized Parameter.10 - Skip this parameter and continue processing.11 - Skip this parameter and continue processing but report the unrecognized parameter in an Unrecognized Parameter.5. SCTP Chunk Definitions5.1 Payload Data (DATA) (0)Type = 0ReservedUBELengthTSNStream Identifier SStream Sequence Number nPayload Protocol IdentifierUser Data (seq n of stream S) Reserved: 5 bitsv Should be set to all 0s and ignored by the receiver. U bit: 1 bitv The (U)nordered bit, if set to 1, indicates that this is an unordered DATA chunk, and there is no Stream Sequence Number assigned to this DATA chunk. Therefore, the receiver MUST ignore the Stream Sequence Number field.v After reassembly (if necessary), unordered DATA chunks MUST be dispatched to the upper layer by the receiver without any attempt to reorder.v If an unordered user message is fragmented, each fragment of the message MUST have its U bit set to 1. B bit: 1 bitv The (B)eginning fragment bit, if set, indicates the first fragment of a user message. E bit: 1 bitv The (E)nding fragment bit, if set, indicates the last fragment of a user message.v An unfragmented user message shall have both the B and E bits set to 1. Setting both B and E bits to 0 indicates a middle fragment of a multi-fragment user message, as summarized in the following table:BEDescription10First piece of a fragmented user message00Middle piece of a fragmented user message01Last piece of a fragmented user message11Unfragmented messagev When a user message is fragmented into multiple chunks, the TSNs are used by the receiver to reassemble the message. This means that the TSNs for each fragment of a fragmented user message MUST be strictly sequential. Length: 16 bits (unsigned integer)v This field indicates the length of the DATA chunk in bytes from the beginning of the type field to the end of the User Data field excluding any padding.v A DATA chunk with a User Data field of length L will have the Length field set to (16 + L) (indicating 16+L bytes) where L MUST be greater than 0. TSN: 32 bits (unsigned integer) 0.4294967295 (232 - 1). Stream Identifier S: 16 bits (unsigned integer) Stream Sequence Number n: 16 bits (unsigned integer) 0.65535v When a user message is fragmented by SCTP for transport, the same Stream Sequence Number MUST be carried in each of the fragments of the message. Payload Protocol Identifier: 32 bits (unsigned integer)v This value represents an application (or upper layer) specified protocol identifier. This value is passed to SCTP by its upper layer and sent to its peer. This identifier is not used by SCTP but can be used by certain network entities, as well as by the peer application, to identify the type of information being carried in this DATA chunk. This field must be sent even in fragmented DATA chunks (to make sure it is available for agents in the middle of the network). Note that this field is NOT touched by an SCTP implementation; therefore, its byte order is NOT necessarily big endian. The upper layer is responsible for any byte order conversions to this field.v The value 0 indicates that no application identifier is specified by the upper layer for this payload data. User Data: variable lengthv This is the payload user data. The implementation MUST pad the end of the data to a 4-byte boundary with all-zero bytes. Any padding MUST NOT be included in the Length field. A sender MUST never add more than 3 bytes of padding.5.2 Initiation (INIT) (1)Type=1Chunk FlagsChunk LengthInitiate TagAdvertised Receiver Window CreditNumber of Outbound StreamsNumber of Inbound StreamsInitial TSNOptional/Variable-Length Parameters5.2.1 Optional/Variable-Length Parameters in INITIPv4 Address Parameter (5)Type=5Length=8IPv4 AddressIPv6 Address Parameter (6)Type=6Length=20IPv6 AddressCookie Preservative (9)Type=9Length=8Suggested Cookie Life-Span Increment (msec.)Host Name Address (11)Type=11LengthHost NameSupported Address Types (12)Type=12LengthAddress Type #1Address Type #2.5.3 Initiation Acknowledgement (INIT ACK) (2)Type=1Chunk FlagsChunk LengthInitiate TagAdvertised Receiver Window CreditNumber of Outbound StreamsNumber of Inbound StreamsInitial TSNOptional/Variable-Length Parameters5.3.1 Optional/Variable-Length Parameters in INIT ACKState CookieParameter Type Value: 7Parameter Length: Variable size, depending on size of Cookie.Parameter Value:This parameter value MUST contain all the necessary state and parameter information required for the sender of this INIT ACK to create the association, along with a Message Authentication Code (MAC). Unrecognized Parameter:Parameter Type Value: 8Parameter Length: Variable size.Parameter Value:This parameter is returned to the originator of the INIT chunk when the INIT contains an unrecognized parameter that has a value that indicates it should be reported to the sender. This parameter value field will contain unrecognized parameters copied from the INIT chunk complete with Parameter Type, Length, and Value fields.5.4 Selec
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 倾斜建筑地基施工方案设计
- 2025广西河池市罗城仫佬族自治县水利局招聘1人考试参考试题及答案解析
- 2026招商银行武汉分行校园招聘备考考试题库附答案解析
- 阅读之旅模板
- 文化公司税务咨询方案
- 本土企业应对策略-洞察及研究
- 油墨厂水性建筑油墨设备操作规定
- 水产养殖过程中病原微生物及污染物的安全性研究-洞察及研究
- 河南省新乡市2025-2026学年高一上学期9月月考历史试卷(含答案)
- 2024-2025学年广东省汕头市澄海区实验学校人教版六年级上册期中素养展示测试数学试卷(含答案)
- 施工单位进场通知书
- 幼儿园绘本故事:《排队喽》 课件
- 林彪 军事演讲课件
- 颈脊髓损伤患者护理查房PPT
- 增员及邀约话术2-2课件
- 会计凭证考试试题
- 《冷冲压工艺与模具设计》完整版ppt课件全套教程
- 高中英语 选必B1 Unit2 Onwards and upwards 第4课时-Developing ideas 课件
- 重量法测定矿物质原始记录
- 自采商品管理流程
- 第2章 计算机中数的表示方法
评论
0/150
提交评论