/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#endif
VLOG_DEFINE_THIS_MODULE(unixctl);
+
+COVERAGE_DEFINE(unixctl_received);
+COVERAGE_DEFINE(unixctl_replied);
\f
struct unixctl_command {
unixctl_cb_func *cb;
ds_destroy(&ds);
}
+static void
+unixctl_version(struct unixctl_conn *conn, const char *args OVS_UNUSED,
+ void *aux OVS_UNUSED)
+{
+ unixctl_command_reply(conn, 200, get_program_version());
+}
+
void
unixctl_command_register(const char *name, unixctl_cb_func *cb, void *aux)
{
}
unixctl_command_register("help", unixctl_help, NULL);
+ unixctl_command_register("version", unixctl_version, NULL);
server = xmalloc(sizeof *server);
list_init(&server->conns);
if (error) {
VLOG_WARN("error reading reply from %s: %s",
client->connect_path,
- (error == EOF ? "unexpected end of file"
- : strerror(error)));
+ ovs_retval_to_string(error));
goto error;
}