ROFL-pipeline  v0.6.0dev
Modules | Data Structures | Typedefs | Enumerations | Functions
Data-model core APIs and data structures

The data-model core APIs and data structures present a unified data-model of a dataplane. More...

Modules

 OpenFlow v1.x (1.0, 1.2 and 1.3.2) data-model core APIs and data structures
 OpenFlow v1.x (1.0, 1.2 and 1.3.2) data-model core APIs and data structures used both internally and for data exchanging (State managment API) with the library user.
 
 Generalized monitoring framework data-model core APIs and data structures
 Generalized monitoring framework data-model core APIs and data structures.
 
 Extensible OpenFlow software matching algorithm APIs
 APIs to extend ROFL-pipeline with new (software/hybrid) OpenFlow table matching algorithms.
 

Data Structures

struct  of_switch
 OpenFlow-enabled switch abstraction (version-indepedent part). More...
 
struct  queue_stats
 Queue stats. More...
 
struct  port_queue
 Switch queue abstraction. More...
 
struct  port_stats
 Port stats. More...
 
struct  switch_port
 Port abstraction. More...
 

Typedefs

typedef struct of_switch of_switch_t
 OpenFlow-enabled switch abstraction (version-indepedent part). More...
 
typedef struct queue_stats queue_stats_t
 Queue stats. More...
 
typedef struct port_queue port_queue_t
 Switch queue abstraction. More...
 
typedef enum port_features port_features_t
 Port features. More...
 
typedef struct port_stats port_stats_t
 Port stats. More...
 
typedef enum port_type port_type_t
 Port type enumeration. More...
 
typedef struct switch_port switch_port_t
 Port abstraction. More...
 

Enumerations

enum  port_state_t { PORT_STATE_NONE = 0 << 0, PORT_STATE_LINK_DOWN = 1 << 0, PORT_STATE_BLOCKED = 1 << 1, PORT_STATE_LIVE = 1 << 2 }
 Port state. More...
 
enum  port_features {
  PORT_FEATURE_10MB_HD = 1 << 0, PORT_FEATURE_10MB_FD = 1 << 1, PORT_FEATURE_100MB_HD = 1 << 2, PORT_FEATURE_100MB_FD = 1 << 3,
  PORT_FEATURE_1GB_HD = 1 << 4, PORT_FEATURE_1GB_FD = 1 << 5, PORT_FEATURE_10GB_FD = 1 << 6, PORT_FEATURE_40GB_FD = 1 << 7,
  PORT_FEATURE_100GB_FD = 1 << 8, PORT_FEATURE_1TB_FD = 1 << 9, PORT_FEATURE_OTHER = 1 << 10, PORT_FEATURE_COPPER = 1 << 11,
  PORT_FEATURE_FIBER = 1 << 12, PORT_FEATURE_AUTONEG = 1 << 13, PORT_FEATURE_PAUSE = 1 << 14, PORT_FEATURE_PAUSE_ASYM = 1 << 15
}
 Port features. More...
 
enum  port_type {
  PORT_TYPE_INVALID = 0, PORT_TYPE_PHYSICAL = 1, PORT_TYPE_VIRTUAL = 2, PORT_TYPE_TUNNEL = 3,
  PORT_TYPE_META_FLOOD = 5, PORT_TYPE_META_IN_PORT = 6, PORT_TYPE_META_ALL = 7, PORT_TYPE_NF_NATIVE = 8,
  PORT_TYPE_NF_SHMEM = 9, PORT_TYPE_NF_EXTERNAL = 10
}
 Port type enumeration. More...
 

Functions

ROFL_BEGIN_DECLS rofl_result_t of_destroy_switch (const of_switch_t *sw)
 Destroys an OpenFlow logical switch. More...
 
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. More...
 
void of_process_pipeline_tables_timeout_expirations (const of_switch_t *sw)
 Processes flow entry expirations in all the pipeline tables of the switch. More...
 
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. More...
 

Detailed Description

The data-model core APIs and data structures present a unified data-model of a dataplane.

The core APIs expose the initiliazers/destructors and the data structures used by the core library and by the other APIs (exposed and consumed). Only the documented structures and APIs should be used by the user library.

Typedef Documentation

typedef struct of_switch of_switch_t

OpenFlow-enabled switch abstraction (version-indepedent part).

Port features.

typedef struct port_queue port_queue_t

Switch queue abstraction.

The library does not supose any special meanining over the queue id (e.g. queue_id 1 has higher priority than queue_id 0). Most implementations though use the library being 0 best-effort and the highest the number the highest priority the queue has.

typedef struct port_stats port_stats_t

Port stats.

typedef enum port_type port_type_t

Port type enumeration.

META ports are fake ports. META distinction is "group" of port types which are fake ports (not fitting traditional port types classification).

typedef struct queue_stats queue_stats_t

Queue stats.

typedef struct switch_port switch_port_t

Port abstraction.

The switch_port implements the switch port abstraction. There are four types of ports:

  • PORT_TYPE_PHYSICAL: representing a system's interface or device.
  • PORT_TYPE_TUNNEL: a tunnel endpoint termination.
  • PORT_TYPE_VIRTUAL: anything that does not fall to previous cat.
  • PORT_TYPE_META: meta type should NEVER be used by the user. This has nothing to do with OpenFlow METADATA.

Enumeration Type Documentation

Port features.

Definition at line 47 of file switch_port.h.

Port state.

Definition at line 36 of file switch_port.h.

enum port_type

Port type enumeration.

META ports are fake ports. META distinction is "group" of port types which are fake ports (not fitting traditional port types classification).

Definition at line 106 of file switch_port.h.

Function Documentation

ROFL_BEGIN_DECLS rofl_result_t of_destroy_switch ( const of_switch_t sw)

Destroys an OpenFlow logical switch.

of_destroy_switch() an OpenFlow logical switch. The switch MUST have been already removed from the physical switch pool via physical_switch_remove_logical_switch_by_dpid() or physical_switch_remove_logical_switch()

of_destroy_switch() will call the appropiate OF version sepecific destroyer.

Any other thread/hw thread/process, may not attempt to process packets via of_process_packet_pipeline() before calling this function.

Definition at line 15 of file of_switch.c.

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.

Definition at line 110 of file of_switch.c.

void of_process_pipeline_tables_timeout_expirations ( const of_switch_t sw)

Processes flow entry expirations in all the pipeline tables of the switch.

This call may only be used if the platform does not have a hardware accelerated timers machinery.

The platform has to periodically call of_process_pipeline_tables_timeout_expirations() (usually via some background thread). The optimal period is around 500ms.

Parameters
swThe switch which has to check flow entry expirations

Definition at line 40 of file of_switch.c.

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.

Warning: this function may DELETE all the entries in the tables, timers and group entries of the switch

Parameters
versionOF version

Definition at line 27 of file of_switch.c.