Annotation of embedaddon/quagga/zebra/kernel_null.c, revision 1.1.1.3

1.1       misho       1: /* NULL kernel methods for testing. */
                      2: 
1.1.1.3 ! misho       3: /* 
        !             4:  * Copyright (C) 2006 Sun Microsystems, Inc.
        !             5:  *
        !             6:  * This file is part of Quagga.
        !             7:  *
        !             8:  * Quagga is free software; you can redistribute it and/or modify it
        !             9:  * under the terms of the GNU General Public License as published by the
        !            10:  * Free Software Foundation; either version 2, or (at your option) any
        !            11:  * later version.
        !            12:  *
        !            13:  * Quagga is distributed in the hope that it will be useful, but
        !            14:  * WITHOUT ANY WARRANTY; without even the implied warranty of
        !            15:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        !            16:  * General Public License for more details.
        !            17:  *
        !            18:  * You should have received a copy of the GNU General Public License
        !            19:  * along with Quagga; see the file COPYING.  If not, write to the Free
        !            20:  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
        !            21:  * 02111-1307, USA.  
        !            22:  */
        !            23: 
1.1       misho      24: #include <zebra.h>
                     25: #include <log.h>
                     26: 
                     27: #include "zebra/zserv.h"
                     28: #include "zebra/rt.h"
                     29: #include "zebra/redistribute.h"
                     30: #include "zebra/connected.h"
1.1.1.3 ! misho      31: #include "zebra/rib.h"
1.1       misho      32: 
1.1.1.3 ! misho      33: int kernel_route_rib (struct prefix *a, struct rib *old, struct rib *new) { return 0; }
1.1       misho      34: 
                     35: int kernel_add_route (struct prefix_ipv4 *a, struct in_addr *b, int c, int d)
                     36: { return 0; }
                     37: 
                     38: int kernel_address_add_ipv4 (struct interface *a, struct connected *b)
                     39: {
                     40:   zlog_debug ("%s", __func__);
                     41:   SET_FLAG (b->conf, ZEBRA_IFC_REAL);
                     42:   connected_add_ipv4 (a, 0, &b->address->u.prefix4, b->address->prefixlen, 
                     43:                       (b->destination ? &b->destination->u.prefix4 : NULL), 
                     44:                       NULL);
                     45:   return 0;
                     46: }
                     47: 
                     48: int kernel_address_delete_ipv4 (struct interface *a, struct connected *b)
                     49: {
                     50:   zlog_debug ("%s", __func__);
                     51:   connected_delete_ipv4 (a, 0, &b->address->u.prefix4, b->address->prefixlen, 
                     52:                          (b->destination ? &b->destination->u.prefix4 : NULL));
                     53:   return 0;
                     54: }
                     55: 
1.1.1.3 ! misho      56: void kernel_init (struct zebra_vrf *zvrf) { return; }
        !            57: void kernel_terminate (struct zebra_vrf *zvrf) { return; }
1.1.1.2   misho      58: #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
1.1       misho      59: #pragma weak route_read = kernel_init
1.1.1.2   misho      60: #else
1.1.1.3 ! misho      61: void route_read (struct zebra_vrf *zvrf) { return; }
1.1.1.2   misho      62: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>