Lines Matching refs:cmd

772                              uint8_t cmd,  in storage_command()  argument
785 request->message.header.request.opcode = cmd; in storage_command()
805 uint8_t cmd, in ext_command() argument
817 request->message.header.request.opcode = cmd; in ext_command()
842 uint8_t cmd, in raw_command() argument
848 return ext_command(buf, bufsz, cmd, NULL, 0, key, keylen, dta, dtalen); in raw_command()
851 static off_t flush_command(char* buf, size_t bufsz, uint8_t cmd, uint32_t exptime, bool use_extra) { in flush_command() argument
857 request->message.header.request.opcode = cmd; in flush_command()
875 uint8_t cmd, in touch_command() argument
884 request->message.header.request.opcode = cmd; in touch_command()
901 uint8_t cmd, in arithmetic_command() argument
912 request->message.header.request.opcode = cmd; in arithmetic_command()
928 uint8_t cmd, uint16_t status) in validate_response_header() argument
931 assert(response->message.header.response.opcode == cmd); in validate_response_header()
937 switch (cmd) { in validate_response_header()
953 switch (cmd) { in validate_response_header()
1020 if (cmd != PROTOCOL_BINARY_CMD_GETK && in validate_response_header()
1021 cmd != PROTOCOL_BINARY_CMD_GATK) { in validate_response_header()
1046 static enum test_return test_binary_quit_impl(uint8_t cmd) { in test_binary_quit_impl() argument
1053 cmd, NULL, 0, NULL, 0); in test_binary_quit_impl()
1056 if (cmd == PROTOCOL_BINARY_CMD_QUIT) { in test_binary_quit_impl()
1078 static enum test_return test_binary_set_impl(const char *key, uint8_t cmd) { in test_binary_set_impl() argument
1085 size_t len = storage_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_set_impl()
1093 if (cmd == PROTOCOL_BINARY_CMD_SET) { in test_binary_set_impl()
1095 validate_response_header(&receive.response, cmd, in test_binary_set_impl()
1100 if (cmd == PROTOCOL_BINARY_CMD_SETQ) { in test_binary_set_impl()
1106 if (cmd == PROTOCOL_BINARY_CMD_SET) { in test_binary_set_impl()
1108 validate_response_header(&receive.response, cmd, in test_binary_set_impl()
1127 static enum test_return test_binary_add_impl(const char *key, uint8_t cmd) { in test_binary_add_impl() argument
1134 size_t len = storage_command(send.bytes, sizeof(send.bytes), cmd, key, in test_binary_add_impl()
1143 if (cmd == PROTOCOL_BINARY_CMD_ADD) { in test_binary_add_impl()
1145 validate_response_header(&receive.response, cmd, in test_binary_add_impl()
1150 validate_response_header(&receive.response, cmd, in test_binary_add_impl()
1166 static enum test_return test_binary_replace_impl(const char* key, uint8_t cmd) { in test_binary_replace_impl() argument
1173 size_t len = storage_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_replace_impl()
1178 validate_response_header(&receive.response, cmd, in test_binary_replace_impl()
1188 len = storage_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_replace_impl()
1193 if (cmd == PROTOCOL_BINARY_CMD_REPLACE) { in test_binary_replace_impl()
1201 if (cmd == PROTOCOL_BINARY_CMD_REPLACEQ) { in test_binary_replace_impl()
1218 static enum test_return test_binary_delete_impl(const char *key, uint8_t cmd) { in test_binary_delete_impl() argument
1224 size_t len = raw_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_delete_impl()
1229 validate_response_header(&receive.response, cmd, in test_binary_delete_impl()
1240 cmd, key, strlen(key), NULL, 0); in test_binary_delete_impl()
1243 if (cmd == PROTOCOL_BINARY_CMD_DELETE) { in test_binary_delete_impl()
1251 validate_response_header(&receive.response, cmd, in test_binary_delete_impl()
1267 static enum test_return test_binary_get_impl(const char *key, uint8_t cmd) { in test_binary_get_impl() argument
1276 if (cmd == PROTOCOL_BINARY_CMD_GAT || cmd == PROTOCOL_BINARY_CMD_GATK) in test_binary_get_impl()
1279 size_t len = ext_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_get_impl()
1285 validate_response_header(&receive.response, cmd, in test_binary_get_impl()
1305 size_t l = ext_command(temp.bytes, sizeof(temp.bytes), cmd, in test_binary_get_impl()
1315 validate_response_header(&receive.response, cmd, in test_binary_get_impl()
1338 static enum test_return test_binary_getq_impl(const char *key, uint8_t cmd) { in test_binary_getq_impl() argument
1348 if (cmd == PROTOCOL_BINARY_CMD_GATQ || cmd == PROTOCOL_BINARY_CMD_GATKQ) in test_binary_getq_impl()
1355 size_t len2 = ext_command(temp.bytes, sizeof(temp.bytes), cmd, in test_binary_getq_impl()
1364 len2 = ext_command(temp.bytes, sizeof(temp.bytes), cmd, in test_binary_getq_impl()
1376 validate_response_header(&receive.response, cmd, in test_binary_getq_impl()
1398 static enum test_return test_binary_incr_impl(const char* key, uint8_t cmd) { in test_binary_incr_impl() argument
1405 size_t len = arithmetic_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_incr_impl()
1411 if (cmd == PROTOCOL_BINARY_CMD_INCREMENT) { in test_binary_incr_impl()
1413 validate_response_header(&receive.response_header, cmd, in test_binary_incr_impl()
1419 if (cmd == PROTOCOL_BINARY_CMD_INCREMENTQ) { in test_binary_incr_impl()
1435 static enum test_return test_binary_decr_impl(const char* key, uint8_t cmd) { in test_binary_decr_impl() argument
1442 size_t len = arithmetic_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_decr_impl()
1448 if (cmd == PROTOCOL_BINARY_CMD_DECREMENT) { in test_binary_decr_impl()
1450 validate_response_header(&receive.response_header, cmd, in test_binary_decr_impl()
1458 if (cmd == PROTOCOL_BINARY_CMD_DECREMENT) { in test_binary_decr_impl()
1460 validate_response_header(&receive.response_header, cmd, in test_binary_decr_impl()
1499 static enum test_return test_binary_flush_impl(const char *key, uint8_t cmd) { in test_binary_flush_impl() argument
1514 len = flush_command(send.bytes, sizeof(send.bytes), cmd, 2, true); in test_binary_flush_impl()
1516 if (cmd == PROTOCOL_BINARY_CMD_FLUSH) { in test_binary_flush_impl()
1518 validate_response_header(&receive.response, cmd, in test_binary_flush_impl()
1545 len = flush_command(send.bytes, sizeof(send.bytes), cmd, 0, ii == 0); in test_binary_flush_impl()
1547 if (cmd == PROTOCOL_BINARY_CMD_FLUSH) { in test_binary_flush_impl()
1549 validate_response_header(&receive.response, cmd, in test_binary_flush_impl()
1575 static enum test_return test_binary_concat_impl(const char *key, uint8_t cmd) { in test_binary_concat_impl() argument
1583 size_t len = raw_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_concat_impl()
1589 validate_response_header(&receive.response, cmd, in test_binary_concat_impl()
1600 len = raw_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_concat_impl()
1604 if (cmd == PROTOCOL_BINARY_CMD_APPEND || cmd == PROTOCOL_BINARY_CMD_PREPEND) { in test_binary_concat_impl()
1606 validate_response_header(&receive.response, cmd, in test_binary_concat_impl()
1683 uint8_t cmd = 0x25; in test_binary_illegal() local
1684 while (cmd != 0x00) { in test_binary_illegal()
1691 cmd, NULL, 0, NULL, 0); in test_binary_illegal()
1694 validate_response_header(&buffer.response, cmd, in test_binary_illegal()
1696 ++cmd; in test_binary_illegal()
1731 uint8_t cmd = (uint8_t)(rand() & 0xff); in test_binary_pipeline_hickup_chunk() local
1735 switch (cmd) { in test_binary_pipeline_hickup_chunk()
1742 len = storage_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1750 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1755 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1759 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1764 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1771 len = arithmetic_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1783 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1792 len = touch_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
1809 cmd |= 0xf0; in test_binary_pipeline_hickup_chunk()
1813 cmd, NULL, 0, NULL, 0); in test_binary_pipeline_hickup_chunk()