blob: 2f9df6458df8174c78155e88d6be3d178ec1fdf4 [file] [log] [blame]
-- binary
00 68 # length
03 # table_id
00 # pad
00 3f ff ff # match.wildcards
00 00 00 00 # remaining match fields
00 00 00 00 00 00 00 00 # ...
00 00 00 00 00 00 00 00 # ...
00 00 00 00 00 00 00 00 # ...
00 00 00 00 00 00 00 00 # ...
00 00 00 01 # duration_sec
00 00 00 02 # duration_nsec
00 64 # priority
00 05 # idle_timeout
00 0a # hard_timeout
00 00 00 00 00 00 # pad
01 23 45 67 89 ab cd ef # cookie
00 00 00 00 00 00 00 0a # packet_count
00 00 00 00 00 00 03 e8 # byte_count
00 00 # actions[0].type
00 08 # actions[0].len
00 01 # actions[0].port
00 00 # actions[0].max_len
00 00 # actions[1].type
00 08 # actions[1].len
00 02 # actions[1].port
00 00 # actions[1].max_len
-- python
ofp.flow_stats_entry(
table_id=3,
match=ofp.match(),
duration_sec=1,
duration_nsec=2,
priority=100,
idle_timeout=5,
hard_timeout=10,
cookie=0x0123456789abcdef,
packet_count=10,
byte_count=1000,
actions=[
ofp.action.output(port=1),
ofp.action.output(port=2)])
-- c
obj = of_flow_stats_entry_new(OF_VERSION_1_0);
{
of_object_t list;
of_flow_stats_entry_actions_bind(obj, &list);
{
of_object_t *obj = of_action_output_new(OF_VERSION_1_0);
of_action_output_max_len_set(obj, 0);
of_action_output_port_set(obj, 1);
of_list_append(&list, obj);
of_object_delete(obj);
}
{
of_object_t *obj = of_action_output_new(OF_VERSION_1_0);
of_action_output_max_len_set(obj, 0);
of_action_output_port_set(obj, 2);
of_list_append(&list, obj);
of_object_delete(obj);
}
}
of_flow_stats_entry_byte_count_set(obj, 1000);
of_flow_stats_entry_cookie_set(obj, 81985529216486895);
of_flow_stats_entry_duration_nsec_set(obj, 2);
of_flow_stats_entry_duration_sec_set(obj, 1);
of_flow_stats_entry_hard_timeout_set(obj, 10);
of_flow_stats_entry_idle_timeout_set(obj, 5);
{
of_match_t match = { OF_VERSION_1_0 };
of_flow_stats_entry_match_set(obj, &match);
}
of_flow_stats_entry_packet_count_set(obj, 10);
of_flow_stats_entry_priority_set(obj, 100);
of_flow_stats_entry_table_id_set(obj, 3);