]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/kernel_null.c
1 /* NULL kernel methods for testing. */
4 * Copyright (C) 2006 Sun Microsystems, Inc.
6 * This file is part of Quagga.
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
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.
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
27 #include "zebra/zserv.h"
29 #include "zebra/redistribute.h"
30 #include "zebra/connected.h"
31 #include "zebra/rt_netlink.h"
32 #include "zebra/rib.h"
34 int kernel_add_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
35 int kernel_update_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
36 int kernel_delete_ipv4 (struct prefix
*a
, struct rib
*b
) { return 0; }
38 int kernel_add_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
39 int kernel_update_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
40 int kernel_delete_ipv6 (struct prefix
*a
, struct rib
*b
) { return 0; }
42 int kernel_add_route (struct prefix_ipv4
*a
, struct in_addr
*b
, int c
, int d
)
45 int kernel_address_add_ipv4 (struct interface
*a
, struct connected
*b
)
47 zlog_debug ("%s", __func__
);
48 SET_FLAG (b
->conf
, ZEBRA_IFC_REAL
);
49 connected_add_ipv4 (a
, 0, &b
->address
->u
.prefix4
, b
->address
->prefixlen
,
50 (b
->destination
? &b
->destination
->u
.prefix4
: NULL
),
55 int kernel_address_delete_ipv4 (struct interface
*a
, struct connected
*b
)
57 zlog_debug ("%s", __func__
);
58 connected_delete_ipv4 (a
, 0, &b
->address
->u
.prefix4
, b
->address
->prefixlen
,
59 (b
->destination
? &b
->destination
->u
.prefix4
: NULL
));
63 int kernel_neigh_update (int a
, int b
, uint32_t c
, char *d
, int e
)
68 void kernel_init (struct zebra_ns
*zns
) { return; }
69 void kernel_terminate (struct zebra_ns
*zns
) { return; }
70 void route_read (struct zebra_ns
*zns
) { return; }