9 #include <rofl/datapath/pipeline/monitoring.h>
10 #include <rofl/datapath/pipeline/physical_switch.h>
11 #include <rofl/datapath/pipeline/switch_port.h>
12 #include <rofl/datapath/pipeline/openflow/of_switch.h>
13 #include <rofl/datapath/pipeline/openflow/openflow1x/pipeline/matching_algorithms/matching_algorithms.h>
16 #include "hal_utils.h"
27 #define DRIVER_CODE_NAME_MAX_LEN 16
28 #define DRIVER_VERSION_MAX_LEN 16
29 #define DRIVER_DESCRIPTION_MAX_LEN 2048*4
30 #define DRIVER_USAGE_MAX_LEN 2048*4
31 #define DRIVER_EXTRA_PARAMS_MAX_LEN 2048*4
41 char code_name[DRIVER_CODE_NAME_MAX_LEN];
45 char version[DRIVER_VERSION_MAX_LEN];
49 char description[DRIVER_DESCRIPTION_MAX_LEN];
53 char usage[DRIVER_USAGE_MAX_LEN];
57 char extra_params[DRIVER_EXTRA_PARAMS_MAX_LEN];
194 hal_result_t hal_driver_connect_switches(uint64_t dpid_lsi1,
unsigned int* port_num1, switch_port_snapshot_t** port1, uint64_t dpid_lsi2,
unsigned int* port_num2, switch_port_snapshot_t** port2);
HAL_BEGIN_DECLS hal_result_t hal_driver_init(hal_extension_ops_t *extensions, const char *extra_params)
Initialises driver.
hal_result_t hal_driver_bring_port_up(const char *name)
Brings up a system's port.
of_switch_snapshot_t * hal_driver_get_switch_snapshot_by_dpid(uint64_t dpid)
Retrieves a snapshot of the current state of a switch port, if the port name is found.
hal_result_t hal_driver_attach_port_to_switch(uint64_t dpid, const char *name, unsigned int *port_num)
Attempts to attach a system's port to switch, at port_num if defined, otherwise in the first empty po...
hal_result_t hal_driver_detach_port_from_switch(uint64_t dpid, const char *name)
Detaches a port from the switch.
hal_result_t hal_driver_list_matching_algorithms(of_version_t of_version, const char *const **name_list, int *count)
get a list of available matching algorithms
Hardware Abstraction Layer (HAL) main header file.
monitoring_snapshot_state_t * hal_driver_get_monitoring_snapshot(uint64_t rev)
Retrieve a snapshot of the monitoring state.
hal_result_t hal_driver_connect_switches(uint64_t dpid_lsi1, unsigned int *port_num1, switch_port_snapshot_t **port1, uint64_t dpid_lsi2, unsigned int *port_num2, switch_port_snapshot_t **port2)
Attempts to connect two logical switches via a virtual port.
bool hal_driver_port_exists(const char *name)
Checks if a port with the specified name exists.
Driver information structure.
void hal_driver_get_info(driver_info_t *info)
Get the information of the driver (code-name, version, usage...)
hal_result_t hal_driver_bring_port_down_by_num(uint64_t dpid, unsigned int port_num)
Brings down a port from a Logical Switch Instance.
Extensions ops HAL definition.
hal_result_t hal_driver_destroy_switch_by_dpid(uint64_t dpid)
Instructs the driver to destroy the switch with the specified dpid.
switch_port_snapshot_t * hal_driver_get_port_snapshot_by_num(uint64_t dpid, unsigned int port_num)
Retrieves a snapshot of the current state of the port of the Logical Switch Instance with dpid at por...
monitored_entity_t * hal_driver_get_chassis_info(void)
Get the chassis information in the form of a monitored entity.
switch_port_snapshot_t * hal_driver_get_port_snapshot_by_name(const char *name)
Retrieves a snapshot of the current state of a switch port, if the port name is found.
hal_result_t hal_driver_bring_port_down(const char *name)
Brings down a system's port.
dpid_list_t * hal_driver_get_all_lsi_dpids(void)
Retrieve the list of LSIs dpids.
hal_result_t hal_driver_destroy(void)
Destroy driver state.
switch_port_name_list_t * hal_driver_get_all_port_names(void)
Retrieve the list of names of the available ports of the platform.
enum hal_result hal_result_t
HAL return values.
hal_result_t hal_driver_create_switch(char *name, uint64_t dpid, of_version_t of_version, unsigned int num_of_tables, int *ma_list)
Instruct driver to create an OF logical switch.
hal_result_t hal_driver_bring_port_up_by_num(uint64_t dpid, unsigned int port_num)
Brings up a port from a Logical Switch Instance.
HAL driver OpenFlow specific management interface.
bool hal_driver_switch_exists(uint64_t dpid)
Switch management functions.
hal_result_t hal_driver_detach_port_from_switch_at_port_num(uint64_t dpid, const unsigned int port_num)
Detaches port_num of the logical switch identified with dpid.