]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/zebra_fpm_private.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Private header file for the zebra FPM module.
5 * Copyright (C) 2012 by Open Source Routing.
6 * Copyright (C) 2012 by Internet Systems Consortium, Inc. ("ISC")
9 #ifndef _ZEBRA_FPM_PRIVATE_H
10 #define _ZEBRA_FPM_PRIVATE_H
12 #include "zebra/debug.h"
18 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
20 #define zfpm_debug(...) \
22 if (IS_ZEBRA_DEBUG_FPM) \
23 zlog_debug("FPM: " __VA_ARGS__); \
26 #elif defined __GNUC__
28 #define zfpm_debug(_args...) \
30 if (IS_ZEBRA_DEBUG_FPM) \
31 zlog_debug("FPM: " _args); \
35 static inline void zfpm_debug(const char *format
, ...)
41 /* This structure contains the MAC addresses enqueued for FPM processing. */
42 struct fpm_mac_info_t
{
43 struct ethaddr macaddr
;
44 uint32_t zebra_flags
; /* Could be used to build FPM messages */
47 ifindex_t svi_if
; /* L2 or L3 Bridge interface */
48 struct in_addr r_vtep_ip
; /* Remote VTEP IP */
50 /* Linkage to put MAC on the FPM processing queue. */
51 TAILQ_ENTRY(fpm_mac_info_t
) fpm_mac_q_entries
;
55 #define ZEBRA_MAC_UPDATE_FPM 0x1 /* This flag indicates if we want to upadte
56 * data plane for this MAC. If a MAC is added
57 * and then deleted immediately, we do not want
58 * to update data plane for such operation.
59 * Unset the ZEBRA_MAC_UPDATE_FPM flag in this
60 * case. FPM thread while processing the queue
61 * node will check this flag and dequeue the
62 * node silently without sending any update to
65 #define ZEBRA_MAC_DELETE_FPM 0x2 /* This flag is set if it is a delete operation
73 extern int zfpm_netlink_encode_route(int cmd
, rib_dest_t
*dest
,
74 struct route_entry
*re
, char *in_buf
,
77 extern int zfpm_protobuf_encode_route(rib_dest_t
*dest
, struct route_entry
*re
,
78 uint8_t *in_buf
, size_t in_buf_len
);
80 extern int zfpm_netlink_encode_mac(struct fpm_mac_info_t
*mac
, char *in_buf
,
83 extern struct route_entry
*zfpm_route_for_update(rib_dest_t
*dest
);
85 extern union g_addr ipv4ll_gateway
;
91 #endif /* _ZEBRA_FPM_PRIVATE_H */