From: Alan T. DeKok Date: Fri, 27 Dec 2024 19:48:46 +0000 (-0500) Subject: move SNMP declarations to their own header X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c3c8386a42fe7411fe4abe96457ec314cf3d043;p=thirdparty%2Ffreeradius-server.git move SNMP declarations to their own header --- diff --git a/src/bin/radiusd.c b/src/bin/radiusd.c index ee3c25be1e4..c2c6ee2c46a 100644 --- a/src/bin/radiusd.c +++ b/src/bin/radiusd.c @@ -34,6 +34,7 @@ RCSID("$Id$") #include #include #include +#include #include #include #include diff --git a/src/lib/server/snmp.c b/src/lib/server/snmp.c index 3640834e399..eda926ec56b 100644 --- a/src/lib/server/snmp.c +++ b/src/lib/server/snmp.c @@ -36,6 +36,7 @@ RCSID("$Id$") #include #include +#include #include diff --git a/src/lib/server/snmp.h b/src/lib/server/snmp.h new file mode 100644 index 00000000000..c63b4db0884 --- /dev/null +++ b/src/lib/server/snmp.h @@ -0,0 +1,38 @@ +#pragma once +/* + * 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; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @file lib/server/snmp.h + * @brief SNMP functions + * + * @copyright 2020 The FreeRADIUS server project + */ +RCSIDH(snmp_h, "$Id$") + +#ifdef __cplusplus +extern "C" { +#endif + +int fr_snmp_process(request_t *request); +int fr_snmp_init(void); +void fr_snmp_free(void); + +#ifdef __cplusplus +} +#endif diff --git a/src/lib/server/stats.h b/src/lib/server/stats.h index 6fc92b2c2f4..be287a9365a 100644 --- a/src/lib/server/stats.h +++ b/src/lib/server/stats.h @@ -71,9 +71,6 @@ void request_stats_final(request_t *request); void radius_stats_ema(fr_stats_ema_t *ema, fr_time_t start, fr_time_t end); void fr_stats_bins(fr_stats_t *stats, fr_time_t start, fr_time_t end); -int fr_snmp_process(request_t *request); -int fr_snmp_init(void); - #define FR_STATS_INC(_x, _y) radius_ ## _x ## _stats._y++;if (listener) listener->stats._y++;if (client) client->_x._y++; #define FR_STATS_TYPE_INC(_x) _x++