6 #include "fluid/util/util.h"
7 #include "openflow-common.hh"
17 Action(uint16_t type, uint16_t length);
21 virtual size_t pack(uint8_t *buffer);
22 virtual of_error unpack(uint8_t *buffer);
23 virtual bool equals(
const Action & other);
24 virtual bool operator==(
const Action &other)
const;
25 virtual bool operator!=(
const Action &other)
const;
29 virtual uint16_t set_order()
const {
38 void type(uint16_t type) {
41 void length(uint16_t length) {
42 this->length_ = length;
44 static Action * make_of10_action(uint16_t type);
45 static Action * make_of13_action(uint16_t type);
46 static bool delete_all(
Action * action) {
56 std::list<Action*> action_list_;
64 bool operator==(
const ActionList &other)
const;
65 bool operator!=(
const ActionList &other)
const;
68 size_t pack(uint8_t *buffer);
69 of_error unpack10(uint8_t *buffer);
70 of_error unpack13(uint8_t *buffer);
71 std::list<Action*> action_list() {
72 return this->action_list_;
78 void add_action(
Action &action);
79 void add_action(
Action *act);
80 void length(uint16_t length) {
81 this->length_ = length;
87 return lhs->set_order() < rhs->set_order();
94 std::set<Action*, comp_action_set_order> action_set_;
102 bool operator==(
const ActionSet &other)
const;
103 bool operator!=(
const ActionSet &other)
const;
106 size_t pack(uint8_t *buffer);
107 of_error unpack(uint8_t *buffer);
110 return this->length_;
112 void add_action(
Action &action);
113 void add_action(
Action *act);
114 void length(uint16_t length) {
115 this->length_ = length;