5 #ifndef __OF_SWITCH_H__
6 #define __OF_SWITCH_H__
10 #include "../switch_port.h"
32 #define __OF_VERSION_MAX (OF_VERSION_13+1)
35 extern const char* of_version_str[__OF_VERSION_MAX];
37 #ifndef LOGICAL_SWITCH_MAX_LOG_PORTS
38 #define LOGICAL_SWITCH_MAX_LOG_PORTS 512 // 511, 0 slot NEVER used (has to be less than OF1X_PORT_MAX)
42 #define LOGICAL_SWITCH_MAX_LEN_NAME 32
45 typedef void of_switch_platform_state_t;
63 char name[LOGICAL_SWITCH_MAX_LEN_NAME];
64 unsigned int max_ports;
65 unsigned int num_of_ports;
86 typedef int of_packet_in_reason_t;
136 rofl_result_t __of_detach_port_from_switch_by_port_num(
of_switch_t* sw,
unsigned int port_num);
138 rofl_result_t __of_detach_all_ports_from_switch(
of_switch_t* sw);
OpenFlow-enabled switch abstraction (version-indepedent part).
rofl_result_t of_reconfigure_switch(of_switch_t *sw, of_version_t version)
Reconfigures the pipeline to behave as an OF specific version pipeline.
void of_switch_destroy_snapshot(of_switch_snapshot_t *snapshot)
Destroy a previously generated snapshot.
of_switch_t of_switch_snapshot_t
Switch snapshot.
of_switch_platform_state_t * platform_state
Platform agnostic state.
struct of_switch of_switch_t
OpenFlow-enabled switch abstraction (version-indepedent part).
void of_process_pipeline_tables_timeout_expirations(const of_switch_t *sw)
Processes flow entry expirations in all the pipeline tables of the switch.
rofl_result_t of_get_switch_matching_algorithms(of_version_t of_version, const char *const **name_list, int *count)
Retrieves the list of available matching algorithms available for OF version of_version.
ROFL_BEGIN_DECLS rofl_result_t of_destroy_switch(const of_switch_t *sw)
Destroys an OpenFlow logical switch.