Network 版 (精华区)
发信人: zzn (爱你到内伤), 信区: Network
标 题: mms协议英文资料(08)
发信站: 哈工大紫丁香 (2003年08月23日10:52:31 星期六), 站内信件
The MMS command packet header
Below shows the structure of the MMS command packet header.
Note that multiple byte values are in left byte = LSB and right byte = MSB
format
E.g. 0f 00 00 00 actually has the value 0f. Also referred to as Little Endian
format.
Start here ->
Bytes are fixed as shown when from client. Byte [00] can change when command
is from server. Not understood at this time what this byte means – usually
its 00, could be version number.
Command ID value, maybe a version or serial number.
Always has this fixed value. If you read this value in Big Endian mode, it
reads ‘Boob Face’. Probably a coincidence!
Length of command until the end of all data
Value is in bytes and starts from after the protocol type bytes
Protocol type, fixed value and reads MMS <space> in ascii.
Length until end of packet in 8 byte boundary lengths.
Including own data field. E.g. for 8 bytes, value = 1.
Sequence number. As commands are sent to a server, sequence counts up
starting at 0. Command sequences sent back to a client in response have the
same sequence number i.e. the sequence is echoed back. The client always
leads with the first command sent.
Double precision time stamp (see notes) used for network timing.
Length until end of packet in 8 byte boundary lengths.
Including own data field. E.g. for 8 bytes, value = 1.
Command value followed by command direction of flow,
For command value meanings see mms command list
For direction, 0x03 = to server and 0x04 = to client
----> End of 40 byte command header
Command data then continues with ‘Prefix 1’ then ‘Prefix 2’ data,
followed by ‘command specific data’ until the end of the command packet.
Command specific data can be string text (Unicode 16 bit), or raw 8 bit data
depending on the command sent. See command specific data sections later for
an explanation of prefix data. Prefix data is dependant on the command issued
and its direction of flow.
Command packets always have a minimum length of 40 bytes as shown above i.e.
the command header is sent as a minimum command data packet.
Note: packet length fields include any padding at the end of the packet.
4 bytes = 01 00 00 [00]
4 bytes = CE FA 0B B0
4 bytes
4 bytes = 4D 4D 53 20
4 bytes
4 bytes
8 bytes
4 bytes
Comm 2 bytes | Dir 2 bytes
--
既然选择了远方,就让我们风雨兼程吧
人生最快乐的事 莫过于
有了目标,并为之奋斗!
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.243.49]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.431毫秒