linux/compat/include/linux/lockdep.h \
linux/compat/include/linux/log2.h \
linux/compat/include/linux/mutex.h \
+ linux/compat/include/linux/net.h \
linux/compat/include/linux/netdevice.h \
linux/compat/include/linux/netfilter_bridge.h \
linux/compat/include/linux/netfilter_ipv4.h \
--- /dev/null
+#ifndef __LINUX_NET_WRAPPER_H
+#define __LINUX_NET_WRAPPER_H 1
+
+#include_next <linux/net.h>
+
+#ifndef net_ratelimited_function
+#define net_ratelimited_function(function, ...) \
+do { \
+ if (net_ratelimit()) \
+ function(__VA_ARGS__); \
+} while (0)
+
+#define net_emerg_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_emerg, fmt, ##__VA_ARGS__)
+#define net_alert_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_alert, fmt, ##__VA_ARGS__)
+#define net_crit_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_crit, fmt, ##__VA_ARGS__)
+#define net_err_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_err, fmt, ##__VA_ARGS__)
+#define net_notice_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_notice, fmt, ##__VA_ARGS__)
+#define net_warn_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__)
+#define net_info_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
+#define net_dbg_ratelimited(fmt, ...) \
+ net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)
+#endif
+
+#endif