2 * Copyright (c) 2017 SUSE LLC.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 #ifndef included_sctp_debug_h__
16 #define included_sctp_debug_h__
18 #include <vlib/vlib.h>
20 typedef enum _sctp_dbg
22 #define _(sym, str) SCTP_DBG_##sym,
27 #define SCTP_DEBUG_STATE_MACHINE (0)
28 #if SCTP_DEBUG_STATE_MACHINE
29 #define SCTP_DBG_STATE_MACHINE(_fmt, _args...) clib_warning (_fmt, ##_args)
31 #define SCTP_DBG_STATE_MACHINE(_fmt, _args...)
34 #define SCTP_DEBUG (0)
36 #define SCTP_DBG(_fmt, _args...) clib_warning (_fmt, ##_args)
38 #define SCTP_DBG(_fmt, _args...)
41 #define SCTP_ADV_DEBUG (0)
43 #define SCTP_ADV_DBG(_fmt, _args...) clib_warning (_fmt, ##_args)
45 #define SCTP_ADV_DBG(_fmt, _args...)
48 #define SCTP_DEBUG_OUTPUT (0)
50 #define SCTP_DBG_OUTPUT(_fmt, _args...) clib_warning (_fmt, ##_args)
52 #define SCTP_DBG_OUTPUT(_fmt, _args...)
55 #define SCTP_ADV_DEBUG_OUTPUT (0)
56 #if SCTP_ADV_DEBUG_OUTPUT
57 #define SCTP_ADV_DBG_OUTPUT(_fmt, _args...) clib_warning (_fmt, ##_args)
59 #define SCTP_ADV_DBG_OUTPUT(_fmt, _args...)
62 #define SCTP_CONN_TRACKING_DEBUG (0)
63 #if SCTP_CONN_TRACKING_DEBUG
64 #define SCTP_CONN_TRACKING_DBG(_fmt, _args...) clib_warning (_fmt, ##_args)
66 #define SCTP_CONN_TRACKING_DBG(_fmt, _args...)
69 #endif /* included_sctp_debug_h__ */