*BSD News Article 63573


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.nla.gov.au!act.news.telstra.net!psgrain!usenet.eel.ufl.edu!tank.news.pipex.net!pipex!swrinde!pirates.cs.swt.edu!news.swt.edu!raptor.business.swt.edu!dmarcoux
From: dmarcoux@raptor.business.swt.edu (David Marcoux)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: IPFW / Kernel Hacking?
Date: 11 Mar 1996 04:02:18 GMT
Organization: Southwest Texas State University
Lines: 29
Message-ID: <4i08ka$75j@central.server.swt.edu>
NNTP-Posting-Host: raptor.business.swt.edu
X-Newsreader: TIN [version 1.2 PL2]


HI,

I would like to utilize IPFW with the logging features.  However,
this feature has a nasty side effect.  Logging occurs in the log files
and also on the console.  I don't want messages on the console.

The source code for the IPFW_VERBOSE section has printf() statements.
  
The comments above the section of printf()s says that the code is poor. 
I agree.  It is.

I would like to have those printf() statements converted to fprintf()
statements.  That way the messages would goto a file (which is where I
want them).  

I have never messed with kernel source.  What pitfalls should I lookout
for if I decide to hack the source?  I will basically just convert a 
bunch of printf()s into fprintf()s and of course open and close a file 
pointer.  

I am afraid of producing unsavory, unstable code.  Ideas?  TIA.
   

-----------------------------------------------------------------------
David Marcoux                                
dmarcoux@raptor.business.swt.edu            
http://raptor.business.swt.edu/hammers    
-----------------------------------------------------------------------