[Linux-disciples] Recognizing a new NIC

Stephen R Laniel steve at laniels.org
Wed Jan 26 10:19:29 EST 2005


On Wed, Jan 26, 2005 at 10:11:27AM -0500, Adam Rosi-Kessel wrote:
> Clearly this is a simplification, because in either case there has to be 
> some sort of processing, but maybe that's helpful as a start.

Yeah, the "there has to be some sort of processing" bit is
what gets me. My equally handwavy understanding is that the
files in /dev *all* go through some sort of processing. The
meaning of "write 10 bits to this file" varies depending
upon whether the file is /dev/lp0 or /dev/hda1 -- and
likewise varies depending upon whether /dev/hda1 is
formatted for ext3 or NTFS.

My understanding is that /dev are all APIs. They all
interpret the meaning of basic operations like 'write',
'read', and so forth.

Relatedly, I read about /dev/tcp in [1]. I think this is
cool:

"When executing a command on a /dev/tcp/$host/$port
pseudo-device file, Bash opens a TCP connection to the
associated socket. [4]

Getting the time from from nist.gov:

bash$ cat </dev/tcp/time.nist.gov/13
53082 04-03-18 04:26:54 68 0 0 502.3 UTC(NIST) *

Downloading a URL:

bash$ exec 5<>/dev/tcp/www.slashdot.org/80
bash$ echo "GET / HTTP/1.0 > " >&5"
bash$ cat <&5"

That's insanely cool. But I can't get it to work. I followed
the mknod instructions (mknod /dev/tcp c 30 36) to no avail.
Any ideas?

[1] - http://shorl.com/gymastybrulosto

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050126/27628f25/attachment.pgp


More information about the Linux-disciples mailing list