Lines Matching refs:cmd

1076                              uint8_t cmd,  in storage_command()  argument
1089 request->message.header.request.opcode = cmd; in storage_command()
1109 uint8_t cmd, in ext_command() argument
1121 request->message.header.request.opcode = cmd; in ext_command()
1146 uint8_t cmd, in raw_command() argument
1152 return ext_command(buf, bufsz, cmd, NULL, 0, key, keylen, dta, dtalen); in raw_command()
1155 static off_t flush_command(char* buf, size_t bufsz, uint8_t cmd, uint32_t exptime, bool use_extra) { in flush_command() argument
1161 request->message.header.request.opcode = cmd; in flush_command()
1179 uint8_t cmd, in touch_command() argument
1188 request->message.header.request.opcode = cmd; in touch_command()
1205 uint8_t cmd, in arithmetic_command() argument
1216 request->message.header.request.opcode = cmd; in arithmetic_command()
1232 uint8_t cmd, uint16_t status) in validate_response_header() argument
1235 assert(response->message.header.response.opcode == cmd); in validate_response_header()
1241 switch (cmd) { in validate_response_header()
1257 switch (cmd) { in validate_response_header()
1324 if (cmd != PROTOCOL_BINARY_CMD_GETK && in validate_response_header()
1325 cmd != PROTOCOL_BINARY_CMD_GATK) { in validate_response_header()
1350 static enum test_return test_binary_quit_impl(uint8_t cmd) { in test_binary_quit_impl() argument
1357 cmd, NULL, 0, NULL, 0); in test_binary_quit_impl()
1360 if (cmd == PROTOCOL_BINARY_CMD_QUIT) { in test_binary_quit_impl()
1383 static enum test_return test_binary_set_impl(const char *key, uint8_t cmd) { in test_binary_set_impl() argument
1390 size_t len = storage_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_set_impl()
1398 if (cmd == PROTOCOL_BINARY_CMD_SET) { in test_binary_set_impl()
1400 validate_response_header(&receive.response, cmd, in test_binary_set_impl()
1405 if (cmd == PROTOCOL_BINARY_CMD_SETQ) { in test_binary_set_impl()
1411 if (cmd == PROTOCOL_BINARY_CMD_SET) { in test_binary_set_impl()
1413 validate_response_header(&receive.response, cmd, in test_binary_set_impl()
1432 static enum test_return test_binary_add_impl(const char *key, uint8_t cmd) { in test_binary_add_impl() argument
1439 size_t len = storage_command(send.bytes, sizeof(send.bytes), cmd, key, in test_binary_add_impl()
1448 if (cmd == PROTOCOL_BINARY_CMD_ADD) { in test_binary_add_impl()
1450 validate_response_header(&receive.response, cmd, in test_binary_add_impl()
1455 validate_response_header(&receive.response, cmd, in test_binary_add_impl()
1471 static enum test_return test_binary_replace_impl(const char* key, uint8_t cmd) { in test_binary_replace_impl() argument
1478 size_t len = storage_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_replace_impl()
1483 validate_response_header(&receive.response, cmd, in test_binary_replace_impl()
1493 len = storage_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_replace_impl()
1498 if (cmd == PROTOCOL_BINARY_CMD_REPLACE) { in test_binary_replace_impl()
1506 if (cmd == PROTOCOL_BINARY_CMD_REPLACEQ) { in test_binary_replace_impl()
1523 static enum test_return test_binary_delete_impl(const char *key, uint8_t cmd) { in test_binary_delete_impl() argument
1529 size_t len = raw_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_delete_impl()
1534 validate_response_header(&receive.response, cmd, in test_binary_delete_impl()
1545 cmd, key, strlen(key), NULL, 0); in test_binary_delete_impl()
1548 if (cmd == PROTOCOL_BINARY_CMD_DELETE) { in test_binary_delete_impl()
1556 validate_response_header(&receive.response, cmd, in test_binary_delete_impl()
1572 static enum test_return test_binary_get_impl(const char *key, uint8_t cmd) { in test_binary_get_impl() argument
1581 if (cmd == PROTOCOL_BINARY_CMD_GAT || cmd == PROTOCOL_BINARY_CMD_GATK) in test_binary_get_impl()
1584 size_t len = ext_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_get_impl()
1590 validate_response_header(&receive.response, cmd, in test_binary_get_impl()
1610 size_t l = ext_command(temp.bytes, sizeof(temp.bytes), cmd, in test_binary_get_impl()
1620 validate_response_header(&receive.response, cmd, in test_binary_get_impl()
1643 static enum test_return test_binary_getq_impl(const char *key, uint8_t cmd) { in test_binary_getq_impl() argument
1653 if (cmd == PROTOCOL_BINARY_CMD_GATQ || cmd == PROTOCOL_BINARY_CMD_GATKQ) in test_binary_getq_impl()
1660 size_t len2 = ext_command(temp.bytes, sizeof(temp.bytes), cmd, in test_binary_getq_impl()
1669 len2 = ext_command(temp.bytes, sizeof(temp.bytes), cmd, in test_binary_getq_impl()
1681 validate_response_header(&receive.response, cmd, in test_binary_getq_impl()
1703 static enum test_return test_binary_incr_impl(const char* key, uint8_t cmd) { in test_binary_incr_impl() argument
1710 size_t len = arithmetic_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_incr_impl()
1716 if (cmd == PROTOCOL_BINARY_CMD_INCREMENT) { in test_binary_incr_impl()
1718 validate_response_header(&receive.response_header, cmd, in test_binary_incr_impl()
1724 if (cmd == PROTOCOL_BINARY_CMD_INCREMENTQ) { in test_binary_incr_impl()
1740 static enum test_return test_binary_decr_impl(const char* key, uint8_t cmd) { in test_binary_decr_impl() argument
1747 size_t len = arithmetic_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_decr_impl()
1753 if (cmd == PROTOCOL_BINARY_CMD_DECREMENT) { in test_binary_decr_impl()
1755 validate_response_header(&receive.response_header, cmd, in test_binary_decr_impl()
1763 if (cmd == PROTOCOL_BINARY_CMD_DECREMENT) { in test_binary_decr_impl()
1765 validate_response_header(&receive.response_header, cmd, in test_binary_decr_impl()
1804 static enum test_return test_binary_flush_impl(const char *key, uint8_t cmd) { in test_binary_flush_impl() argument
1819 len = flush_command(send.bytes, sizeof(send.bytes), cmd, 2, true); in test_binary_flush_impl()
1821 if (cmd == PROTOCOL_BINARY_CMD_FLUSH) { in test_binary_flush_impl()
1823 validate_response_header(&receive.response, cmd, in test_binary_flush_impl()
1850 len = flush_command(send.bytes, sizeof(send.bytes), cmd, 0, ii == 0); in test_binary_flush_impl()
1852 if (cmd == PROTOCOL_BINARY_CMD_FLUSH) { in test_binary_flush_impl()
1854 validate_response_header(&receive.response, cmd, in test_binary_flush_impl()
1880 static enum test_return test_binary_concat_impl(const char *key, uint8_t cmd) { in test_binary_concat_impl() argument
1888 size_t len = raw_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_concat_impl()
1894 validate_response_header(&receive.response, cmd, in test_binary_concat_impl()
1905 len = raw_command(send.bytes, sizeof(send.bytes), cmd, in test_binary_concat_impl()
1909 if (cmd == PROTOCOL_BINARY_CMD_APPEND || cmd == PROTOCOL_BINARY_CMD_PREPEND) { in test_binary_concat_impl()
1911 validate_response_header(&receive.response, cmd, in test_binary_concat_impl()
1988 uint8_t cmd = 0x25; in test_binary_illegal() local
1989 while (cmd != 0x00) { in test_binary_illegal()
1996 cmd, NULL, 0, NULL, 0); in test_binary_illegal()
1999 validate_response_header(&buffer.response, cmd, in test_binary_illegal()
2001 ++cmd; in test_binary_illegal()
2036 uint8_t cmd = (uint8_t)(rand() & 0xff); in test_binary_pipeline_hickup_chunk() local
2040 switch (cmd) { in test_binary_pipeline_hickup_chunk()
2047 len = storage_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2055 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2060 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2064 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2069 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2076 len = arithmetic_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2088 len = raw_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2097 len = touch_command(command.bytes, sizeof(command.bytes), cmd, in test_binary_pipeline_hickup_chunk()
2114 cmd |= 0xf0; in test_binary_pipeline_hickup_chunk()
2118 cmd, NULL, 0, NULL, 0); in test_binary_pipeline_hickup_chunk()