Various things on log_net package

Rene Wittmann Rene.B.Wittmann at
Thu Apr 7 11:22:26 CEST 2005


While trying to get the log server working for logging to network, I
found some problems/bugs...
And here is my report:

	l.96 : in #define INITDRV(drv)
		the called function can give an error, but this error is
		just ignored (fct. init_ethernet always returns 0)

	l.264: (closing etherdev on error)
		if you select a wrong driver in init_ethernet, the
		system boot will fail with strange output over and over
		again (maybe just logging to normal console and go on
		booting is more desired??)

	l.45: initializing buffer for net output
		if the buffer size is not given explicitly as command
		line switch the later buffer size is 0(!! not 4096 as
		expected). Therefore the logging to the network will not
		In order to prevent this you should put some lines right
		after parsing command line parameters in main(), e.g.:
		// if flushing to net && no buffer_size specified, use an initial value
		if (flush_to_net && !buffer_size){                                    
			buffer_size = 4096;                      

		(or you should document it somewhere)

BTW: to use the correct driver in init_ethernet for vmware, you should
use "vlance" as network setting in vmware and "INITDRV(lance)" in
init_ethernet, the drivers for 3com cards are not called 3c??? as I
expected but can be used with "INITDRV(etherlink<??>)" with
<??>="","2","3","16","plus" or "INITDRV(vortex)".
In my opinion this should be documented somewhere. 
(in case it is already, and I was just too stupid to find it, ignore
this remark...)

Problem when using the logging to network within a program that uses the
parse_cmd library
	I can't explain why this is the case, but when you use the log
	server compiled for network output and afterwards start an
	application that uses "parse_cmdline" the logging will not go to
	network, but to local console (even if you specify "-nolocal" on
	the log server). If you're interested in this bug, I can send
	you my sample code which is just a modification of rt_sched
	example in the hello-package


More information about the l4-hackers mailing list