But surely the low level driver code has to live in kernel space in order
to make use of interrupts and not busy wait on the port? If the driver
runs in user space, even if it is run as root and niced to a high priority
it isn't going to get the snappy response that a kernel module could get?
Especially seeing as the standard parallel port doesn't come with DMA so
the processor has to be involved in every byte transfered? Whilst
effectively hanging the machine whilst a scan is in progress is OK in the
Windoze world, I don't think it sounds terribly nice for the UNIX
environment. Or is there a cunning way of doing an efficient, platform
independent, user space, low level driver that I've missed?
Tatty bye,
Jim'll
#!/usr/bin/perl -- -Whois++-client-in-6-lines-of-Perl -Beat-that-Z39.50!
use IO::Socket;sub w{$f=shift;$a{$f}=1;($h,$p,$q)=split("/",$f);$s=
IO::Socket::INET->new(PeerAddr=>"$h:$p")||return;print $s "$q\r\n";while(<$s>)
{next if(/^%/);if(/^# SERVER-TO-ASK/){while(<$s>){$x=$1 if/Name: (.*)\r\n$/;$y
=$1 if/Port: (.*)\r\n$/;$f="$x/$y/$q";@j=(@j,$f)if(/^# END/&&!$a{$f})}}else{
print}}close($s)}@j=shift;while(@j){w(pop(@j))}# whois++.pl host/port/query
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com