From 44cfd3765f46550478a7a3aeb6dd7dc17c2d3e68 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 9 Jul 2008 18:39:55 +0000 Subject: [PATCH] Add sysctl subtree net.raw for generic raw socket infrastructure; expose default send and receive socket buffer sizes using sysctls so that they can be administered centrally. Reviewed by: bz MFC after: 3 weeks --- sys/net/raw_cb.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/net/raw_cb.c b/sys/net/raw_cb.c index ed34b5d18551..3de69036a1b2 100644 --- a/sys/net/raw_cb.c +++ b/sys/net/raw_cb.c @@ -34,11 +34,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include @@ -55,8 +57,15 @@ struct mtx rawcb_mtx; struct rawcb_list_head rawcb_list; -const static u_long raw_sendspace = RAWSNDQ; -const static u_long raw_recvspace = RAWRCVQ; +SYSCTL_NODE(_net, OID_AUTO, raw, CTLFLAG_RW, 0, "Raw socket infrastructure"); + +static u_long raw_sendspace = RAWSNDQ; +SYSCTL_ULONG(_net_raw, OID_AUTO, sendspace, CTLFLAG_RW, &raw_sendspace, 0, + "Default raw socket send space"); + +static u_long raw_recvspace = RAWRCVQ; +SYSCTL_ULONG(_net_raw, OID_AUTO, recvspace, CTLFLAG_RW, &raw_recvspace, 0, + "Default raw socket receive space"); /* * Allocate a control block and a nominal amount of buffer space for the