ROFL-pipeline  v0.6.0dev
of1x_async_events_hooks.h
Go to the documentation of this file.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 #ifndef ASYNC_EVENTS_HOOKS_OF1X_H_
6 #define ASYNC_EVENTS_HOOKS_OF1X_H_
7 
8 #include "rofl.h"
9 #include "../of_switch.h"
10 #include "of1x_switch.h"
12 #include "../../../pipeline/common/datapacket.h"
13 
30  OF1X_PKT_IN_NO_MATCH = 0, /* No matching flow. */
31  OF1X_PKT_IN_ACTION = 1, /* Action explicitly output to controller. */
32  OF1X_PKT_IN_INVALID_TTL = 2 /* Packet has invalid TTL */
33 };
34 
35 
36 //C++ extern C
37 ROFL_BEGIN_DECLS
38 
39 /*
40 * Configuration hooks
41 */
42 //TODO: evaluate if they must return errors
43 
50 
51 /*
52 * Async events
53 */
54 
61 
72 void platform_of1x_packet_in(const of1x_switch_t* sw, uint8_t table_id, datapacket_t* pkt, uint16_t send_len, of_packet_in_reason_t reason);
73 
83  of1x_flow_entry_t* removed_flow_entry);
84 
91 
99 void platform_of1x_modify_entry_hook(of1x_flow_entry_t* old_entry, of1x_flow_entry_t* mod, int reset_count);
100 
107 
114 
115 //Extern C
116 ROFL_END_DECLS
117 
118 #endif /* ASYNC_EVENTS_HOOKS_OF1X_H_ */
void plaftorm_of1x_add_entry_hook(of1x_flow_entry_t *new_entry)
It can be used by hardware or other software (non rofl-pipeline) pipelines, to install the new entry...
OpenFlow-enabled v1.0, 1.2 and 1.3.2 switch abstraction.
Definition: of1x_switch.h:28
rofl_result_t platform_pre_destroy_of1x_switch(of1x_switch_t *sw)
Allows the user of the library to perform other platform related actions when a switch is about the b...
OpenFlow v1.0, 1.2 and 1.3.2 flow entry structure.
enum of1x_flow_remove_reason of1x_flow_remove_reason_t
Flow remove reasons (enum ofp_flow_removed_reason)
void platform_of1x_modify_entry_hook(of1x_flow_entry_t *old_entry, of1x_flow_entry_t *mod, int reset_count)
It can be used by hardware or other software (non rofl-pipeline) pipelines, to modify an entry (singl...
ROFL_BEGIN_DECLS rofl_result_t platform_post_init_of1x_switch(of1x_switch_t *sw)
Allows the user of the library to pre-configure the switch, as well as perform other platform related...
void platform_of1x_remove_entry_hook(of1x_flow_entry_t *entry)
It can be used by hardware or other software (non rofl-pipeline) pipelines, to remove an entry (singl...
void platform_of1x_notify_flow_removed(const of1x_switch_t *sw, of1x_flow_remove_reason_t reason, of1x_flow_entry_t *removed_flow_entry)
Flow removed event notification.
void platform_of1x_packet_in(const of1x_switch_t *sw, uint8_t table_id, datapacket_t *pkt, uint16_t send_len, of_packet_in_reason_t reason)
Packet in event notification.
OpenFlow v1.0, 1.2 and 1.3.2 logical switch abstraction.
OpenFlow v1.0, 1.2 and 1.3.2 flow entry abstraction.
of1x_packet_in_reason
Packet-in reason (of12p_packet_in_reason enum)
void platform_of1x_update_stats_hook(of1x_flow_entry_t *entry)
It can be used by hardware or other software (non rofl-pipeline) pipelines, to update the stats of an...
Data packet abstraction.
Definition: datapacket.h:49