vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / drivers / network / usb_davicom / Settings.h
blobcfeec093f076f28aa2db1c7612529ac0bd3beb7d
1 /*
2 * Davicom DM9601 USB 1.1 Ethernet Driver.
3 * Copyright (c) 2008, 2011 Siarzhuk Zharski <imker@gmx.li>
4 * Distributed under the terms of the MIT license.
5 */
6 #ifndef _USB_DAVICOM_SETTINGS_H_
7 #define _USB_DAVICOM_SETTINGS_H_
10 void load_settings();
11 void release_settings();
12 void usb_davicom_trace(bool force, const char *func, const char *fmt, ...);
15 #define TRACE(x...) usb_davicom_trace(false, __func__, x)
16 #define TRACE_ALWAYS(x...) usb_davicom_trace(true, __func__, x)
19 #ifdef UDAV_TRACE
21 extern bool gTraceState;
22 extern bool gTraceRX;
23 extern bool gTraceTX;
24 extern bool gTraceStats;
25 #define TRACE_STATE(x...) usb_davicom_trace(gTraceState, NULL, x)
26 #define TRACE_STATS(x...) usb_davicom_trace(gTraceStats, NULL, x)
27 #define TRACE_RX(x...) usb_davicom_trace(gTraceRX, NULL, x)
28 #define TRACE_TX(x...) usb_davicom_trace(gTraceTX, NULL, x)
30 #else
32 #define TRACE_STATE(x...)
33 #define TRACE_STATS(x...)
34 #define TRACE_RX(x...)
35 #define TRACE_TX(x...)
37 #endif
40 #endif // _USB_DAVICOM_SETTINGS_H_