]> git.proxmox.com Git - mirror_frr.git/commitdiff
ripngd: use MTYPE_STATIC
authorDavid Lamparter <equinox@diac24.net>
Fri, 21 Jun 2019 06:44:11 +0000 (08:44 +0200)
committerDavid Lamparter <equinox@diac24.net>
Fri, 21 Jun 2019 06:54:26 +0000 (08:54 +0200)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
ripngd/ripng_memory.c [deleted file]
ripngd/ripng_memory.h [deleted file]
ripngd/ripng_nexthop.c
ripngd/ripng_offset.c
ripngd/ripng_peer.c
ripngd/ripng_route.c
ripngd/ripngd.c
ripngd/ripngd.h
ripngd/subdir.am

diff --git a/ripngd/ripng_memory.c b/ripngd/ripng_memory.c
deleted file mode 100644 (file)
index f459566..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* ripngd memory type definitions
- *
- * Copyright (C) 2015  David Lamparter
- *
- * This file is part of Quagga.
- *
- * Quagga 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.
- *
- * Quagga 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ripng_memory.h"
-
-DEFINE_MGROUP(RIPNGD, "ripngd")
-DEFINE_MTYPE(RIPNGD, RIPNG, "RIPng structure")
-DEFINE_MTYPE(RIPNGD, RIPNG_VRF_NAME, "RIPng VRF name")
-DEFINE_MTYPE(RIPNGD, RIPNG_ROUTE, "RIPng route info")
-DEFINE_MTYPE(RIPNGD, RIPNG_AGGREGATE, "RIPng aggregate")
-DEFINE_MTYPE(RIPNGD, RIPNG_PEER, "RIPng peer")
-DEFINE_MTYPE(RIPNGD, RIPNG_OFFSET_LIST, "RIPng offset lst")
-DEFINE_MTYPE(RIPNGD, RIPNG_RTE_DATA, "RIPng rte data")
diff --git a/ripngd/ripng_memory.h b/ripngd/ripng_memory.h
deleted file mode 100644 (file)
index 3dfc57b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ripngd memory type declarations
- *
- * Copyright (C) 2015  David Lamparter
- *
- * This file is part of Quagga.
- *
- * Quagga 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.
- *
- * Quagga 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 _QUAGGA_RIPNG_MEMORY_H
-#define _QUAGGA_RIPNG_MEMORY_H
-
-#include "memory.h"
-
-DECLARE_MGROUP(RIPNGD)
-DECLARE_MTYPE(RIPNG)
-DECLARE_MTYPE(RIPNG_VRF_NAME)
-DECLARE_MTYPE(RIPNG_ROUTE)
-DECLARE_MTYPE(RIPNG_AGGREGATE)
-DECLARE_MTYPE(RIPNG_PEER)
-DECLARE_MTYPE(RIPNG_OFFSET_LIST)
-DECLARE_MTYPE(RIPNG_RTE_DATA)
-
-#endif /* _QUAGGA_RIPNG_MEMORY_H */
index 882c2fbc8c56182ad4ad7bb3e9107b0a0320c3a0..ba6e52fdda0e7f290443d1b73efe655a54524e93 100644 (file)
@@ -39,6 +39,8 @@
 #include "ripngd/ripng_debug.h"
 #include "ripngd/ripng_nexthop.h"
 
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_RTE_DATA, "RIPng rte data")
+
 #define DEBUG 1
 
 #define min(a, b) ((a) < (b) ? (a) : (b))
index fe95ccfc2bdf18907fbf91fd6d2c10a58dbf20cc..0094c993add429f58a869e6b6d9eb920f93e9a55 100644 (file)
@@ -33,6 +33,8 @@
 
 #include "ripngd/ripngd.h"
 
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_OFFSET_LIST, "RIPng offset lst")
+
 #define OFFSET_LIST_IN_NAME(O)  ((O)->direct[RIPNG_OFFSET_LIST_IN].alist_name)
 #define OFFSET_LIST_IN_METRIC(O)  ((O)->direct[RIPNG_OFFSET_LIST_IN].metric)
 
index 5376007747cdc81c34ed6f7f673c6b8438f2d97c..109524e2129091f51c5977f07bffaadcd4be65f7 100644 (file)
@@ -34,6 +34,8 @@
 #include "ripngd/ripngd.h"
 #include "ripngd/ripng_nexthop.h"
 
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_PEER, "RIPng peer")
+
 static struct ripng_peer *ripng_peer_new(void)
 {
        return XCALLOC(MTYPE_RIPNG_PEER, sizeof(struct ripng_peer));
index 1bf1007fecd5a22bd635f17f1c5714802a27f8b4..ed9d77a3783de0f4e02b0c0c92178853d12e6e37 100644 (file)
@@ -30,6 +30,8 @@
 #include "ripngd/ripngd.h"
 #include "ripngd/ripng_route.h"
 
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_AGGREGATE, "RIPng aggregate")
+
 static struct ripng_aggregate *ripng_aggregate_new(void)
 {
        struct ripng_aggregate *new;
index 71bc43049ab039b3a565fb766718b8cb7d2cd37a..3314892e74afded39219148b8c4c4cf1823152e5 100644 (file)
 #include "ripngd/ripng_debug.h"
 #include "ripngd/ripng_nexthop.h"
 
+DEFINE_MGROUP(RIPNGD, "ripngd")
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG, "RIPng structure")
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_VRF_NAME, "RIPng VRF name")
+DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_ROUTE, "RIPng route info")
+
 enum { ripng_all_route,
        ripng_changed_route,
 };
index a2686304fcfafd5b9f1d359bbb61b09f5be79104..5a0d350a84b1108c686d8b1f1e5c0d12c2ac6f0e 100644 (file)
@@ -26,8 +26,7 @@
 #include <vty.h>
 #include <distribute.h>
 #include <vector.h>
-
-#include "ripng_memory.h"
+#include <memory.h>
 
 /* RIPng version and port number. */
 #define RIPNG_V1                         1
@@ -87,6 +86,8 @@
 #define RIPNG_INSTANCE "/frr-ripngd:ripngd/instance"
 #define RIPNG_IFACE    "/frr-interface:lib/interface/frr-ripngd:ripng"
 
+DECLARE_MGROUP(RIPNGD)
+
 /* RIPng structure. */
 struct ripng {
        RB_ENTRY(ripng) entry;
index ea0ccf14827c52698bd5adbd7a1c14343ce243c8..eac0d673139a16b2149e810e2b0c153e00425b38 100644 (file)
@@ -17,7 +17,6 @@ ripngd_libripng_a_SOURCES = \
        ripngd/ripng_cli.c \
        ripngd/ripng_debug.c \
        ripngd/ripng_interface.c \
-       ripngd/ripng_memory.c \
        ripngd/ripng_nexthop.c \
        ripngd/ripng_offset.c \
        ripngd/ripng_northbound.c \
@@ -34,7 +33,6 @@ ripngd/ripng_cli.$(OBJEXT): ripngd/ripng_cli_clippy.c
 noinst_HEADERS += \
        ripngd/ripng_cli.h \
        ripngd/ripng_debug.h \
-       ripngd/ripng_memory.h \
        ripngd/ripng_nexthop.h \
        ripngd/ripng_route.h \
        ripngd/ripngd.h \