ROFL-hal  v0.6.0dev
Functions
HAL driver OpenFlow specific management interface

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...
 

Detailed Description

HAL driver OpenFlow specific management interface.

Function Documentation

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.

Parameters
dpidDatapath ID of the switch to install the FLOW_MOD
table_idTable id to get the flows of
cookieCookie to be applied
cookie_maskMask for the cookie
out_portOut port that entry must include
out_groupOut group that entry must include
matchesMatches
Returns
A pointer to an of1x_flow_aggregate_msg_t struct or NULL on error. This pointer can be safely accessed and modified, and MUST be destroyed via of1x_destroy_stats_flow_aggregate_msg() once used.
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.

Parameters
dpidDatapath ID of the switch to install the FLOW_MOD
table_idTable id to get the flows of
cookieCookie to be applied
cookie_maskMask for the cookie
out_portOut port that entry must include
out_groupOut group that entry must include
matchesMatches
Returns
A pointer to an of1x_flow_msg_t struct or NULL on error. This pointer can be safely accessed and modified, and MUST be destroyed via of1x_destroy_stats_flow_msg() once used.
of1x_stats_group_msg_t* hal_driver_of1x_get_group_stats ( uint64_t  dpid,
uint32_t  id 
)

Instructs driver to fetch the GROUP statistics.

Parameters
dpidDatapath 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.

Parameters
dpidDatapath 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.

Parameters
dpidDatapath 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.

Parameters
dpidDatapath 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.

Parameters
dpidDatapath ID of the switch to install the FLOW_MOD
table_idTable id to install the flowmod
flow_entryFlow entry to be installed
buffer_idBuffer ID. 0 or OF1XP_NO_BUFFER and implies no buffer
check_overlapCheck OVERLAP flag
check_countsCheck 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.

Parameters
dpidDatapath ID of the switch to install the FLOW_MOD
table_idTable id from which to remove the flowmod
flow_entryFlow entry
out_portOut port that entry must include
out_groupOut group that entry must include
strictnessStrictness (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.

Parameters
dpidDatapath ID of the switch to install the FLOW_MOD
table_idTable id from which to modify the flowmod
flow_entryFlow entry
buffer_idBuffer ID. 0 or OF1XP_NO_BUFFER and implies no buffer
strictnessStrictness (STRICT NON-STRICT)
check_countsCheck 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.

Parameters
dpidDatapath ID of the switch to process PACKET_OUT
buffer_idBuffer ID. 0 or OF1XP_NO_BUFFER and implies no buffer
in_portPort IN
action_groupAction group to apply
bufferPointer to the buffer
buffer_sizeBuffer 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.

Parameters
dpidDatapath ID of the switch
flagsCapabilities bitmap (OF1X_CAP_FLOW_STATS, OF1X_CAP_TABLE_STATS, ...)
miss_send_lenOF 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.

Parameters
dpidDatapath ID of the switch
port_numPort number
advertiseBitmap 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.

Parameters
dpidDatapath ID of the switch
port_numPort number
drop_receivedDrop 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.

Parameters
dpidDatapath ID of the switch
port_numPort number
forwardForward 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.

Parameters
dpidDatapath ID of the switch
port_numPort number
generate_packet_inGenerate 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

Parameters
dpidDatapath ID of the switch
port_numPort number
no_floodNo 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)

Parameters
dpidDatapath ID of the switch
table_idTable ID or 0xFF for all
miss_send_lenTable miss config