projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vlog: Make the vlog module catalog program-specific.
[openvswitch]
/
extras
/
ezio
/
ovs-switchui.c
diff --git
a/extras/ezio/ovs-switchui.c
b/extras/ezio/ovs-switchui.c
index 4f0843f396a3e587a02a0a05697bd8757c787d0c..6f433a3f63f1024c8618c56be74025aea650fdaf 100644
(file)
--- a/
extras/ezio/ovs-switchui.c
+++ b/
extras/ezio/ovs-switchui.c
@@
-35,6
+35,7
@@
#include "ezio.h"
#include "fatal-signal.h"
#include "netdev.h"
#include "ezio.h"
#include "fatal-signal.h"
#include "netdev.h"
+#include "ofp-util.h"
#include "ofpbuf.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
#include "ofpbuf.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
@@
-48,10
+49,10
@@
#include "timeval.h"
#include "util.h"
#include "vconn.h"
#include "timeval.h"
#include "util.h"
#include "vconn.h"
+#include "vlog.h"
#include "xtoxll.h"
#include "xtoxll.h"
-#define THIS_MODULE VLM_switchui
-#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(switchui)
static void parse_options(int argc, char *argv[]);
static void usage(void);
static void parse_options(int argc, char *argv[]);
static void usage(void);
@@
-146,11
+147,9
@@
main(int argc, char *argv[])
proctitle_init(argc, argv);
set_program_name(argv[0]);
proctitle_init(argc, argv);
set_program_name(argv[0]);
- time_init();
- vlog_init();
parse_options(argc, argv);
signal(SIGPIPE, SIG_IGN);
parse_options(argc, argv);
signal(SIGPIPE, SIG_IGN);
- vlog_set_levels(
VLM_ANY_MODULE
, VLF_CONSOLE, VLL_EMER);
+ vlog_set_levels(
NULL
, VLF_CONSOLE, VLL_EMER);
init_reboot_notifier();
argc -= optind;
init_reboot_notifier();
argc -= optind;
@@
-160,7
+159,8
@@
main(int argc, char *argv[])
"use --help for help");
}
"use --help for help");
}
- rconn = rconn_new(argv[0], 5, 5);
+ rconn = rconn_create(5, 5);
+ rconn_connect(rconn, argv[0], NULL);
die_if_already_running();
daemonize();
die_if_already_running();
daemonize();
@@
-242,7
+242,7
@@
main(int argc, char *argv[])
refresh();
poll_fd_wait(STDIN_FILENO, POLLIN);
refresh();
poll_fd_wait(STDIN_FILENO, POLLIN);
- poll_timer_wait
(timeout - time_msec()
);
+ poll_timer_wait
_until(timeout
);
poll_block();
} while (time_msec() < timeout);
age_messages();
poll_block();
} while (time_msec() < timeout);
age_messages();
@@
-868,7
+868,7
@@
fetch_status(struct rconn *rconn, struct dict *dict, long long timeout)
rconn_run_wait(rconn);
rconn_recv_wait(rconn);
rconn_run_wait(rconn);
rconn_recv_wait(rconn);
- poll_timer_wait
(timeout - time_msec()
);
+ poll_timer_wait
_until(timeout
);
poll_block();
}
}
poll_block();
}
}
@@
-996,7
+996,7
@@
initialize_terminal(void)
}
static void
}
static void
-restore_terminal(void *aux UNUSED)
+restore_terminal(void *aux
OVS_
UNUSED)
{
endwin();
}
{
endwin();
}
@@
-1105,6
+1105,7
@@
do_show_data_rates(void *rates_)
}
if (!rates->xid) {
struct ofp_stats_request *rq;
}
if (!rates->xid) {
struct ofp_stats_request *rq;
+ struct ofp_port_stats_request *psr;
struct ofpbuf *b;
rates->xid = random_uint32();
struct ofpbuf *b;
rates->xid = random_uint32();
@@
-1112,6
+1113,10
@@
do_show_data_rates(void *rates_)
rates->xid, &b);
rq->type = htons(OFPST_PORT);
rq->flags = htons(0);
rates->xid, &b);
rq->type = htons(OFPST_PORT);
rq->flags = htons(0);
+ psr = ofpbuf_put_uninit(b, sizeof *psr);
+ memset(psr, 0, sizeof *psr);
+ psr->port_no = htons(OFPP_NONE);
+ update_openflow_length(b);
rconn_send_with_limit(rates->rconn, b, counter, 10);
}
rconn_send_with_limit(rates->rconn, b, counter, 10);
}
@@
-1445,7
+1450,7
@@
init_reboot_notifier(void)
}
static void
}
static void
-sigusr1_handler(int signr UNUSED)
+sigusr1_handler(int signr
OVS_
UNUSED)
{
sigusr1_triggered = true;
}
{
sigusr1_triggered = true;
}
@@
-1709,7
+1714,7
@@
menu_show(const struct menu *menu, int start, bool select)
refresh();
if (pos < min || pos > max) {
refresh();
if (pos < min || pos > max) {
- poll_timer_wait
(adjust - time_msec()
);
+ poll_timer_wait
_until(adjust
);
}
poll_fd_wait(STDIN_FILENO, POLLIN);
poll_block();
}
poll_fd_wait(STDIN_FILENO, POLLIN);
poll_block();
@@
-1875,7
+1880,7
@@
yesno(const char *title, bool def)
}
static void
}
static void
-cmd_show_version(const struct dict *dict UNUSED)
+cmd_show_version(const struct dict *dict
OVS_
UNUSED)
{
show_string(VERSION BUILDNR);
}
{
show_string(VERSION BUILDNR);
}
@@
-1896,7
+1901,7
@@
cmd_browse_status(const struct dict *dict)
}
static void
}
static void
-cmd_shell(const struct dict *dict UNUSED)
+cmd_shell(const struct dict *dict
OVS_
UNUSED)
{
const char *home;
{
const char *home;
@@
-1920,7
+1925,7
@@
cmd_shell(const struct dict *dict UNUSED)
}
static void
}
static void
-cmd_show_motto(const struct dict *dict UNUSED)
+cmd_show_motto(const struct dict *dict
OVS_
UNUSED)
{
show_string("\"Just Add Ice\"");
}
{
show_string("\"Just Add Ice\"");
}
@@
-1941,7
+1946,7
@@
static void
block_until(long long timeout)
{
while (timeout > time_msec()) {
block_until(long long timeout)
{
while (timeout > time_msec()) {
- poll_timer_wait
(timeout - time_msec()
);
+ poll_timer_wait
_until(timeout
);
poll_block();
}
drain_keyboard_buffer();
poll_block();
}
drain_keyboard_buffer();
@@
-2548,7
+2553,7
@@
disconnected_string(int value)
}
static void
}
static void
-cmd_configure(const struct dict *dict UNUSED)
+cmd_configure(const struct dict *dict
OVS_
UNUSED)
{
bool debug_mode = dict_get_bool(dict, "debug", false);
struct dict config_dict;
{
bool debug_mode = dict_get_bool(dict, "debug", false);
struct dict config_dict;
@@
-2890,7
+2895,7
@@
cmd_configure(const struct dict *dict UNUSED)
}
static void
}
static void
-cmd_set_up_pki(const struct dict *dict UNUSED)
+cmd_set_up_pki(const struct dict *dict
OVS_
UNUSED)
{
static const char def_privkey_file[]
= "/etc/openflow-switch/of0-privkey.pem";
{
static const char def_privkey_file[]
= "/etc/openflow-switch/of0-privkey.pem";