ROFL-hal  v0.6.0dev
Data Structures | Macros | Functions
driver.h File Reference

HAL driver management interface. More...

#include <stdbool.h>
#include <rofl/datapath/pipeline/monitoring.h>
#include <rofl/datapath/pipeline/physical_switch.h>
#include <rofl/datapath/pipeline/switch_port.h>
#include <rofl/datapath/pipeline/openflow/of_switch.h>
#include <rofl/datapath/pipeline/openflow/openflow1x/pipeline/matching_algorithms/matching_algorithms.h>
#include "hal.h"
#include "hal_utils.h"
#include "extensions/extensions.h"
#include "openflow/openflow1x/of1x_driver.h"

Go to the source code of this file.

Data Structures

struct  driver_info_t
 Driver information structure. More...
 

Macros

#define DRIVER_CODE_NAME_MAX_LEN   16
 
#define DRIVER_VERSION_MAX_LEN   16
 
#define DRIVER_DESCRIPTION_MAX_LEN   2048*4
 
#define DRIVER_USAGE_MAX_LEN   2048*4
 
#define DRIVER_EXTRA_PARAMS_MAX_LEN   2048*4
 

Functions

HAL_BEGIN_DECLS hal_result_t hal_driver_init (hal_extension_ops_t *extensions, const char *extra_params)
 Initialises driver. More...
 
void hal_driver_get_info (driver_info_t *info)
 Get the information of the driver (code-name, version, usage...) More...
 
hal_result_t hal_driver_destroy (void)
 Destroy driver state. More...
 
monitored_entity_t * hal_driver_get_chassis_info (void)
 Get the chassis information in the form of a monitored entity. More...
 
bool hal_driver_switch_exists (uint64_t dpid)
 Switch management functions. More...
 
dpid_list_t * hal_driver_get_all_lsi_dpids (void)
 Retrieve the list of LSIs dpids. More...
 
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. More...
 
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. More...
 
hal_result_t hal_driver_destroy_switch_by_dpid (uint64_t dpid)
 Instructs the driver to destroy the switch with the specified dpid. More...
 
bool hal_driver_port_exists (const char *name)
 Checks if a port with the specified name exists. More...
 
switch_port_name_list_t * hal_driver_get_all_port_names (void)
 Retrieve the list of names of the available ports of the platform. More...
 
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. More...
 
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 port_num, if exists. More...
 
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 port number. More...
 
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. More...
 
hal_result_t hal_driver_detach_port_from_switch (uint64_t dpid, const char *name)
 Detaches a port from the switch. More...
 
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. More...
 
hal_result_t hal_driver_bring_port_up (const char *name)
 Brings up a system's port. More...
 
hal_result_t hal_driver_bring_port_down (const char *name)
 Brings down a system's port. More...
 
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. More...
 
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. More...
 
monitoring_snapshot_state_t * hal_driver_get_monitoring_snapshot (uint64_t rev)
 Retrieve a snapshot of the monitoring state. More...
 
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 More...
 

Detailed Description

HAL driver management interface.

Author
Marc Sune<marc.sune (at) bisdn.de>

Definition in file driver.h.