indigo_error_t indigo_fwd_table_stats_get(of_table_stats_request_t *request, of_table_stats_reply_t **reply) { AIM_LOG_VERBOSE("table stats get called\n"); *reply = of_table_stats_reply_new(request->version); return INDIGO_ERROR_NONE; }
void indigo_fwd_table_stats_get(of_table_stats_request_t *request, indigo_cookie_t cookie) { of_table_stats_reply_t *reply; AIM_LOG_VERBOSE("table stats get called\n"); reply = of_table_stats_reply_new(request->version); indigo_core_table_stats_get_callback(INDIGO_ERROR_NONE, reply, cookie); of_table_stats_request_delete(request); }
static int test_validate_fixed_length_list(void) { of_table_stats_reply_t *obj = of_table_stats_reply_new(OF_VERSION_1_0); of_list_table_stats_entry_t list; of_table_stats_entry_t element; of_message_t msg; of_table_stats_reply_entries_bind(obj, &list); of_table_stats_entry_init(&element, OF_VERSION_1_0, -1, 1); of_list_table_stats_entry_append_bind(&list, &element); of_list_table_stats_entry_append_bind(&list, &element); msg = OF_OBJECT_TO_MESSAGE(obj); TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == 0); of_message_length_set(msg, of_message_length_get(msg) - 1); TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == -1); of_table_stats_reply_delete(obj); return TEST_PASS; }