" mod-flows SWITCH FLOW modify actions of matching FLOWs\n"
" del-flows SWITCH [FLOW] delete matching FLOWs\n"
" replace-flows SWITCH FILE replace flows with those in FILE\n"
- " monitor SWITCH [MISSLEN] print packets received from SWITCH\n"
+ " diff-flows SOURCE1 SOURCE2 compare flows from two sources\n"
+ " monitor SWITCH [MISSLEN] [invalid_ttl]\n"
+ " print packets received from SWITCH\n"
+ " snoop SWITCH snoop on SWITCH and its controller\n"
"\nFor OpenFlow switches and controllers:\n"
" probe TARGET probe whether TARGET is up\n"
" ping TARGET [N] latency of N-byte echos\n"
config = reply->data;
*config_ = *config;
+
+ ofpbuf_delete(reply);
}
static void
{
struct unixctl_server *server;
bool exiting = false;
- int error, fd;
-
- /* Daemonization will close stderr but we really want to keep it, so make a
- * copy. */
- fd = dup(STDERR_FILENO);
+ int error;
+ daemon_save_fd(STDERR_FILENO);
daemonize_start();
error = unixctl_server_create(NULL, &server);
if (error) {
unixctl_command_register("exit", "", 0, 0, ofctl_exit, &exiting);
daemonize_complete();
- /* Now get stderr back. */
- dup2(fd, STDERR_FILENO);
-
for (;;) {
struct ofpbuf *b;
int retval;
unixctl_server_wait(server);
poll_block();
}
+ vconn_close(vconn);
+ unixctl_server_destroy(server);
}
static void