Re: kernel-2.6: ipsec without devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 05 Aug 2004 07:35:09 -0500, Les Mikesell <les@xxxxxxxxxxxxxxxx> wrote:
> A more fundamental question: does anyone know why Linux uses
> pseudo devices for networking instead of having real names
> in /dev with associated permissions and inodes connected
> to drivers by major/minor numbers?  It seems odd not to
> be able to control access to /dev/tcp by group permisions
> like you can every other device.

Because network devices aren't easily manipulated using the standard
UNIX "everything is a file" methodology. They are packet-oriented, as
opposed to character- or block-oriented and as such, the normal
read()/write()/close()/etc suite of system calls doesn't make sense
for network devices (therefore, there's no reason to have a /dev file
for them). Also, network devices push packets towards the kernel
asynchronously (as far as the kernel's concerned, anyway);
chrdev/blkdev devices do so in response to some kind of request. No
UNIX(-alike) that I know of has /dev files that correspond to network
devices.

-- 
[ Tobias DiPasquale ]
0x636f6465736c696e67657240676d61696c2e636f6d


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux