Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165241507
D29399.id86212.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
742 B
Referenced Files
None
Subscribers
None
D29399.id86212.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/net.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/net.h
+++ sys/compat/linuxkpi/common/include/linux/net.h
@@ -38,6 +38,7 @@
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/errno.h>
+#include <sys/time.h>
static inline int
sock_create_kern(int family, int type, int proto, struct socket **res)
@@ -76,4 +77,16 @@
soclose(so);
}
+static struct timeval lkpi_net_lastlog;
+static int lkpi_net_curpps;
+static int lkpi_net_maxpps = 99;
+
+static inline int
+net_ratelimit(void)
+{
+
+ return (ppsratecheck(&lkpi_net_lastlog, &lkpi_net_curpps,
+ lkpi_net_maxpps));
+}
+
#endif /* _LINUX_NET_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 8, 2:44 AM (16 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36206990
Default Alt Text
D29399.id86212.diff (742 B)
Attached To
Mode
D29399: LinuxKPI: add net_ratelimit()
Attached
Detach File
Event Timeline
Log In to Comment