* constant for 'command'. To parse syntax for an OFPST_FLOW or
* OFPST_AGGREGATE (or NXST_FLOW or NXST_AGGREGATE), use -1 for 'command'. */
void
-parse_ofp_str(struct flow_mod *fm, int command, const char *str_, bool verbose)
+parse_ofp_str(struct ofputil_flow_mod *fm, int command, const char *str_,
+ bool verbose)
{
enum {
F_OUT_PORT = 1 << 0,
struct cls_rule rule_copy;
struct ofpbuf actions;
struct ofpbuf *ofm;
- struct flow_mod fm;
+ struct ofputil_flow_mod fm;
ofpbuf_init(&actions, 64);
parse_ofp_str(&fm, command, string, verbose);
parse_ofp_flow_stats_request_str(struct flow_stats_request *fsr,
bool aggregate, char *string)
{
- struct flow_mod fm;
+ struct ofputil_flow_mod fm;
parse_ofp_str(&fm, -1, string, false);
fsr->aggregate = aggregate;
#include <stdio.h>
#include "openflow/nicira-ext.h"
-struct flow_mod;
struct flow_stats_request;
struct list;
struct ofpbuf;
+struct ofputil_flow_mod;
-void parse_ofp_str(struct flow_mod *, int command, const char *str_,
+void parse_ofp_str(struct ofputil_flow_mod *, int command, const char *str_,
bool verbose);
void parse_ofp_flow_mod_str(struct list *packets,
ofp_print_flow_mod(struct ds *s, const struct ofp_header *oh,
enum ofputil_msg_code code, int verbosity)
{
- struct flow_mod fm;
+ struct ofputil_flow_mod fm;
bool need_priority;
int error;
*
* Does not validate the flow_mod actions. */
int
-ofputil_decode_flow_mod(struct flow_mod *fm, const struct ofp_header *oh,
- bool flow_mod_table_id)
+ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
+ const struct ofp_header *oh, bool flow_mod_table_id)
{
const struct ofputil_msg_type *type;
uint16_t command;
* 'flow_mod_table_id' should be true if the NXT_FLOW_MOD_TABLE_ID extension is
* enabled, false otherwise. */
struct ofpbuf *
-ofputil_encode_flow_mod(const struct flow_mod *fm,
+ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
enum nx_flow_format flow_format,
bool flow_mod_table_id)
{
struct ofpbuf *ofputil_make_flow_mod_table_id(bool flow_mod_table_id);
/* Flow format independent flow_mod. */
-struct flow_mod {
+struct ofputil_flow_mod {
struct cls_rule cr;
ovs_be64 cookie;
uint8_t table_id;
size_t n_actions;
};
-int ofputil_decode_flow_mod(struct flow_mod *, const struct ofp_header *,
- bool flow_mod_table_id);
-struct ofpbuf *ofputil_encode_flow_mod(const struct flow_mod *,
+int ofputil_decode_flow_mod(struct ofputil_flow_mod *,
+ const struct ofp_header *, bool flow_mod_table_id);
+struct ofpbuf *ofputil_encode_flow_mod(const struct ofputil_flow_mod *,
enum nx_flow_format,
bool flow_mod_table_id);
static void ofopgroup_destroy(struct ofopgroup *);
-static int add_flow(struct ofproto *, struct ofconn *, struct flow_mod *,
- const struct ofp_header *);
+static int add_flow(struct ofproto *, struct ofconn *,
+ struct ofputil_flow_mod *, const struct ofp_header *);
/* This return value tells handle_openflow() that processing of the current
* OpenFlow message must be postponed until some ongoing operations have
&ofproto->tables[0], cls_rule));
if (!rule || !ofputil_actions_equal(rule->actions, rule->n_actions,
actions, n_actions)) {
- struct flow_mod fm;
+ struct ofputil_flow_mod fm;
memset(&fm, 0, sizeof fm);
fm.cr = *cls_rule;
* 'ofconn' is used to retrieve the packet buffer specified in ofm->buffer_id,
* if any. */
static int
-add_flow(struct ofproto *ofproto, struct ofconn *ofconn, struct flow_mod *fm,
- const struct ofp_header *request)
+add_flow(struct ofproto *ofproto, struct ofconn *ofconn,
+ struct ofputil_flow_mod *fm, const struct ofp_header *request)
{
struct classifier *table;
struct ofopgroup *group;
*
* Returns 0 on success, otherwise an OpenFlow error code. */
static int
-modify_flows__(struct ofconn *ofconn, const struct flow_mod *fm,
+modify_flows__(struct ofconn *ofconn, const struct ofputil_flow_mod *fm,
const struct ofp_header *request, struct list *rules)
{
struct ofopgroup *group;
* 'ofconn' is used to retrieve the packet buffer specified in fm->buffer_id,
* if any. */
static int
-modify_flows_loose(struct ofconn *ofconn, struct flow_mod *fm,
+modify_flows_loose(struct ofconn *ofconn, struct ofputil_flow_mod *fm,
const struct ofp_header *request)
{
struct ofproto *p = ofconn_get_ofproto(ofconn);
* 'ofconn' is used to retrieve the packet buffer specified in fm->buffer_id,
* if any. */
static int
-modify_flow_strict(struct ofconn *ofconn, struct flow_mod *fm,
+modify_flow_strict(struct ofconn *ofconn, struct ofputil_flow_mod *fm,
const struct ofp_header *request)
{
struct ofproto *p = ofconn_get_ofproto(ofconn);
/* Implements OFPFC_DELETE. */
static int
-delete_flows_loose(struct ofconn *ofconn, const struct flow_mod *fm,
+delete_flows_loose(struct ofconn *ofconn, const struct ofputil_flow_mod *fm,
const struct ofp_header *request)
{
struct ofproto *p = ofconn_get_ofproto(ofconn);
/* Implements OFPFC_DELETE_STRICT. */
static int
-delete_flow_strict(struct ofconn *ofconn, struct flow_mod *fm,
+delete_flow_strict(struct ofconn *ofconn, struct ofputil_flow_mod *fm,
const struct ofp_header *request)
{
struct ofproto *p = ofconn_get_ofproto(ofconn);
handle_flow_mod(struct ofconn *ofconn, const struct ofp_header *oh)
{
struct ofproto *ofproto = ofconn_get_ofproto(ofconn);
- struct flow_mod fm;
+ struct ofputil_flow_mod fm;
int error;
error = reject_slave_controller(ofconn, "flow_mod");
min_flow_format = NXFF_OPENFLOW10;
while (!ds_get_preprocessed_line(&s, file)) {
struct fte_version *version;
+ struct ofputil_flow_mod fm;
enum nx_flow_format min_ff;
- struct flow_mod fm;
parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), true);
enum nx_flow_format flow_format, struct list *packets)
{
const struct fte_version *version = fte->versions[index];
- struct flow_mod fm;
+ struct ofputil_flow_mod fm;
struct ofpbuf *ofm;
fm.cr = fte->rule;