[comp.unix.wizards] Help re "system processes"

wiltzius@lll-lcc.llnl.gov (Dave P. Wiltzius) (08/13/88)

What I would like to do is write a kernel routine (i.e. a routine
that is part of the UNIX system) that will receive and subsequently
consume UDP packets destined for a certain UDP port.

The problem is that in "udp_input" the packet is appended to the
socket's receive buffer and then routine "sorwakeup" is called.
Eventually, this results in all processes waiting on this socket
channel to be awakened.  However, I want my kernel routine to
be notified instead and it will then take the data received.

What I am investigating now is the use of "system processes".
Apparently these are kernel routines that are invoked (routine
sysproc.sp_func) when an event occurs (which "wakes" them).
Looking at the Ultrix source I am getting clues as to what
is going on (are they always declared "dead" after one invokation?).

Am I heading in the right direction?  Anyone want to give me
a tutorial on "system processes", Ultrix or whatever?  Would
appreciate the help.  Please phone if you feel the topic would
be more appropriately addressed over that media.  I'll be off
to SIGCOMM next week 16-19.

Thanks much.
  Dave (wiltzius@lll-lcc.llnl.gov)
  Network Systems Division
  Lawrence Livermore Nat'l Lab

  (415) 422-1551

mb@ttidca.TTI.COM (Michael Bloom) (08/14/88)

	What I would like to do is write a kernel routine (i.e. a routine
	that is part of the UNIX system) that will receive and subsequently
	consume UDP packets destined for a certain UDP port.

	The problem is that in "udp_input" the packet is appended to the
	socket's receive buffer and then routine "sorwakeup" is called.
	Eventually, this results in all processes waiting on this socket
	channel to be awakened.  However, I want my kernel routine to
	be notified instead and it will then take the data received.

Unless you need a user context, how about comparing against the
"certain UDP port" and if the compare succeeds, post a software
interrupt in place of the sowakeup? If you're on a vax, you've still
got plenty of free software interrupt levels (three of which are
between splsoftclock and splnet).