From owner-freebsd-current Thu Jul 10 10:02:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA12055 for current-outgoing; Thu, 10 Jul 1997 10:02:54 -0700 (PDT) Received: from fredriks-1.pr.mcs.net (fredriks-1.pr.mcs.net [205.164.50.241]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA12050 for ; Thu, 10 Jul 1997 10:02:50 -0700 (PDT) Received: (from lars@localhost) by fredriks-1.pr.mcs.net (8.8.5/8.6.6) id MAA00958 for current@freebsd.org; Thu, 10 Jul 1997 12:02:48 -0500 (CDT) From: Lars Fredriksen Message-Id: <199707101702.MAA00958@fredriks-1.pr.mcs.net> Subject: patches to make MSG_BSIZE a tunable To: current@freebsd.org Date: Thu, 10 Jul 1997 12:02:47 -0500 (CDT) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, In ~lars/dmesg.diffs (it is actually a tar file of diffs, sorry about the name mangling), you can find diffs to the current tree that defines MSG_BSIZE as a tunable and osmsgbufsize a MIB variable that one can uses sysctl to get the value of. There are also patches to dmesg and syslogd to use sysctl to find the size of the log buffer. With respect to dmesg there is kind of a cludge. Since dmesg can be used to extract the log out of a core dump, I also had to put in code that would actually read the osmsgbufsize out of the kernel the old fashion way. One could argue that dmesg shouldn't mess with using sysctl just because of this. I haven't tested this otption yet to make sure it works. Now, that being said, I am happy to receive feedback on this. One thing I didn't like is that I had to define osmsgbufsize as an extern in a few kernel files. This should probably be in a header somewhere(like msgbuf.h, and it should probably have a typedef that one could use to make sure that the sizes matches. I don't think that will ever be a probelm, but it looks much cleaner that way. Hope someone has time to look at this. Lars -- ------------------------------------------------------------------- Lars Fredriksen fredriks@mcs.com (home) lars@fredriks-1.pr.mcs.net (home-home)