+// SPDX-License-Identifier: GPL-2.0-or-later
/* OSPFv2 SNMP support
* Copyright (C) 2005 6WIND <alain.ritoux@6wind.com>
* Copyright (C) 2000 IP Infusion Inc.
*
* Written by Kunihiro Ishiguro <kunihiro@zebra.org>
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra 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, or (at your option) any
- * later version.
- *
- * GNU Zebra 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
*/
#include <zebra.h>
#include "ospfd/ospf_route.h"
#include "ospfd/ospf_zebra.h"
+DEFINE_MTYPE_STATIC(OSPFD, SNMP, "OSPF SNMP");
+
/* OSPF2-MIB. */
#define OSPF2MIB 1,3,6,1,2,1,14
oid2in_addr(offset, IN_ADDR_SIZE, range_net);
p.prefix = *range_net;
- return ospf_area_range_lookup(area, &p);
+ return ospf_area_range_lookup(area, area->ranges, &p);
} else {
/* Set OID offset for Area ID. */
offset = name + v->namelen;
static struct ospf_snmp_if *ospf_snmp_if_new(void)
{
- return XCALLOC(MTYPE_TMP, sizeof(struct ospf_snmp_if));
+ return XCALLOC(MTYPE_SNMP, sizeof(struct ospf_snmp_if));
}
static void ospf_snmp_if_free(struct ospf_snmp_if *osif)
{
- XFREE(MTYPE_TMP, osif);
+ XFREE(MTYPE_SNMP, osif);
}
static int ospf_snmp_if_delete(struct interface *ifp)
}
/* Register OSPF2-MIB. */
-static int ospf_snmp_init(struct thread_master *tm)
+static int ospf_snmp_init(struct event_loop *tm)
{
ospf_snmp_iflist = list_new();
ospf_snmp_vl_table = route_table_init();