master-thesis/p4src/actions_controller.p4

21 lines
524 B
Plaintext

#ifndef NICO_CONTROLLER
#define NICO_CONTROLLER
/********************** GENERAL ACTIONS ***********************************/
action controller_reply(task_t task) {
meta.task = task;
meta.ingress_port = standard_metadata.ingress_port;
clone3(CloneType.I2E, 100, meta);
}
action controller_debug_table_id(table_t table_id) {
meta.table_id = table_id;
controller_reply(TASK_DEBUG);
}
action controller_debug() {
controller_reply(TASK_DEBUG);
}
#endif