]> git.proxmox.com Git - mirror_frr.git/blame - zebra/zebra_fpm_private.h
*: make consistent & update GPLv2 file headers
[mirror_frr.git] / zebra / zebra_fpm_private.h
CommitLineData
5adc2528
AS
1/*
2 * Private header file for the zebra FPM module.
3 *
4 * Copyright (C) 2012 by Open Source Routing.
5 * Copyright (C) 2012 by Internet Systems Consortium, Inc. ("ISC")
6 *
7 * This file is part of GNU Zebra.
8 *
9 * GNU Zebra is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * GNU Zebra is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
896014f4
DL
19 * You should have received a copy of the GNU General Public License along
20 * with this program; see the file COPYING; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
5adc2528
AS
22 */
23
24#ifndef _ZEBRA_FPM_PRIVATE_H
25#define _ZEBRA_FPM_PRIVATE_H
26
27#include "zebra/debug.h"
28
29#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
30
31#define zfpm_debug(...) \
32 do { \
33 if (IS_ZEBRA_DEBUG_FPM) zlog_debug("FPM: " __VA_ARGS__); \
34 } while(0)
35
36#elif defined __GNUC__
37
38#define zfpm_debug(_args...) \
39 do { \
40 if (IS_ZEBRA_DEBUG_FPM) zlog_debug("FPM: " _args); \
41 } while(0)
42
43#else
44static inline void zfpm_debug(const char *format, ...) { return; }
45#endif
46
47
48/*
49 * Externs
50 */
51extern int
52zfpm_netlink_encode_route (int cmd, rib_dest_t *dest, struct rib *rib,
53 char *in_buf, size_t in_buf_len);
54
fb0aa886
AS
55extern int
56zfpm_protobuf_encode_route (rib_dest_t *dest, struct rib *rib,
57 uint8_t *in_buf, size_t in_buf_len);
58
59extern struct rib *zfpm_route_for_update (rib_dest_t *dest);
5adc2528 60#endif /* _ZEBRA_FPM_PRIVATE_H */