On Thu, 25 Mar 1999, Mark H. Wood wrote:

> > > Please! don't go suggesting that we have to run scripts in C/C++ to get
> > > this kind of information! the overhead is staggering!
> 
> Yes.  The SIOCGIFADDR ioctl() ought to translate an interface name to an 
> IP address.  See for example Stevens' _UNIX Network Programming_ V1 2/e, 
> chapter 16.

Yup, or just look at the many examples.

> (This is using the word "device" a little loosely:  there's no way to
> create a device-special-file inode to refer to a network interface.  "In
> Unix, everything looks like a file" *unless* it's a network. :-/  Old
> DECnet hackers find this amazingly convoluted, but to each his own.)

The old attitude was the filesystem was the One True Namespace.
With the advent of ubiquitous networks that had to change, thus
socket()/connect()/bind()/etc instead of open().

>From a data transfer perspective there are *three* kinds of devices:
  character mode
  block mode
  packet mode
Only the first two can be reasonably mapped into a file model.

[[ Arguably we should expand the "everything is a file" model to include
packet mode devices.  But having a model that's too general results in not
being able to actually do anything useful.. ]]

Donald Becker                                     [EMAIL PROTECTED]
USRA-CESDIS, Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center,  Greenbelt, MD.  20771
301-286-0882         http://cesdis.gsfc.nasa.gov/people/becker/whoiam.html

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to