[Cs22800] Update

Benjamin Johnson bsjohnso at midway.uchicago.edu
Sun Oct 20 23:36:56 CDT 2002


I'm having a bit of trouble trying to get tty hijacking working in
freebsd.  In other words, I am a little stumped on how to intercept
write system calls, determine that they're going to the tty (such as for
keystrokes) and then save a copy of them in some kernel buffer (or
eventually send it to a driver).

I have successfully written a driver called /dev/echo...here's a sample
of it:

razorbsd# printf "Hello cs228\n" > /dev/echo
razorbsd# cat /dev/echo
Hello cs228
razorbsd#

So you can see that once I get the module working, I can easily set up
/dev/sebek for reading from a helper application...

I actually didn't do much work on the device module, I just spent a
while browsing through sample code and what not.

The most coding I am doing is for the tty hijacking...unfortunately any
segfault or problem you would get in a user-space program results in a
machine REBOOT when working in the kernel...and then it must recheck the
disks...so I have to be careful...I'm working on setting up VMware in
FreeBSD but it is a little more complicated since it was written for
Windows & Linux only...

See ya tomorrow...
Ben





More information about the CS22800 mailing list