2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

ovs-ofctl: Add "packet-out" command.

I don't expect this to be widely useful.  An upcoming commit will add a
use in unit tests.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-01-25 16:30:28 -08:00
parent a993007bee
commit 0c3d5fc89a
5 changed files with 84 additions and 5 deletions

View File

@@ -625,6 +625,19 @@ parse_ofp_str(struct ofputil_flow_mod *fm, int command, const char *str_,
free(string);
}
/* Parses 's' as a set of OpenFlow actions and appends the actions to
* 'actions'.
*
* Prints an error on stderr and aborts the program if 's' syntax is
* invalid. */
void
parse_ofp_actions(const char *s_, struct ofpbuf *actions)
{
char *s = xstrdup(s_);
str_to_action(NULL, s, actions);
free(s);
}
/* Parses 'string' as an OFPT_FLOW_MOD or NXT_FLOW_MOD with command 'command'
* (one of OFPFC_*) and appends the parsed OpenFlow message to 'packets'.
* '*cur_format' should initially contain the flow format currently configured