+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Zebra API server.
* Portions:
* Copyright (C) 1997-1999 Kunihiro Ishiguro
* Copyright (C) 2015-2018 Cumulus Networks, Inc.
* et al.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _ZEBRA_ZSERV_H
* relative to last_read_time.
*/
+ pthread_mutex_t stats_mtx;
+ /* BEGIN covered by stats_mtx */
+
/* monotime of client creation */
- _Atomic uint64_t connect_time;
+ uint64_t connect_time;
/* monotime of last message received */
- _Atomic uint64_t last_read_time;
+ uint64_t last_read_time;
/* monotime of last message sent */
- _Atomic uint64_t last_write_time;
+ uint64_t last_write_time;
/* command code of last message read */
- _Atomic uint64_t last_read_cmd;
+ uint64_t last_read_cmd;
/* command code of last message written */
- _Atomic uint64_t last_write_cmd;
+ uint64_t last_write_cmd;
+
+ /* END covered by stats_mtx */
/*
* Number of instances configured with
*/
extern void zserv_close_client(struct zserv *client);
+/*
+ * Free memory for a zserv client object - note that this does not
+ * clean up the internal allocations associated with the zserv client,
+ * this just free the struct's memory.
+ */
+void zserv_client_delete(struct zserv *client);
+
/*
* Log a ZAPI message hexdump.
*