Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156543489
D56155.id174520.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56155.id174520.diff
View Options
diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c
--- a/sys/netinet/siftr.c
+++ b/sys/netinet/siftr.c
@@ -119,30 +119,31 @@
#define MODVERSION_STR __XSTRING(V_MAJOR) "." __XSTRING(V_BACKBREAK) "." \
__XSTRING(V_BACKCOMPAT)
-#define HOOK 0
-#define UNHOOK 1
-#define SIFTR_EXPECTED_MAX_TCP_FLOWS 65536
#define SYS_NAME "FreeBSD"
-#define PACKET_TAG_SIFTR 100
-#define PACKET_COOKIE_SIFTR 21749576
-#define SIFTR_LOG_FILE_MODE 0644
-#define SIFTR_DISABLE 0
-#define SIFTR_ENABLE 1
-
-/*
- * Hard upper limit on the length of log messages. Bump this up if you add new
- * data fields such that the line length could exceed the below value.
- */
-#define MAX_LOG_MSG_LEN 300
-#define MAX_LOG_BATCH_SIZE 3
-/* XXX: Make this a sysctl tunable. */
-#define SIFTR_ALQ_BUFLEN (1000*MAX_LOG_MSG_LEN)
+enum {
+ HOOK = 0,
+ UNHOOK = 1,
+ SIFTR_DISABLE = 0,
+ SIFTR_ENABLE = 1,
+ PACKET_TAG_SIFTR = 100,
+ SIFTR_LOG_FILE_MODE = 0644,
+ PACKET_COOKIE_SIFTR = 21749576,
+ SIFTR_EXPECTED_MAX_TCP_FLOWS = 65536,
+ /*
+ * Hard upper limit on the length of log messages. Bump this up if you
+ * add new data fields such that the line length could exceed the
+ * below value.
+ */
+ MAX_LOG_MSG_LEN = 300,
+ MAX_LOG_BATCH_SIZE = 3,
+ SIFTR_ALQ_BUFLEN = 1000 * MAX_LOG_MSG_LEN,
#ifdef SIFTR_IPV6
-#define SIFTR_IPMODE 6
+ SIFTR_IPMODE = 6,
#else
-#define SIFTR_IPMODE 4
+ SIFTR_IPMODE = 4,
#endif
+};
static MALLOC_DEFINE(M_SIFTR, "siftr", "dynamic memory used by SIFTR");
static MALLOC_DEFINE(M_SIFTR_PKTNODE, "siftr_pktnode",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 15, 1:36 PM (1 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30629997
Default Alt Text
D56155.id174520.diff (1 KB)
Attached To
Mode
D56155: siftr: replace macro constants with debug friendly enums
Attached
Detach File
Event Timeline
Log In to Comment