]> git.proxmox.com Git - mirror_frr.git/blob - pathd/path_debug.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / pathd / path_debug.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2020 NetDEF, Inc.
4 */
5
6 #ifndef _PATH_DEBUG_H_
7 #define _PATH_DEBUG_H_
8
9 #include "pathd/pathd.h"
10
11 #ifdef __GNUC__
12 #define THREAD_DATA __thread
13 #else
14 #define THREAD_DATA
15 #endif
16
17 #define DEBUG_IDENT_SIZE 4
18 #define DEBUG_BUFF_SIZE 4096
19 #define TUP(A, B) ((((uint32_t)(A)) << 16) | ((uint32_t)(B)))
20 #define PATHD_FORMAT_INIT() _debug_buff[0] = 0
21 #define PATHD_FORMAT(fmt, ...) \
22 csnprintfrr(_debug_buff, DEBUG_BUFF_SIZE, fmt, ##__VA_ARGS__)
23 #define PATHD_FORMAT_FINI() _debug_buff
24
25 extern THREAD_DATA char _debug_buff[DEBUG_BUFF_SIZE];
26
27 const char *srte_protocol_origin_name(enum srte_protocol_origin origin);
28 const char *srte_candidate_type_name(enum srte_candidate_type type);
29 const char *objfun_type_name(enum objfun_type type);
30
31 #endif // _PATH_DEBUG_H_