X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fjsonrpc-server.h;h=78ddb82dcd3b8ab397e250adc77edf19ceaa51ae;hb=05b8f1c2b47a64d1eee5d3fa4ab325b0784c5003;hp=9906e8167de4eac50d967ac45ad6460c69588369;hpb=94db54073ea372406d4d82a009301984b097bc6b;p=openvswitch diff --git a/ovsdb/jsonrpc-server.h b/ovsdb/jsonrpc-server.h index 9906e816..78ddb82d 100644 --- a/ovsdb/jsonrpc-server.h +++ b/ovsdb/jsonrpc-server.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010 Nicira Networks +/* Copyright (c) 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. @@ -16,6 +16,8 @@ #ifndef OVSDB_JSONRPC_SERVER_H #define OVSDB_JSONRPC_SERVER_H 1 +#include + struct ovsdb; struct shash; @@ -32,6 +34,24 @@ struct ovsdb_jsonrpc_options *ovsdb_jsonrpc_default_options(void); void ovsdb_jsonrpc_server_set_remotes(struct ovsdb_jsonrpc_server *, const struct shash *); +/* Status of a single remote connection. */ +struct ovsdb_jsonrpc_remote_status { + const char *state; + int last_error; + unsigned int sec_since_connect; + unsigned int sec_since_disconnect; + bool is_connected; + char *locks_held; + char *locks_waiting; + char *locks_lost; + int n_connections; +}; +bool ovsdb_jsonrpc_server_get_remote_status( + const struct ovsdb_jsonrpc_server *, const char *target, + struct ovsdb_jsonrpc_remote_status *); +void ovsdb_jsonrpc_server_free_remote_status( + struct ovsdb_jsonrpc_remote_status *); + void ovsdb_jsonrpc_server_reconnect(struct ovsdb_jsonrpc_server *); void ovsdb_jsonrpc_server_run(struct ovsdb_jsonrpc_server *);