]>
Commit | Line | Data |
---|---|---|
4d7b695d SM |
1 | /* |
2 | * Copyright (C) 2020 NetDEF, Inc. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify it | |
5 | * under the terms of the GNU General Public License as published by the Free | |
6 | * Software Foundation; either version 2 of the License, or (at your option) | |
7 | * any later version. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License along | |
15 | * with this program; see the file COPYING; if not, write to the Free Software | |
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
17 | */ | |
18 | ||
19 | #ifndef _PATH_DEBUG_H_ | |
20 | #define _PATH_DEBUG_H_ | |
21 | ||
22 | #include "pathd/pathd.h" | |
23 | ||
24 | #ifdef __GNUC__ | |
25 | #define THREAD_DATA __thread | |
26 | #else | |
27 | #define THREAD_DATA | |
28 | #endif | |
29 | ||
30 | #define DEBUG_IDENT_SIZE 4 | |
31 | #define DEBUG_BUFF_SIZE 4096 | |
32 | #define TUP(A, B) ((((uint32_t)(A)) << 16) | ((uint32_t)(B))) | |
33 | #define PATHD_FORMAT_INIT() _debug_buff[0] = 0 | |
34 | #define PATHD_FORMAT(fmt, ...) \ | |
35 | csnprintfrr(_debug_buff, DEBUG_BUFF_SIZE, fmt, ##__VA_ARGS__) | |
36 | #define PATHD_FORMAT_FINI() _debug_buff | |
37 | ||
38 | extern THREAD_DATA char _debug_buff[DEBUG_BUFF_SIZE]; | |
39 | ||
40 | const char *srte_protocol_origin_name(enum srte_protocol_origin origin); | |
41 | const char *srte_candidate_type_name(enum srte_candidate_type type); | |
42 | const char *objfun_type_name(enum objfun_type type); | |
43 | ||
44 | #endif // _PATH_DEBUG_H_ |