ROFL-hal
v0.6.0dev
|
HAL driver OpenFlow specific management interface. More...
Functions | |
HAL_BEGIN_DECLS hal_result_t | hal_driver_of1x_set_port_drop_received_config (uint64_t dpid, unsigned int port_num, bool drop_received) |
Instructs driver to modify port config state. More... | |
hal_result_t | hal_driver_of1x_set_port_no_flood_config (uint64_t dpid, unsigned int port_num, bool no_flood) |
Instructs driver to modify port config state. More... | |
hal_result_t | hal_driver_of1x_set_port_forward_config (uint64_t dpid, unsigned int port_num, bool forward) |
Instructs driver to modify port config state. More... | |
hal_result_t | hal_driver_of1x_set_port_generate_packet_in_config (uint64_t dpid, unsigned int port_num, bool generate_packet_in) |
Instructs driver to modify port config state. More... | |
hal_result_t | hal_driver_of1x_set_port_advertise_config (uint64_t dpid, unsigned int port_num, uint32_t advertise) |
Instructs driver to modify port advertise flags. More... | |
hal_result_t | hal_driver_of1x_set_pipeline_config (uint64_t dpid, unsigned int flags, uint16_t miss_send_len) |
Instructs driver to process a PACKET_OUT event. More... | |
hal_result_t | hal_driver_of1x_set_table_config (uint64_t dpid, unsigned int table_id, of1x_flow_table_miss_config_t config) |
Instructs driver to set table configuration(default action) More... | |
hal_result_t | hal_driver_of1x_process_packet_out (uint64_t dpid, uint32_t buffer_id, uint32_t in_port, of1x_action_group_t *action_group, uint8_t *buffer, uint32_t buffer_size) |
Instructs driver to process a PACKET_OUT event. More... | |
hal_result_t | hal_driver_of1x_process_flow_mod_add (uint64_t dpid, uint8_t table_id, of1x_flow_entry_t **flow_entry, uint32_t buffer_id, bool check_overlap, bool reset_counts) |
Instructs driver to process a FLOW_MOD add eventThis method will add a flow_entry to the table of the switch referenced by the dpid. More... | |
hal_result_t | hal_driver_of1x_process_flow_mod_modify (uint64_t dpid, uint8_t table_id, of1x_flow_entry_t **flow_entry, uint32_t buffer_id, of1x_flow_removal_strictness_t strictness, bool reset_counts) |
Instructs driver to process a FLOW_MOD modify eventThe modify flow entry will modify any exisiting entry in the table that contains the same matches as the parameter entry. More... | |
hal_result_t | hal_driver_of1x_process_flow_mod_delete (uint64_t dpid, uint8_t table_id, of1x_flow_entry_t *flow_entry, uint32_t out_port, uint32_t out_group, of1x_flow_removal_strictness_t strictness) |
Instructs driver to process a FLOW_MOD eventThe remove flow entry will remove and destroy any exisiting entry in the table that contains the same matches as the parameter entry. More... | |
of1x_stats_flow_msg_t * | hal_driver_of1x_get_flow_stats (uint64_t dpid, uint8_t table_id, uint32_t cookie, uint32_t cookie_mask, uint32_t out_port, uint32_t out_group, of1x_match_group_t *const matches) |
Recovers the flow stats given a set of matches. More... | |
of1x_stats_flow_aggregate_msg_t * | hal_driver_of1x_get_flow_aggregate_stats (uint64_t dpid, uint8_t table_id, uint32_t cookie, uint32_t cookie_mask, uint32_t out_port, uint32_t out_group, of1x_match_group_t *const matches) |
Recovers the aggregated flow stats given a set of matches. More... | |
rofl_of1x_gm_result_t | hal_driver_of1x_group_mod_add (uint64_t dpid, of1x_group_type_t type, uint32_t id, of1x_bucket_list_t **buckets) |
Instructs driver to add a new GROUP. More... | |
rofl_of1x_gm_result_t | hal_driver_of1x_group_mod_modify (uint64_t dpid, of1x_group_type_t type, uint32_t id, of1x_bucket_list_t **buckets) |
Instructs driver to modify the GROUP with identification ID. More... | |
rofl_of1x_gm_result_t | hal_driver_of1x_group_mod_delete (uint64_t dpid, uint32_t id) |
Instructs driver to delete the GROUP with identification ID. More... | |
of1x_stats_group_msg_t * | hal_driver_of1x_get_group_stats (uint64_t dpid, uint32_t id) |
Instructs driver to fetch the GROUP statistics. More... | |
HAL driver OpenFlow specific management interface.
of1x_stats_flow_aggregate_msg_t* hal_driver_of1x_get_flow_aggregate_stats | ( | uint64_t | dpid, |
uint8_t | table_id, | ||
uint32_t | cookie, | ||
uint32_t | cookie_mask, | ||
uint32_t | out_port, | ||
uint32_t | out_group, | ||
of1x_match_group_t *const | matches | ||
) |
Recovers the aggregated flow stats given a set of matches.
dpid | Datapath ID of the switch to install the FLOW_MOD |
table_id | Table id to get the flows of |
cookie | Cookie to be applied |
cookie_mask | Mask for the cookie |
out_port | Out port that entry must include |
out_group | Out group that entry must include |
matches | Matches |
of1x_stats_flow_msg_t* hal_driver_of1x_get_flow_stats | ( | uint64_t | dpid, |
uint8_t | table_id, | ||
uint32_t | cookie, | ||
uint32_t | cookie_mask, | ||
uint32_t | out_port, | ||
uint32_t | out_group, | ||
of1x_match_group_t *const | matches | ||
) |
Recovers the flow stats given a set of matches.
dpid | Datapath ID of the switch to install the FLOW_MOD |
table_id | Table id to get the flows of |
cookie | Cookie to be applied |
cookie_mask | Mask for the cookie |
out_port | Out port that entry must include |
out_group | Out group that entry must include |
matches | Matches |
of1x_stats_group_msg_t* hal_driver_of1x_get_group_stats | ( | uint64_t | dpid, |
uint32_t | id | ||
) |
Instructs driver to fetch the GROUP statistics.
dpid | Datapath ID of the switch where the GROUP is |
rofl_of1x_gm_result_t hal_driver_of1x_group_mod_add | ( | uint64_t | dpid, |
of1x_group_type_t | type, | ||
uint32_t | id, | ||
of1x_bucket_list_t ** | buckets | ||
) |
Instructs driver to add a new GROUP.
If (and only if) the mod operation is successful the contents of the pointer buckets are set to NULL. Any other reference to the buckets (**buckets) shall never be further used.
dpid | Datapath ID of the switch to install the GROUP |
rofl_of1x_gm_result_t hal_driver_of1x_group_mod_delete | ( | uint64_t | dpid, |
uint32_t | id | ||
) |
Instructs driver to delete the GROUP with identification ID.
dpid | Datapath ID of the switch to delete the GROUP |
rofl_of1x_gm_result_t hal_driver_of1x_group_mod_modify | ( | uint64_t | dpid, |
of1x_group_type_t | type, | ||
uint32_t | id, | ||
of1x_bucket_list_t ** | buckets | ||
) |
Instructs driver to modify the GROUP with identification ID.
If (and only if) the mod operation is successful the contents of the pointer buckets are set to NULL. Any other reference to the buckets (**buckets) shall never be further used.
dpid | Datapath ID of the switch to modify the GROUP |
hal_result_t hal_driver_of1x_process_flow_mod_add | ( | uint64_t | dpid, |
uint8_t | table_id, | ||
of1x_flow_entry_t ** | flow_entry, | ||
uint32_t | buffer_id, | ||
bool | check_overlap, | ||
bool | reset_counts | ||
) |
Instructs driver to process a FLOW_MOD add eventThis method will add a flow_entry to the table of the switch referenced by the dpid.
The flow entry shall already be initialized via of1x_init_flow_entry, and must already contain the matches, instructions and actions.
When check_overlap is enabled, addition will fail if there is at least one entry which may potentally match the same packet, and this entry has the same priority.
If (and only if) the mod operation is successful the contents of the pointer entry are set to NULL. Any other reference to the real entry (**entry) shall never be further used.
On success, the driver will instantiate the necessary state to handle timers and statistics.
dpid | Datapath ID of the switch to install the FLOW_MOD |
table_id | Table id to install the flowmod |
flow_entry | Flow entry to be installed |
buffer_id | Buffer ID. 0 or OF1XP_NO_BUFFER and implies no buffer |
check_overlap | Check OVERLAP flag |
check_counts | Check RESET_COUNTS flag |
hal_result_t hal_driver_of1x_process_flow_mod_delete | ( | uint64_t | dpid, |
uint8_t | table_id, | ||
of1x_flow_entry_t * | flow_entry, | ||
uint32_t | out_port, | ||
uint32_t | out_group, | ||
of1x_flow_removal_strictness_t | strictness | ||
) |
Instructs driver to process a FLOW_MOD eventThe remove flow entry will remove and destroy any exisiting entry in the table that contains the same matches as the parameter entry.
The "entry" parameter is NOT a pointer to an existing table entry.
The entry parameter will never be modified by the library, and can be safely changed or removed after the call of hal_driver_of1x_process_flow_mod_delete().
On success, the timers and statistics of the removed entries shall be purged.
dpid | Datapath ID of the switch to install the FLOW_MOD |
table_id | Table id from which to remove the flowmod |
flow_entry | Flow entry |
out_port | Out port that entry must include |
out_group | Out group that entry must include |
strictness | Strictness (STRICT NON-STRICT) |
hal_result_t hal_driver_of1x_process_flow_mod_modify | ( | uint64_t | dpid, |
uint8_t | table_id, | ||
of1x_flow_entry_t ** | flow_entry, | ||
uint32_t | buffer_id, | ||
of1x_flow_removal_strictness_t | strictness, | ||
bool | reset_counts | ||
) |
Instructs driver to process a FLOW_MOD modify eventThe modify flow entry will modify any exisiting entry in the table that contains the same matches as the parameter entry.
The "entry" parameter is NOT a pointer to an existing table entry.
If (and only if) the mod operation is successful the contents of the pointer entry are set to NULL. Any other reference to the real entry (**entry) shall never be further used.
dpid | Datapath ID of the switch to install the FLOW_MOD |
table_id | Table id from which to modify the flowmod |
flow_entry | Flow entry |
buffer_id | Buffer ID. 0 or OF1XP_NO_BUFFER and implies no buffer |
strictness | Strictness (STRICT NON-STRICT) |
check_counts | Check RESET_COUNTS flag |
hal_result_t hal_driver_of1x_process_packet_out | ( | uint64_t | dpid, |
uint32_t | buffer_id, | ||
uint32_t | in_port, | ||
of1x_action_group_t * | action_group, | ||
uint8_t * | buffer, | ||
uint32_t | buffer_size | ||
) |
Instructs driver to process a PACKET_OUT event.
dpid | Datapath ID of the switch to process PACKET_OUT |
buffer_id | Buffer ID. 0 or OF1XP_NO_BUFFER and implies no buffer |
in_port | Port IN |
action_group | Action group to apply |
buffer | Pointer to the buffer |
buffer_size | Buffer size |
hal_result_t hal_driver_of1x_set_pipeline_config | ( | uint64_t | dpid, |
unsigned int | flags, | ||
uint16_t | miss_send_len | ||
) |
Instructs driver to process a PACKET_OUT event.
dpid | Datapath ID of the switch |
flags | Capabilities bitmap (OF1X_CAP_FLOW_STATS, OF1X_CAP_TABLE_STATS, ...) |
miss_send_len | OF MISS_SEND_LEN |
hal_result_t hal_driver_of1x_set_port_advertise_config | ( | uint64_t | dpid, |
unsigned int | port_num, | ||
uint32_t | advertise | ||
) |
Instructs driver to modify port advertise flags.
dpid | Datapath ID of the switch |
port_num | Port number |
advertise | Bitmap advertised |
HAL_BEGIN_DECLS hal_result_t hal_driver_of1x_set_port_drop_received_config | ( | uint64_t | dpid, |
unsigned int | port_num, | ||
bool | drop_received | ||
) |
Instructs driver to modify port config state.
dpid | Datapath ID of the switch |
port_num | Port number |
drop_received | Drop packets received |
hal_result_t hal_driver_of1x_set_port_forward_config | ( | uint64_t | dpid, |
unsigned int | port_num, | ||
bool | forward | ||
) |
Instructs driver to modify port config state.
dpid | Datapath ID of the switch |
port_num | Port number |
forward | Forward packets |
hal_result_t hal_driver_of1x_set_port_generate_packet_in_config | ( | uint64_t | dpid, |
unsigned int | port_num, | ||
bool | generate_packet_in | ||
) |
Instructs driver to modify port config state.
dpid | Datapath ID of the switch |
port_num | Port number |
generate_packet_in | Generate packet in events for this port |
hal_result_t hal_driver_of1x_set_port_no_flood_config | ( | uint64_t | dpid, |
unsigned int | port_num, | ||
bool | no_flood | ||
) |
Instructs driver to modify port config state.
When this flag is set the port will not forward flood packets
dpid | Datapath ID of the switch |
port_num | Port number |
no_flood | No flood allowed in port |
hal_result_t hal_driver_of1x_set_table_config | ( | uint64_t | dpid, |
unsigned int | table_id, | ||
of1x_flow_table_miss_config_t | config | ||
) |
Instructs driver to set table configuration(default action)
dpid | Datapath ID of the switch |
table_id | Table ID or 0xFF for all |
miss_send_len | Table miss config |