Hacker News new | past | comments | ask | show | jobs | submit login

> a special creature, traditionally named something like eth0, and it doesn't appear in a filesystem.

/dev/eth0 ?




If you have one that corresponds to each of the network devices that show up in ip, that is unusual in my ~15y of Linux experience. The other half of the argument above is that even when such devices exist there is a lot of configuration for the device that uses ioctl to put it in the correct mode. Very little of the code treats that device as something to read from or write to.


   $ ip addr show eth0
   2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
      link/ether 00:15:5d:23:d8:89 brd ff:ff:ff:ff:ff:ff
      inet 172.27.50.201/20 brd 172.27.63.255 scope global eth0
         valid_lft forever preferred_lft forever
      inet6 fe80::215:5dff:fe23:d889/64 scope link
         valid_lft forever preferred_lft forever
   $ ls /dev/eth0
   ls: cannot access '/dev/eth0': No such file or directory
And besides, what would it even mean for eth0 to "be" a file? What happens when you try to read it, what happens when you write to it?


In Inferno (and Plan 9) it appears that network devices are filesystems -- e.g. there's a /net/ether0 directory which contains files with access semantics corresponding to various configuration and throughput tasks. I've read that it's even possible to 'mount' a remote network device on top of a local one, effectively tunneling traffic through the remote system. It's an interesting concept but I'm not sure of its utility, having never really used it.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: