From owner-freebsd-hackers Wed Jan 7 10:33:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA25370 for hackers-outgoing; Wed, 7 Jan 1998 10:33:50 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from support.euronet.nl (support.euronet.nl [194.134.32.134]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA25357 for ; Wed, 7 Jan 1998 10:33:37 -0800 (PST) (envelope-from beng@euronet.nl) Received: (from beng@localhost) by support.euronet.nl (8.8.5/8.6.12) id TAA04945 for freebsd-hackers@freebsd.org; Wed, 7 Jan 1998 19:32:55 +0100 (CET) Message-Id: <199801071832.TAA04945@support.euronet.nl> Subject: FS interface to sockets? To: freebsd-hackers@FreeBSD.ORG Date: Wed, 7 Jan 1998 19:32:55 +0100 (CET) From: Benjamin Gras Reply-To: ben@nl.euro.net (Benjamin Gras) X-Bad-Religion: Rules X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk 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