Lines Matching refs:data_buf
1025 uint8_t data_buf[516] = { in test_tftp_receive_data() local
1030 data_buf[515] = 0x79; // set the last byte to make sure it all gets copied in test_tftp_receive_data()
1036 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data()
1039 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data()
1073 uint8_t data_buf[516] = { in test_tftp_receive_data_final_block() local
1078 data_buf[515] = 0x79; // set the last byte to make sure it all gets copied in test_tftp_receive_data_final_block()
1084 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_final_block()
1087 ASSERT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_final_block()
1090 data_buf[3]++; in test_tftp_receive_data_final_block()
1091 data_buf[4]++; in test_tftp_receive_data_final_block()
1092 data_buf[515]++; in test_tftp_receive_data_final_block()
1096 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_final_block()
1099 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_final_block()
1102 data_buf[3]++; in test_tftp_receive_data_final_block()
1103 status = tftp_process_msg(ts.session, data_buf, 4, ts.out, &ts.outlen, &ts.timeout, nullptr); in test_tftp_receive_data_final_block()
1137 uint8_t data_buf[1028] = { in test_tftp_receive_data_blocksize() local
1142 data_buf[1027] = 0x79; // set the last byte to make sure it all gets copied in test_tftp_receive_data_blocksize()
1149 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_blocksize()
1152 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_blocksize()
1187 uint8_t data_buf[516] = { in test_tftp_receive_data_windowsize() local
1192 data_buf[515] = 0x79; // set the last byte to make sure it all gets copied in test_tftp_receive_data_windowsize()
1198 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_windowsize()
1201 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_windowsize()
1206 data_buf[3]++; in test_tftp_receive_data_windowsize()
1207 data_buf[4]++; in test_tftp_receive_data_windowsize()
1208 data_buf[515]++; in test_tftp_receive_data_windowsize()
1212 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_windowsize()
1215 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_windowsize()
1251 uint8_t data_buf[516] = { in test_tftp_receive_data_skipped_block() local
1256 data_buf[515] = 0x79; // set the last byte to make sure it all gets copied in test_tftp_receive_data_skipped_block()
1261 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_skipped_block()
1274 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_skipped_block()
1313 uint8_t data_buf[516] = { in test_tftp_receive_data_windowsize_skipped_block() local
1318 data_buf[515] = 0x79; // set the last byte to make sure it all gets copied in test_tftp_receive_data_windowsize_skipped_block()
1324 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_windowsize_skipped_block()
1326 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_windowsize_skipped_block()
1331 data_buf[3]++; in test_tftp_receive_data_windowsize_skipped_block()
1332 data_buf[4]++; in test_tftp_receive_data_windowsize_skipped_block()
1333 data_buf[515]++; in test_tftp_receive_data_windowsize_skipped_block()
1337 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_windowsize_skipped_block()
1339 EXPECT_TRUE(verify_write_data(data_buf + 4, td), "bad write data"); in test_tftp_receive_data_windowsize_skipped_block()
1346 data_buf[3] = 4u; in test_tftp_receive_data_windowsize_skipped_block()
1347 data_buf[4]++; in test_tftp_receive_data_windowsize_skipped_block()
1348 data_buf[515]++; in test_tftp_receive_data_windowsize_skipped_block()
1349 …status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, &ts.timeout,… in test_tftp_receive_data_windowsize_skipped_block()
1417 uint8_t data_buf[] = { in test_tftp_receive_data_block_wrapping() local
1423 status = tftp_process_msg(ts.session, data_buf, sizeof(data_buf), ts.out, &ts.outlen, in test_tftp_receive_data_block_wrapping()
1690 uint8_t data_buf[4 + kBlockSize]; in test_tftp_send_data_receive_ack_block_wrapping() local
1691 size_t data_buf_len = sizeof(data_buf); in test_tftp_send_data_receive_ack_block_wrapping()
1700 status = tftp_prepare_data(ts.session, data_buf, &data_buf_len, &ts.timeout, NULL); in test_tftp_send_data_receive_ack_block_wrapping()
1703 EXPECT_EQ(sizeof(data_buf), data_buf_len, "improperly formatted DATA packet"); in test_tftp_send_data_receive_ack_block_wrapping()
1704 unsigned int opcode = data_buf[0] << 8 | data_buf[1]; in test_tftp_send_data_receive_ack_block_wrapping()
1706 unsigned int block = data_buf[2] << 8 | data_buf[3]; in test_tftp_send_data_receive_ack_block_wrapping()
1761 uint8_t data_buf[4 + kBlockSize] = {0}; in test_tftp_send_data_receive_ack_skip_block_wrap() local
1762 size_t data_buf_len = sizeof(data_buf); in test_tftp_send_data_receive_ack_skip_block_wrap()
1763 tftp_data_msg* msg = reinterpret_cast<tftp_data_msg*>(&data_buf[0]); in test_tftp_send_data_receive_ack_skip_block_wrap()
1772 status = tftp_prepare_data(ts.session, data_buf, &data_buf_len, &ts.timeout, NULL); in test_tftp_send_data_receive_ack_skip_block_wrap()
1775 EXPECT_EQ(sizeof(data_buf), data_buf_len, "improperly formatted DATA packet"); in test_tftp_send_data_receive_ack_skip_block_wrap()