back to topotato report
topotato coverage report
Current view: top level - lib - agg_table.c (source / functions) Hit Total Coverage
Test: test_pim_crp.py::PIMCandidateBSRTest Lines: 0 14 0.0 %
Date: 2023-02-16 02:09:37 Functions: 0 3 0.0 %

          Line data    Source code
       1             : /*
       2             :  * Aggregate Route
       3             :  * Copyright (C) 2018 Cumulus Networks, Inc.
       4             :  *               Donald Sharp
       5             :  *
       6             :  * FRR is free software; you can redistribute it and/or modify it
       7             :  * under the terms of the GNU General Public License as published by the
       8             :  * Free Software Foundation; either version 2, or (at your option) any
       9             :  * later version.
      10             :  *
      11             :  * FRR is distributed in the hope that it will be useful, but
      12             :  * WITHOUT ANY WARRANTY; without even the implied warranty of
      13             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      14             :  * General Public License for more details.
      15             :  *
      16             :  * You should have received a copy of the GNU General Public License along
      17             :  * with this program; see the file COPYING; if not, write to the Free Software
      18             :  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
      19             :  */
      20             : #include "zebra.h"
      21             : 
      22             : #include "agg_table.h"
      23             : 
      24             : 
      25           0 : static struct route_node *agg_node_create(route_table_delegate_t *delegate,
      26             :                                           struct route_table *table)
      27             : {
      28           0 :         struct agg_node *node;
      29             : 
      30           0 :         node = XCALLOC(MTYPE_TMP, sizeof(struct agg_node));
      31             : 
      32           0 :         return agg_node_to_rnode(node);
      33             : }
      34             : 
      35           0 : static void agg_node_destroy(route_table_delegate_t *delegate,
      36             :                              struct route_table *table, struct route_node *node)
      37             : 
      38             : {
      39           0 :         struct agg_node *anode = agg_node_from_rnode(node);
      40             : 
      41           0 :         XFREE(MTYPE_TMP, anode);
      42           0 : }
      43             : 
      44             : static route_table_delegate_t agg_table_delegate = {
      45             :         .create_node = agg_node_create,
      46             :         .destroy_node = agg_node_destroy,
      47             : };
      48             : 
      49           0 : struct agg_table *agg_table_init(void)
      50             : {
      51           0 :         struct agg_table *at;
      52             : 
      53           0 :         at = XCALLOC(MTYPE_TMP, sizeof(struct agg_table));
      54             : 
      55           0 :         at->route_table = route_table_init_with_delegate(&agg_table_delegate);
      56           0 :         route_table_set_info(at->route_table, at);
      57             : 
      58           0 :         return at;
      59             : }

Generated by: LCOV version v1.16-topotato