Create MMST command packet header */
| 98 | |
| 99 | /** Create MMST command packet header */ |
| 100 | static void start_command_packet(MMSTContext *mmst, MMSCSPacketType packet_type) |
| 101 | { |
| 102 | MMSContext *mms = &mmst->mms; |
| 103 | mms->write_out_ptr = mms->out_buffer; |
| 104 | |
| 105 | bytestream_put_le32(&mms->write_out_ptr, 1); // start sequence |
| 106 | bytestream_put_le32(&mms->write_out_ptr, 0xb00bface); |
| 107 | bytestream_put_le32(&mms->write_out_ptr, 0); // Length starts from after the protocol type bytes |
| 108 | bytestream_put_le32(&mms->write_out_ptr, MKTAG('M','M','S',' ')); |
| 109 | bytestream_put_le32(&mms->write_out_ptr, 0); |
| 110 | bytestream_put_le32(&mms->write_out_ptr, mmst->outgoing_packet_seq++); |
| 111 | bytestream_put_le64(&mms->write_out_ptr, 0); // timestamp |
| 112 | bytestream_put_le32(&mms->write_out_ptr, 0); |
| 113 | bytestream_put_le16(&mms->write_out_ptr, packet_type); |
| 114 | bytestream_put_le16(&mms->write_out_ptr, 3); // direction to server |
| 115 | } |
| 116 | |
| 117 | /** Add prefixes to MMST command packet. */ |
| 118 | static void insert_command_prefixes(MMSContext *mms, |
no outgoing calls
no test coverage detected