projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debian: Depend on python (>= 2.7) | python-argparse
[openvswitch]
/
vswitchd
/
bridge.c
diff --git
a/vswitchd/bridge.c
b/vswitchd/bridge.c
index e89855e8bc1dfc52e8a19650b5955b2a0e14f718..265410fcb80673d9ce786b97f4783e5d9f892597 100644
(file)
--- a/
vswitchd/bridge.c
+++ b/
vswitchd/bridge.c
@@
-40,6
+40,7
@@
#include "sha1.h"
#include "shash.h"
#include "socket-util.h"
#include "sha1.h"
#include "shash.h"
#include "socket-util.h"
+#include "stream.h"
#include "stream-ssl.h"
#include "sset.h"
#include "system-stats.h"
#include "stream-ssl.h"
#include "sset.h"
#include "system-stats.h"
@@
-309,10
+310,11
@@
bridge_init(const char *remote)
ovsdb_idl_omit(idl, &ovsrec_ssl_col_external_ids);
/* Register unixctl commands. */
ovsdb_idl_omit(idl, &ovsrec_ssl_col_external_ids);
/* Register unixctl commands. */
- unixctl_command_register("qos/show", "interface", qos_unixctl_show, NULL);
- unixctl_command_register("bridge/dump-flows", "bridge",
+ unixctl_command_register("qos/show", "interface", 1, 1,
+ qos_unixctl_show, NULL);
+ unixctl_command_register("bridge/dump-flows", "bridge", 1, 1,
bridge_unixctl_dump_flows, NULL);
bridge_unixctl_dump_flows, NULL);
- unixctl_command_register("bridge/reconnect", "[bridge]",
+ unixctl_command_register("bridge/reconnect", "[bridge]",
0, 1,
bridge_unixctl_reconnect, NULL);
lacp_init();
bond_init();
bridge_unixctl_reconnect, NULL);
lacp_init();
bond_init();
@@
-372,10
+374,10
@@
collect_in_band_managers(const struct ovsrec_open_vswitch *ovs_cfg,
SSET_FOR_EACH (target, &targets) {
struct sockaddr_in *sin = &managers[n_managers];
SSET_FOR_EACH (target, &targets) {
struct sockaddr_in *sin = &managers[n_managers];
- if (
(!strncmp(target, "tcp:", 4)
- && inet_parse_active(target + 4, JSONRPC_TCP_PORT, sin)) ||
- (!strncmp(target, "ssl:", 4)
-
&& inet_parse_active(target + 4, JSONRPC_SSL_PORT, sin)
)) {
+ if (
stream_parse_target_with_default_ports(target,
+ JSONRPC_TCP_PORT,
+ JSONRPC_SSL_PORT,
+
sin
)) {
n_managers++;
}
}
n_managers++;
}
}
@@
-2034,8
+2036,8
@@
qos_unixctl_show_cb(unsigned int queue_id,
}
static void
}
static void
-qos_unixctl_show(struct unixctl_conn *conn,
- const char *arg
s
, void *aux OVS_UNUSED)
+qos_unixctl_show(struct unixctl_conn *conn,
int argc OVS_UNUSED,
+ const char *arg
v[]
, void *aux OVS_UNUSED)
{
struct ds ds = DS_EMPTY_INITIALIZER;
struct shash sh = SHASH_INITIALIZER(&sh);
{
struct ds ds = DS_EMPTY_INITIALIZER;
struct shash sh = SHASH_INITIALIZER(&sh);
@@
-2045,7
+2047,7
@@
qos_unixctl_show(struct unixctl_conn *conn,
struct qos_unixctl_show_cbdata data;
int error;
struct qos_unixctl_show_cbdata data;
int error;
- iface = iface_find(arg
s
);
+ iface = iface_find(arg
v[1]
);
if (!iface) {
unixctl_command_reply(conn, 501, "no such interface");
return;
if (!iface) {
unixctl_command_reply(conn, 501, "no such interface");
return;
@@
-2144,13
+2146,13
@@
bridge_lookup(const char *name)
/* Handle requests for a listing of all flows known by the OpenFlow
* stack, including those normally hidden. */
static void
/* Handle requests for a listing of all flows known by the OpenFlow
* stack, including those normally hidden. */
static void
-bridge_unixctl_dump_flows(struct unixctl_conn *conn,
- const char *arg
s
, void *aux OVS_UNUSED)
+bridge_unixctl_dump_flows(struct unixctl_conn *conn,
int argc OVS_UNUSED,
+ const char *arg
v[]
, void *aux OVS_UNUSED)
{
struct bridge *br;
struct ds results;
{
struct bridge *br;
struct ds results;
- br = bridge_lookup(arg
s
);
+ br = bridge_lookup(arg
v[1]
);
if (!br) {
unixctl_command_reply(conn, 501, "Unknown bridge");
return;
if (!br) {
unixctl_command_reply(conn, 501, "Unknown bridge");
return;
@@
-2167,12
+2169,12
@@
bridge_unixctl_dump_flows(struct unixctl_conn *conn,
* connections and reconnect. If BRIDGE is not specified, then all bridges
* drop their controller connections and reconnect. */
static void
* connections and reconnect. If BRIDGE is not specified, then all bridges
* drop their controller connections and reconnect. */
static void
-bridge_unixctl_reconnect(struct unixctl_conn *conn,
- const char *arg
s
, void *aux OVS_UNUSED)
+bridge_unixctl_reconnect(struct unixctl_conn *conn,
int argc,
+ const char *arg
v[]
, void *aux OVS_UNUSED)
{
struct bridge *br;
{
struct bridge *br;
- if (arg
s[0] != '\0'
) {
- br = bridge_lookup(arg
s
);
+ if (arg
c > 1
) {
+ br = bridge_lookup(arg
v[1]
);
if (!br) {
unixctl_command_reply(conn, 501, "Unknown bridge");
return;
if (!br) {
unixctl_command_reply(conn, 501, "Unknown bridge");
return;