Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 1998 19:32:55 +0100 (CET)
From:      Benjamin Gras <ben@nl.euro.net>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   FS interface to sockets?
Message-ID:  <199801071832.TAA04945@support.euronet.nl>

next in thread | raw e-mail | index | archive | help
Greetings guys,

to decide whether or not I should finish off a little util I've been
working on, I'd like to ask the following quick question:

 * Is there currently an interface to sockets other than the socket(2) call?

background:
In particular, I'd like higher access granularity to the raw (AF_INET) IP
sockets, having the twofold advantage of network utilities like ping(8) 
and traceroute(8) not needing to run suid-root (along with other, new,
potentially untrusted software), and secondly providing distinction between
e.g. raw ip and icmp sockets.

I'm thinking in terms of providing access to raw sockets, subject to
access restrictions of a node in /dev per protocol (so you'd have /dev/ip_raw,
/dev/ip_icmp, /dev/ip_udp, and so on). The minor device number would be
the direct protocol number. This exists on (God keep us) Solaris.

Now I've searched around for a similar interface under FreeBSD, but apart
from a few short comments on this list about the naming of nodes with the
new devfs (/dev/net/*), I've found nothing (FAQ, handbook, mailling lists,
LINT config, kernel sources, ..).. The context on this list seemed to be one
of an obsolete system, is this the case?

Now I've written a kernel module that does what I want (be a device
driver for socket(AF_INET, SOCK_RAW, %d)), and it seems to
work nicely. Should I finish it up, apply for a major device number and
publish it? Or has it already been done?

Info welcome.

	=Ben





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801071832.TAA04945>