ROFL-pipeline  v0.6.0dev
Data Structures | Macros | Typedefs | Enumerations | Functions
of1x_flow_entry.h File Reference

OpenFlow v1.0, 1.2 and 1.3.2 flow entry abstraction. More...

#include <stdlib.h>
#include <string.h>
#include "rofl.h"
#include "../../../common/ternary_fields.h"
#include "of1x_match.h"
#include "of1x_instruction.h"
#include "of1x_timers.h"
#include "of1x_statistics.h"
#include "of1x_utils.h"

Go to the source code of this file.

Data Structures

struct  of1x_flow_entry
 OpenFlow v1.0, 1.2 and 1.3.2 flow entry structure. More...
 

Macros

#define OF10_NON_WILDCARDED_PRIORITY_FLAG   0x10000
 
#define OF1X_DO_NOT_CHECK_COOKIE   0xffffffffffffffffULL
 

Typedefs

typedef enum
of1x_flow_removal_strictness 
of1x_flow_removal_strictness_t
 Flow removal operations strictness. More...
 
typedef enum
of1x_flow_remove_reason 
of1x_flow_remove_reason_t
 Flow remove reasons (enum ofp_flow_removed_reason) More...
 
typedef void of1x_flow_entry_platform_state_t
 Platform dependent opaque state. More...
 
typedef struct of1x_flow_entry of1x_flow_entry_t
 OpenFlow v1.0, 1.2 and 1.3.2 flow entry structure. More...
 

Enumerations

enum  of1x_flow_removal_strictness { NOT_STRICT = 0, STRICT }
 Flow removal operations strictness. More...
 
enum  of1x_flow_remove_reason {
  OF1X_FLOW_REMOVE_IDLE_TIMEOUT =0, OF1X_FLOW_REMOVE_HARD_TIMEOUT =1, OF1X_FLOW_REMOVE_DELETE =2, OF1X_FLOW_REMOVE_GROUP_DELETE =3,
  OF1X_FLOW_REMOVE_NO_REASON = 0xFF
}
 Flow remove reasons (enum ofp_flow_removed_reason) More...
 

Functions

ROFL_BEGIN_DECLS
of1x_flow_entry_t
of1x_init_flow_entry (bool notify_removal)
 Create an empty flow entry. More...
 
rofl_result_t __of1x_destroy_flow_entry_with_reason (of1x_flow_entry_t *entry, of1x_flow_remove_reason_t reason)
 
rofl_result_t of1x_destroy_flow_entry (of1x_flow_entry_t *entry)
 Destroy the flow entry, including stats, instructions and actions. More...
 
rofl_result_t of1x_add_match_to_entry (of1x_flow_entry_t *entry, of1x_match_t *match)
 Adds a match to the flow_entry. More...
 
rofl_result_t __of1x_update_flow_entry (of1x_flow_entry_t *entry_to_update, of1x_flow_entry_t *mod, bool reset_counts)
 
rofl_result_t __of1x_validate_flow_entry (of1x_flow_entry_t *entry, struct of1x_pipeline *pipeline, unsigned int table_id)
 Check if the entry(matches, actions and instructions is valid for insertion) More...
 
bool __of1x_flow_entry_check_equal (of1x_flow_entry_t *const original, of1x_flow_entry_t *const entry, uint32_t out_port, uint32_t out_group, bool check_cookie)
 Checks if entry is identical to another one out_port and out_grouap are ALWAYS checked against original flow_entry. More...
 
bool __of1x_flow_entry_check_overlap (of1x_flow_entry_t *const original, of1x_flow_entry_t *const entry, bool check_priority, bool check_cookie, uint32_t out_port, uint32_t out_group)
 Checks whether two entries overlap overlapping. More...
 
bool __of1x_flow_entry_check_contained (of1x_flow_entry_t *const original, of1x_flow_entry_t *const subentry, bool check_priority, bool check_cookie, uint32_t out_port, uint32_t out_group, bool reverse_out_check)
 Checks whether an entry is contained in the other. More...
 
void of1x_dump_flow_entry (of1x_flow_entry_t *entry, bool raw_nbo)
 Dumps the flow entry for debugging purposes. More...
 

Detailed Description

OpenFlow v1.0, 1.2 and 1.3.2 flow entry abstraction.

Author
Marc Sune<marc.sune (at) bisdn.de>, Tobias Jungel<tobias.jungel (at) bisdn.de>

Definition in file of1x_flow_entry.h.

Function Documentation

bool __of1x_flow_entry_check_contained ( of1x_flow_entry_t *const  original,
of1x_flow_entry_t *const  subentry,
bool  check_priority,
bool  check_cookie,
uint32_t  out_port,
uint32_t  out_group,
bool  reverse_out_check 
)

Checks whether an entry is contained in the other.

This is potentially an expensive call. Try to avoid using it, if the matching algorithm can guess via other (more efficient) ways...

Definition at line 194 of file of1x_flow_entry.c.

bool __of1x_flow_entry_check_equal ( of1x_flow_entry_t *const  original,
of1x_flow_entry_t *const  entry,
uint32_t  out_port,
uint32_t  out_group,
bool  check_cookie 
)

Checks if entry is identical to another one out_port and out_grouap are ALWAYS checked against original flow_entry.

Definition at line 244 of file of1x_flow_entry.c.

bool __of1x_flow_entry_check_overlap ( of1x_flow_entry_t *const  original,
of1x_flow_entry_t *const  entry,
bool  check_priority,
bool  check_cookie,
uint32_t  out_port,
uint32_t  out_group 
)

Checks whether two entries overlap overlapping.

This is potentially an expensive call. Try to avoid using it, if the matching algorithm can guess via other (more efficient) ways... out_port and out_grouap are ALWAYS checked against original flow_entry

Definition at line 142 of file of1x_flow_entry.c.

rofl_result_t __of1x_validate_flow_entry ( of1x_flow_entry_t entry,
struct of1x_pipeline pipeline,
unsigned int  table_id 
)

Check if the entry(matches, actions and instructions is valid for insertion)

Definition at line 307 of file of1x_flow_entry.c.